Skip to content

Fetch runner counts with renderless components

Miguel Rincon requested to merge 339523-refactor-runner-stats-smart-query into master

What does this MR do and why?

This change refactors a complicated smart query factory by using a renderless components.

This solution makes use a of a simpler renderless component that fetches a total count of runners given arbitrary filters, so the component can be reused in different layouts.

Why this change?

While working on #339523 (closed) we will need to use different queries in CE and GitLab Ultimate. So it became necessary to group the complexity of the smart queries in a single place, so we could reuse the counts in EE as a component that can be imported separately.

Work in progress: !91905 (merged)

Screenshots or screen recordings

No user-facing changes are expected, but these are the related components:

Screen_Shot_2022-07-06_at_14.35.09

How to set up and validate locally

No user-facing changes are expected. To verify, visit either:

  1. The Admin -> Runners section e.g. http://gdk.test:3000/admin/runners
  2. A Group -> CI/CD -> Runners section http://gdk.test:3000/groups/h5bp/-/runners

And verify the runner total counts are accurate, with and without filters.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #339523 (closed)

Edited by Miguel Rincon

Merge request reports