Skip to content
Snippets Groups Projects

Fetch runner counts with renderless components

Merged Miguel Rincon requested to merge 339523-refactor-runner-stats-smart-query into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sharmad Nachnolkar
  • Sharmad Nachnolkar
  • Sharmad Nachnolkar approved this merge request

    approved this merge request

  • Sharmad Nachnolkar requested review from @f_caplette and removed review request for @snachnolkar

    requested review from @f_caplette and removed review request for @snachnolkar

  • :wave: @snachnolkar, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Sharmad Nachnolkar requested review from @xanf

    requested review from @xanf

  • Sharmad Nachnolkar removed review request for @f_caplette

    removed review request for @f_caplette

  • Miguel Rincon added 1 commit

    added 1 commit

    • dd35738d - Refactor smart queries to fetch runner counts

    Compare with previous version

  • Miguel Rincon changed the description

    changed the description

  • Miguel Rincon mentioned in merge request !91905 (merged)

    mentioned in merge request !91905 (merged)

  • Miguel Rincon requested review from @jivanvl and removed review request for @xanf

    requested review from @jivanvl and removed review request for @xanf

  • Jose Ivan Vargas resolved all threads

    resolved all threads

  • Jose Ivan Vargas approved this merge request

    approved this merge request

  • Looks good to me! This is a great refactor

  • Jose Ivan Vargas enabled an automatic merge when the pipeline for 556d11a0 succeeds

    enabled an automatic merge when the pipeline for 556d11a0 succeeds

  • mentioned in commit b67a0ac1

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading