-
Notifications
You must be signed in to change notification settings - Fork 37
Description
CLI is the primary interface to testflinger, and even if we implement some way to launch jobs from a web page, often CLI is the best way to interact with testflinger.
I find that I sometimes launch up to 80-100 jobs in sequence to pressure test systems. This, obviously, takes a very long time to complete 80 - 100 jobs against a machine, and currently my only real way of knowing that the queue 'fleep' is either running a job, or is completely finished, is polling each job, or running a loop against every known job ID I've created to get a status. It is a bit painful to check all the fleep job-ids and have to wade through 70 "Completed" just to get to 71 "Provisioning" and 72-80 "Waiting".
It would be nice to get a summary of jobs (since we CAN look here: https://testflinger.canonical.com/jobs and see a long list of job IDs and the associated queues) via CLI for just the single requested queue.
Something like this:
$ testflinger-cli queue-status fleep
70 complete, 1 Running, 9 Waiting
$ testflinger-cli queue-status --verbose fleep
75 complete, 1 Running, 4 Waiting
de153d8f-7d32-47d7-9a05-a20f2ef6bb35 waiting 2023-10-13 15:22:46
ba73620d-6d1a-45ab-bb68-a640e4e4c489 waiting 2023-10-13 15:22:45
8b0bb52f-08d8-4671-b275-55d84a965f7c waiting 2023-10-13 15:22:43
a23b7217-c78a-42e0-9636-55ef3fe37bc2 waiting 2023-10-13 15:22:41
b1077c76-a336-47a4-97a0-c86d3f1c007d provisioning 2023-10-13 15:22:40
$ testflinger-cli queue-status --verbose --show-completed fleep
de153d8f-7d32-47d7-9a05-a20f2ef6bb35 waiting 2023-10-13 15:22:46
ba73620d-6d1a-45ab-bb68-a640e4e4c489 waiting 2023-10-13 15:22:45
8b0bb52f-08d8-4671-b275-55d84a965f7c waiting 2023-10-13 15:22:43
a23b7217-c78a-42e0-9636-55ef3fe37bc2 waiting 2023-10-13 15:22:41
b1077c76-a336-47a4-97a0-c86d3f1c007d provisioning 2023-10-13 15:22:40
b46e12c9-e37d-4ded-a8d7-85d3c3dc6e8c complete 2023-10-13 15:22:39
5d2640d1-b830-4a50-bf26-dde41f4ef2c9 complete 2023-10-13 15:22:34
e264a1cc-4bbb-4b59-a06b-a79e1ec2c10f complete 2023-10-13 15:22:33
7634c826-1bf2-482f-ac00-81b62a89dfe3 complete 2023-10-13 15:22:32
6509f367-961f-4a39-a06a-db4dbc967d3c complete 2023-10-13 15:22:30
d908e5cc-ee6d-4a3f-9a8e-00ec4f325e93 complete 2023-10-13 15:22:29
...
--verbose --show-completed would list all the completed jobs that TF still has info for (e.g. the ones that haven't aged out and results/artifacts are still available, with the assumption that anything older you really don't care about at all)