Utilize server side filtering to speed up queries
After running this command a bit for the gitlab-runner runner update sweep one thing that I have encountered is slowness. As far as I can tell the primary driver for this is the fact that every call to the command fetches all of the runners in the gitlab instance without applying any server side filtering. Gitlab provides query modifiers to allow more efficient fetching which should help improve utility performance.
Server side filtering options include:
id
-
scope
/status
/paused
-
-Fonline
and-Fpaused
- these are rolled into Online/Paused
-
-
tags
- server side filtering supports
AllOf
but notAnyOf
, ie.-Ftags=atag -Ftags=btag
but not-Ftags=atag,btag
-
AnyOf
would require either multiple queries which is a bit more complicated or a single unconstrained query with client side filtering.
- server side filtering supports
-
version_prefix
- this would be a new filter category as it is available in the query but not the result. This would be helpful in verifying that runners have been updated
Supporting server side filtering is also going to be required for handling listing jobs (!4 (merged)) as there are thousands of records to query per-job. An intermediate fix for this is to set the default query count to a lower number, say 1, or to force job listing to only list running
jobs.
CC: @ben.boeckel