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
ae39d785
Commit
ae39d785
authored
May 26, 2020
by
Aleksei Lipniagov
Committed by
Kamil Trzciński
May 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable CI Minutes-related FFs by default
parent
aee71022
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
5 deletions
+10
-5
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
+2
-2
ee/app/services/ee/ci/register_job_service.rb
ee/app/services/ee/ci/register_job_service.rb
+1
-1
ee/app/services/update_build_minutes_service.rb
ee/app/services/update_build_minutes_service.rb
+1
-1
ee/changelogs/unreleased/218434-set-ci-minutes-ffs-default-enabled.yml
.../unreleased/218434-set-ci-minutes-ffs-default-enabled.yml
+5
-0
No files found.
ee/app/models/ee/ci/build.rb
View file @
ae39d785
...
...
@@ -36,7 +36,7 @@ module EE
end
def
shared_runners_minutes_limit_enabled?
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
project
.
shared_runners_limit_namespace
)
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
project
.
shared_runners_limit_namespace
,
default_enabled:
true
)
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 @
ae39d785
...
...
@@ -91,7 +91,7 @@ module EE
has_many
:sourced_pipelines
,
class_name:
'Ci::Sources::Project'
,
foreign_key: :source_project_id
scope
:with_shared_runners_limit_enabled
,
->
do
if
::
Feature
.
enabled?
(
:ci_minutes_enforce_quota_for_public_projects
)
&&
if
::
Feature
.
enabled?
(
:ci_minutes_enforce_quota_for_public_projects
,
default_enabled:
true
)
&&
::
Ci
::
Runner
.
has_shared_runners_with_non_zero_public_cost?
with_shared_runners
else
...
...
@@ -276,7 +276,7 @@ module EE
end
def
shared_runners_minutes_limit_enabled?
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
shared_runners_limit_namespace
)
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
shared_runners_limit_namespace
,
default_enabled:
true
)
shared_runners_enabled?
&&
shared_runners_limit_namespace
.
shared_runners_minutes_limit_enabled?
else
...
...
ee/app/services/ee/ci/register_job_service.rb
View file @
ae39d785
...
...
@@ -28,7 +28,7 @@ module EE
def
builds_for_shared_runner
return
super
unless
shared_runner_build_limits_feature_enabled?
if
::
Feature
.
enabled?
(
:ci_minutes_enforce_quota_for_public_projects
)
if
::
Feature
.
enabled?
(
:ci_minutes_enforce_quota_for_public_projects
,
default_enabled:
true
)
enforce_minutes_based_on_cost_factors
(
super
)
else
legacy_enforce_minutes_for_non_public_projects
(
super
)
...
...
ee/app/services/update_build_minutes_service.rb
View file @
ae39d785
...
...
@@ -6,7 +6,7 @@ class UpdateBuildMinutesService < BaseService
return
unless
build
.
complete?
return
unless
build
.
duration
&
.
positive?
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
namespace
)
if
::
Feature
.
enabled?
(
:ci_minutes_track_for_public_projects
,
namespace
,
default_enabled:
true
)
count_projects_based_on_cost_factors
(
build
)
else
legacy_count_non_public_projects
(
build
)
...
...
ee/changelogs/unreleased/218434-set-ci-minutes-ffs-default-enabled.yml
0 → 100644
View file @
ae39d785
---
title
:
Enable CI Minutes-related Feature Flags by default
merge_request
:
32581
author
:
type
:
changed
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