New API required to get a list of pending jobs on GitLab Server waiting for specific runner/tags
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
A job, once created will wait for a GitLab-Runner to be picked up. At times, if the Runner is overloaded or not responding, these jobs will remain in pending state.
Our organization provides a global runner and we are in process of setting up monitoring. As a part of health monitoring, we would like to see if there are many jobs sitting on the server and not yet picked up my our runner.
The current available APIs does not allow getting jobs based on status and tags (runners). The GraphQL APIs are also not useful as there are no filtering options for tags.
Proposal
A new Rest API /jobs?tags=tag1,tag2&status=pending
or an update to graphql jobs api:
{ jobs(statuses: [PENDING], tags: ["tag1", "tag2"]) { count nodes { id name runner { id } tags status
} pageInfo { endCursor startCursor hasNextPage } } }