Fix shared runners duration on project list
What does this MR do and why?
After validating #370020 (closed) it was noticed a discrepancy in the shared runners numbers. Details:
This MR fixes this issue and finishes the implementation of #370020 (closed)
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Make sure to enable:
::Gitlab::CurrentSettings.update(check_namespace_plan: true)
- Make sure you're simulating SaaS
- Enable the FF:
Feature.enable(:usage_quotas_pipelines_vue)
- Add some data:
project = Project.find(108) root_namespace = project.root_namespace namespace_usage = Ci::Minutes::NamespaceMonthlyUsage.find_or_create_current(namespace_id: root_namespace) Ci::Minutes::NamespaceMonthlyUsage.update_counters(namespace_usage, shared_runners_duration: 100) project_usage = Ci::Minutes::ProjectMonthlyUsage.find_or_create_current(project_id: project) Ci::Minutes::ProjectMonthlyUsage.update_counters(project_usage, shared_runners_duration: 100)
- Go to your group's usage quotas page
- Check the project list, note the shared runners number
- Turn off FF:
Feature.disable(:usage_quotas_pipelines_vue)
- Compare the shared runners number
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sheldon Led