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
a2f1f86b
Commit
a2f1f86b
authored
Sep 13, 2021
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF ci_daily_limit_for_pipeline_schedules
It's enabled by default since 14.2 Changelog: other
parent
98a4386b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
47 deletions
+19
-47
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
...ne_schedules/shared/components/interval_pattern_input.vue
+1
-3
app/controllers/projects/pipeline_schedules_controller.rb
app/controllers/projects/pipeline_schedules_controller.rb
+0
-4
app/services/ci/pipeline_schedules/calculate_next_run_service.rb
...vices/ci/pipeline_schedules/calculate_next_run_service.rb
+0
-1
config/feature_flags/development/ci_daily_limit_for_pipeline_schedules.yml
...ags/development/ci_daily_limit_for_pipeline_schedules.yml
+0
-8
spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js
...chedules/shared/components/interval_pattern_input_spec.js
+0
-5
spec/models/ci/pipeline_schedule_spec.rb
spec/models/ci/pipeline_schedule_spec.rb
+18
-26
No files found.
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
View file @
a2f1f86b
...
@@ -141,9 +141,7 @@ export default {
...
@@ -141,9 +141,7 @@ export default {
return
Math
.
floor
(
Math
.
random
()
*
28
);
return
Math
.
floor
(
Math
.
random
()
*
28
);
},
},
showDailyLimitMessage
({
value
})
{
showDailyLimitMessage
({
value
})
{
return
(
return
value
===
KEY_CUSTOM
&&
this
.
dailyLimit
;
value
===
KEY_CUSTOM
&&
this
.
glFeatures
.
ciDailyLimitForPipelineSchedules
&&
this
.
dailyLimit
);
},
},
},
},
};
};
...
...
app/controllers/projects/pipeline_schedules_controller.rb
View file @
a2f1f86b
...
@@ -10,10 +10,6 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
...
@@ -10,10 +10,6 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
before_action
:authorize_update_pipeline_schedule!
,
except:
[
:index
,
:new
,
:create
,
:play
]
before_action
:authorize_update_pipeline_schedule!
,
except:
[
:index
,
:new
,
:create
,
:play
]
before_action
:authorize_admin_pipeline_schedule!
,
only:
[
:destroy
]
before_action
:authorize_admin_pipeline_schedule!
,
only:
[
:destroy
]
before_action
do
push_frontend_feature_flag
(
:ci_daily_limit_for_pipeline_schedules
,
@project
,
default_enabled: :yaml
)
end
feature_category
:continuous_integration
feature_category
:continuous_integration
# rubocop: disable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
...
...
app/services/ci/pipeline_schedules/calculate_next_run_service.rb
View file @
a2f1f86b
...
@@ -8,7 +8,6 @@ module Ci
...
@@ -8,7 +8,6 @@ module Ci
def
execute
(
schedule
,
fallback_method
:)
def
execute
(
schedule
,
fallback_method
:)
@schedule
=
schedule
@schedule
=
schedule
return
fallback_method
.
call
unless
::
Feature
.
enabled?
(
:ci_daily_limit_for_pipeline_schedules
,
project
,
default_enabled: :yaml
)
return
fallback_method
.
call
unless
plan_cron
&
.
cron_valid?
return
fallback_method
.
call
unless
plan_cron
&
.
cron_valid?
now
=
Time
.
zone
.
now
now
=
Time
.
zone
.
now
...
...
config/feature_flags/development/ci_daily_limit_for_pipeline_schedules.yml
deleted
100644 → 0
View file @
98a4386b
---
name
:
ci_daily_limit_for_pipeline_schedules
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62826
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/332333
milestone
:
'
14.0'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
spec/frontend/pages/projects/pipeline_schedules/shared/components/interval_pattern_input_spec.js
View file @
a2f1f86b
...
@@ -42,11 +42,6 @@ describe('Interval Pattern Input Component', () => {
...
@@ -42,11 +42,6 @@ describe('Interval Pattern Input Component', () => {
wrapper
=
mount
(
IntervalPatternInput
,
{
wrapper
=
mount
(
IntervalPatternInput
,
{
propsData
:
{
...
props
},
propsData
:
{
...
props
},
provide
:
{
glFeatures
:
{
ciDailyLimitForPipelineSchedules
:
true
,
},
},
data
()
{
data
()
{
return
{
return
{
randomHour
:
data
?.
hour
||
mockHour
,
randomHour
:
data
?.
hour
||
mockHour
,
...
...
spec/models/ci/pipeline_schedule_spec.rb
View file @
a2f1f86b
...
@@ -107,31 +107,24 @@ RSpec.describe Ci::PipelineSchedule do
...
@@ -107,31 +107,24 @@ RSpec.describe Ci::PipelineSchedule do
describe
'#set_next_run_at'
do
describe
'#set_next_run_at'
do
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:worker_cron
,
:schedule_cron
,
:plan_limit
,
:ff_enabled
,
:now
,
:result
)
do
where
(
:worker_cron
,
:schedule_cron
,
:plan_limit
,
:now
,
:result
)
do
'0 1 2 3 *'
|
'0 1 * * *'
|
nil
|
true
|
Time
.
zone
.
local
(
2021
,
3
,
2
,
1
,
0
)
|
Time
.
zone
.
local
(
2022
,
3
,
2
,
1
,
0
)
'0 1 2 3 *'
|
'0 1 * * *'
|
nil
|
Time
.
zone
.
local
(
2021
,
3
,
2
,
1
,
0
)
|
Time
.
zone
.
local
(
2022
,
3
,
2
,
1
,
0
)
'0 1 2 3 *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
3
,
2
,
1
,
0
)
|
Time
.
zone
.
local
(
2022
,
3
,
2
,
1
,
0
)
'0 1 2 3 *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
3
,
2
,
1
,
0
)
|
Time
.
zone
.
local
(
2022
,
3
,
2
,
1
,
0
)
'0 1 2 3 *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
3
,
2
,
1
,
0
)
|
Time
.
zone
.
local
(
2022
,
3
,
2
,
1
,
0
)
'*/5 * * * *'
|
'*/1 * * * *'
|
nil
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
5
)
'*/5 * * * *'
|
'*/1 * * * *'
|
nil
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
5
)
'*/5 * * * *'
|
'*/1 * * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'*/1 * * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'*/1 * * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
10
)
'*/5 * * * *'
|
'*/1 * * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
5
)
'*/5 * * * *'
|
'*/1 * * * *'
|
200
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
10
)
'*/5 * * * *'
|
'*/1 * * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
10
)
'*/5 * * * *'
|
'0 * * * *'
|
nil
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
5
)
'*/5 * * * *'
|
'*/1 * * * *'
|
200
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
10
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'*/1 * * * *'
|
200
|
false
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
5
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'0 * * * *'
|
nil
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
5
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
2
.
hours
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
5
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
5
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
0
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
8
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/5 * * * *'
|
'0 * * * *'
|
(
1
.
day
.
in_minutes
/
2
.
hours
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
11
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
12
,
5
)
'*/5 * * * *'
|
'0 1 1 * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
6
,
1
,
1
,
0
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/9 * * * *'
|
'0 1 1 * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
1
,
9
)
|
Time
.
zone
.
local
(
2021
,
6
,
1
,
1
,
0
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
10
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/5 * * * *'
|
'59 14 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
15
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
2
,
15
,
0
)
'*/5 * * * *'
|
'0 1 * * *'
|
(
1
.
day
.
in_minutes
/
8
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
27
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
28
,
1
,
0
)
'*/5 * * * *'
|
'45 21 1 2 *'
|
(
1
.
day
.
in_minutes
/
5
).
to_i
|
Time
.
zone
.
local
(
2021
,
2
,
1
,
21
,
45
)
|
Time
.
zone
.
local
(
2022
,
2
,
1
,
21
,
45
)
'*/5 * * * *'
|
'0 1 1 * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
1
,
0
)
|
Time
.
zone
.
local
(
2021
,
6
,
1
,
1
,
0
)
'*/9 * * * *'
|
'0 1 1 * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
1
,
9
)
|
Time
.
zone
.
local
(
2021
,
6
,
1
,
1
,
0
)
'*/9 * * * *'
|
'0 1 1 * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
1
,
9
)
|
Time
.
zone
.
local
(
2021
,
6
,
1
,
1
,
9
)
'*/5 * * * *'
|
'59 14 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
15
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
2
,
15
,
0
)
'*/5 * * * *'
|
'59 14 * * *'
|
(
1
.
day
.
in_minutes
/
1
.
hour
.
in_minutes
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
5
,
1
,
15
,
0
)
|
Time
.
zone
.
local
(
2021
,
5
,
2
,
15
,
0
)
'*/5 * * * *'
|
'45 21 1 2 *'
|
(
1
.
day
.
in_minutes
/
5
).
to_i
|
true
|
Time
.
zone
.
local
(
2021
,
2
,
1
,
21
,
45
)
|
Time
.
zone
.
local
(
2022
,
2
,
1
,
21
,
45
)
'*/5 * * * *'
|
'45 21 1 2 *'
|
(
1
.
day
.
in_minutes
/
5
).
to_i
|
false
|
Time
.
zone
.
local
(
2021
,
2
,
1
,
21
,
45
)
|
Time
.
zone
.
local
(
2022
,
2
,
1
,
21
,
50
)
end
end
with_them
do
with_them
do
...
@@ -143,7 +136,6 @@ RSpec.describe Ci::PipelineSchedule do
...
@@ -143,7 +136,6 @@ RSpec.describe Ci::PipelineSchedule do
end
end
create
(
:plan_limits
,
:default_plan
,
ci_daily_pipeline_schedule_triggers:
plan_limit
)
if
plan_limit
create
(
:plan_limits
,
:default_plan
,
ci_daily_pipeline_schedule_triggers:
plan_limit
)
if
plan_limit
stub_feature_flags
(
ci_daily_limit_for_pipeline_schedules:
false
)
unless
ff_enabled
# Setting this here to override initial save with the current time
# Setting this here to override initial save with the current time
pipeline_schedule
.
next_run_at
=
now
pipeline_schedule
.
next_run_at
=
now
...
...
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