Bot.ListTasks: Query for tasks sorted by STARTED_TS |
|||||
Issue descriptionCurrently, the Bot.ListTasks API (http://shortn/_pXphJYqhBI) allows sorting the tasks by the following fields: CREATED_TS, MODIFIED_TS, COMPLETED_TS, ABANDONED_TS http://shortn/_yDodrVBv65 This doesn't support the following use-case: we want to know how long a bot has been idle. For this, we want to know when the last task that ran on the bot completed. We don't care whether the task completed (pass/fail), or was killed, or timed out. All we care about is that the bot was utilized for the task. So, we need either: [1] A combined sort based on COMPLETED_TS (for completed/killed tasks) / ABANDONED_TS (for timed out tasks) [2] Sort based on STARTED_TS. I think [2] is cleaner and handles the use-case stated, from my understanding so far.
,
Jun 28 2018
Dunno was the triaging process is, so handing it off directly.
,
Jun 28 2018
,
Jun 29 2018
,
Nov 6
Oh, the easiest way to answer this question is via a bot events query, here's an example: ./swarming.py query --limit 0 -S chromeos-swarming.appspot.com 'bot/chromeos-skylab-bot-06321e38-7463-4889-9752-4413899e9880/events?start=1541449500&end=1541535900' That should give enough information to answer your question.
,
Nov 7
I think it still makes sense for this to be implemented Swarming side, since the client will need to make more queries to get the task details. Either we query for each task individually after querying the task_complete events (which is expensive RPC-wise), or we still need to query all tasks sorted by created_ts, which gives us no guarantee how far back we need to query before we get all the tasks we want, especially as we start creating more low priority tasks that get run far after they were created to take advantage of spare capacity.
,
Nov 8
,
Nov 8
+1 to c#6, our experience with autotest suggests that trying to reorder list of tasks on client side doesn't scale well in our usecase because we have tasks that often run ~ 1 week after creation (by design: we have weekly low priority suites that slowly fill in the gaps between bursty latency sensitive tasks) |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by pprabhu@chromium.org
, Jun 28 2018