Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
70a8a8a6
Commit
70a8a8a6
authored
Apr 22, 2020
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check different FF in shared limit check
parent
ae638fcc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+1
-1
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-1
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+2
-2
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+2
-2
No files found.
ee/app/models/ee/ci/build.rb
View file @
70a8a8a6
...
...
@@ -36,7 +36,7 @@ module EE
end
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?
else
legacy_shared_runners_minutes_limit_enabled?
...
...
ee/app/models/ee/project.rb
View file @
70a8a8a6
...
...
@@ -281,7 +281,7 @@ module EE
end
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_limit_namespace
.
shared_runners_minutes_limit_enabled?
else
...
...
ee/spec/models/ci/build_spec.rb
View file @
70a8a8a6
...
...
@@ -81,9 +81,9 @@ describe Ci::Build do
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
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
it_behaves_like
'depends on runner presence and type'
...
...
ee/spec/models/project_spec.rb
View file @
70a8a8a6
...
...
@@ -980,9 +980,9 @@ describe Project do
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
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
it
{
is_expected
.
to
be_falsey
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment