Skip to content

Track shared runners duration when job completes

Fabio Pitino requested to merge ci-track-shared-runners-usage-duration into master

What does this MR do and why?

Related to #254231 (closed)

In this MR we introduce a FF ci_always_track_shared_runners_usage that enables tracking of shared_runners_duration when a job completes.

Today when a job completes we track the amount of CI minutes consumed as job.duration * runner cost_factor. Until this MR we only tracked amount_used but for old public projects we currently use a cost_factor: 0 which means that we don't count CI minutes consumption in this scenario. However, we would like to know how long the namespace used shared runners for, regardless of the CI minutes billing. This is why we added tracking of shared_runners_duration separately from CI minutes even when CI minutes consumption is 0.

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