Commit 982c484c authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '210570-fix-feature-flags-dependencies' into 'master'

Use different FF in shared runners limit check

See merge request gitlab-org/gitlab!30164
parents 76c078a6 70a8a8a6
...@@ -36,7 +36,7 @@ module EE ...@@ -36,7 +36,7 @@ module EE
end end
def shared_runners_minutes_limit_enabled? def shared_runners_minutes_limit_enabled?
if ::Feature.enabled?(:ci_minutes_enforce_quota_for_public_projects) if ::Feature.enabled?(:ci_minutes_track_for_public_projects, project.shared_runners_limit_namespace)
project.shared_runners_minutes_limit_enabled? && runner&.minutes_cost_factor(project.visibility_level)&.positive? project.shared_runners_minutes_limit_enabled? && runner&.minutes_cost_factor(project.visibility_level)&.positive?
else else
legacy_shared_runners_minutes_limit_enabled? legacy_shared_runners_minutes_limit_enabled?
......
...@@ -280,7 +280,7 @@ module EE ...@@ -280,7 +280,7 @@ module EE
end end
def shared_runners_minutes_limit_enabled? def shared_runners_minutes_limit_enabled?
if ::Feature.enabled?(:ci_minutes_enforce_quota_for_public_projects) if ::Feature.enabled?(:ci_minutes_track_for_public_projects, shared_runners_limit_namespace)
shared_runners_enabled? && shared_runners_enabled? &&
shared_runners_limit_namespace.shared_runners_minutes_limit_enabled? shared_runners_limit_namespace.shared_runners_minutes_limit_enabled?
else else
......
...@@ -81,9 +81,9 @@ describe Ci::Build do ...@@ -81,9 +81,9 @@ describe Ci::Build do
it_behaves_like 'depends on runner presence and type' it_behaves_like 'depends on runner presence and type'
context 'and :ci_minutes_enforce_quota_for_public_projects FF is disabled' do context 'and :ci_minutes_track_for_public_projects FF is disabled' do
before do before do
stub_feature_flags(ci_minutes_enforce_quota_for_public_projects: false) stub_feature_flags(ci_minutes_track_for_public_projects: { enabled: false, thing: project.shared_runners_limit_namespace })
end end
it_behaves_like 'depends on runner presence and type' it_behaves_like 'depends on runner presence and type'
......
...@@ -980,9 +980,9 @@ describe Project do ...@@ -980,9 +980,9 @@ describe Project do
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
context 'and :ci_minutes_enforce_quota_for_public_projects FF is disabled' do context 'and :ci_minutes_track_for_public_projects FF is disabled' do
before do before do
stub_feature_flags(ci_minutes_enforce_quota_for_public_projects: false) stub_feature_flags(ci_minutes_track_for_public_projects: { enabled: false, thing: project.shared_runners_limit_namespace })
end end
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment