CI minutes live traces check does not follow default instance values
When a job sends trace to the Rails app, we have a service that checks minutes quota usage, but if the namespace is supposed to have unlimited minutes we skip it:
- https://gitlab.com/gitlab-org/gitlab/-/blob/457ef961482f659202f11b5ea88f1a5e37b3d5ef/lib/api/ci/runner.rb#L187
- https://gitlab.com/gitlab-org/gitlab/-/blob/457ef961482f659202f11b5ea88f1a5e37b3d5ef/ee/lib/ee/api/ci/helpers/runner.rb#L12
- https://gitlab.com/gitlab-org/gitlab/-/blob/457ef961482f659202f11b5ea88f1a5e37b3d5ef/ee/app/services/ci/minutes/track_live_consumption_service.rb#L17
- https://gitlab.com/gitlab-org/gitlab/-/blob/457ef961482f659202f11b5ea88f1a5e37b3d5ef/ee/app/services/ci/minutes/track_live_consumption_service.rb#L80-81
- https://gitlab.com/gitlab-org/gitlab/-/blob/457ef961482f659202f11b5ea88f1a5e37b3d5ef/app/models/namespace.rb#L277-280
This is supposed to include the instance wide settings because in the UI we show:
I think we should cascade the check to include ::Gitlab::CurrentSettings.shared_runners_minutes
, like we do in the minutes quota class