Skip to content

Refactor project shared_runners_seconds to use new tracking

Fabio Pitino requested to merge refactor-shared-runners-seconds into master

What does this MR do and why?

Related to #277448 (closed)

Feature flag issue: #341730 (closed)

This MR is a preparation refactoring to eventually replace the usage of shared_runners_seconds with the new monthly tracking that uses Ci::Minutes::ProjectMonthlyUsage and Ci::Minutes::NamespaceMonthlyUsage.

In this MR we are reducing the reads of shared_runners_seconds at project level to a single method Project#ci_minutes_used that is guarded by feature flag ci_use_new_monthly_minutes.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Edited by Fabio Pitino

Merge request reports