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
7bb475a8
Commit
7bb475a8
authored
Oct 04, 2021
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the FF ci_pipeline_add_job_with_lock
It's enabled by default since 14.3 Changelog: other
parent
c77e8c13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
30 deletions
+1
-30
app/services/ci/pipelines/add_job_service.rb
app/services/ci/pipelines/add_job_service.rb
+1
-9
config/feature_flags/development/ci_pipeline_add_job_with_lock.yml
...ature_flags/development/ci_pipeline_add_job_with_lock.yml
+0
-8
spec/services/ci/pipelines/add_job_service_spec.rb
spec/services/ci/pipelines/add_job_service_spec.rb
+0
-13
No files found.
app/services/ci/pipelines/add_job_service.rb
View file @
7bb475a8
...
...
@@ -16,15 +16,7 @@ module Ci
def
execute!
(
job
,
&
block
)
assign_pipeline_attributes
(
job
)
if
Feature
.
enabled?
(
:ci_pipeline_add_job_with_lock
,
pipeline
.
project
,
default_enabled: :yaml
)
in_lock
(
"ci:pipelines:
#{
pipeline
.
id
}
:add-job"
,
ttl:
LOCK_TIMEOUT
,
sleep_sec:
LOCK_SLEEP
,
retries:
LOCK_RETRIES
)
do
Ci
::
Pipeline
.
transaction
do
yield
(
job
)
job
.
update_older_statuses_retried!
end
end
else
in_lock
(
"ci:pipelines:
#{
pipeline
.
id
}
:add-job"
,
ttl:
LOCK_TIMEOUT
,
sleep_sec:
LOCK_SLEEP
,
retries:
LOCK_RETRIES
)
do
Ci
::
Pipeline
.
transaction
do
yield
(
job
)
...
...
config/feature_flags/development/ci_pipeline_add_job_with_lock.yml
deleted
100644 → 0
View file @
c77e8c13
---
name
:
ci_pipeline_add_job_with_lock
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65754
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/337628
milestone
:
'
14.2'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
spec/services/ci/pipelines/add_job_service_spec.rb
View file @
7bb475a8
...
...
@@ -77,19 +77,6 @@ RSpec.describe Ci::Pipelines::AddJobService do
expect
(
execute
).
to
be_success
expect
(
execute
.
payload
[
:job
]).
to
eq
(
job
)
end
context
'when the FF ci_pipeline_add_job_with_lock is disabled'
do
before
do
stub_feature_flags
(
ci_pipeline_add_job_with_lock:
false
)
end
it
'does not use exclusive lock'
do
expect
(
Gitlab
::
ExclusiveLease
).
not_to
receive
(
:new
).
with
(
lock_key
,
timeout:
lock_timeout
)
expect
(
execute
).
to
be_success
expect
(
execute
.
payload
[
:job
]).
to
eq
(
job
)
end
end
end
end
end
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