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
3d54b561
Commit
3d54b561
authored
Dec 25, 2020
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF ci_seed_block_run_before_workflow_rules
It is already default enabled
parent
298ebf6f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
111 deletions
+3
-111
config/feature_flags/development/ci_seed_block_run_before_workflow_rules.yml
...s/development/ci_seed_block_run_before_workflow_rules.yml
+0
-8
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
lib/gitlab/ci/pipeline/chain/seed.rb
lib/gitlab/ci/pipeline/chain/seed.rb
+0
-7
lib/gitlab/ci/pipeline/chain/seed_block.rb
lib/gitlab/ci/pipeline/chain/seed_block.rb
+0
-4
spec/lib/gitlab/ci/pipeline/chain/seed_block_spec.rb
spec/lib/gitlab/ci/pipeline/chain/seed_block_spec.rb
+0
-12
spec/lib/gitlab/ci/pipeline/chain/seed_spec.rb
spec/lib/gitlab/ci/pipeline/chain/seed_spec.rb
+3
-36
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+0
-40
No files found.
config/feature_flags/development/ci_seed_block_run_before_workflow_rules.yml
deleted
100644 → 0
View file @
298ebf6f
---
name
:
ci_seed_block_run_before_workflow_rules
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45674
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/270439
milestone
:
'
13.6'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
lib/gitlab/ci/features.rb
View file @
3d54b561
...
...
@@ -59,10 +59,6 @@ module Gitlab
::
Feature
.
enabled?
(
:ci_pipeline_open_merge_requests
,
project
,
default_enabled:
false
)
end
def
self
.
seed_block_run_before_workflow_rules_enabled?
(
project
)
::
Feature
.
enabled?
(
:ci_seed_block_run_before_workflow_rules
,
project
,
default_enabled:
true
)
end
def
self
.
ci_pipeline_editor_page_enabled?
(
project
)
::
Feature
.
enabled?
(
:ci_pipeline_editor_page
,
project
,
default_enabled:
false
)
end
...
...
lib/gitlab/ci/pipeline/chain/seed.rb
View file @
3d54b561
...
...
@@ -19,13 +19,6 @@ module Gitlab
# Build to prevent erroring out on ambiguous refs.
pipeline
.
protected
=
@command
.
protected_ref?
unless
::
Gitlab
::
Ci
::
Features
.
seed_block_run_before_workflow_rules_enabled?
(
project
)
##
# Populate pipeline with block argument of CreatePipelineService#execute.
#
@command
.
seeds_block
&
.
call
(
pipeline
)
end
##
# Gather all runtime build/stage errors
#
...
...
lib/gitlab/ci/pipeline/chain/seed_block.rb
View file @
3d54b561
...
...
@@ -9,8 +9,6 @@ module Gitlab
include
Gitlab
::
Utils
::
StrongMemoize
def
perform!
return
unless
::
Gitlab
::
Ci
::
Features
.
seed_block_run_before_workflow_rules_enabled?
(
project
)
##
# Populate pipeline with block argument of CreatePipelineService#execute.
#
...
...
@@ -20,8 +18,6 @@ module Gitlab
end
def
break?
return
false
unless
::
Gitlab
::
Ci
::
Features
.
seed_block_run_before_workflow_rules_enabled?
(
project
)
pipeline
.
errors
.
any?
end
end
...
...
spec/lib/gitlab/ci/pipeline/chain/seed_block_spec.rb
View file @
3d54b561
...
...
@@ -51,18 +51,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::SeedBlock do
expect
(
pipeline
.
variables
.
size
).
to
eq
(
1
)
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'does not execute the block'
do
run_chain
expect
(
pipeline
.
variables
.
size
).
to
eq
(
0
)
end
end
end
context
'when the seeds_block tries to save the pipelie'
do
...
...
spec/lib/gitlab/ci/pipeline/chain/seed_spec.rb
View file @
3d54b561
...
...
@@ -20,6 +20,7 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
describe
'#perform!'
do
before
do
stub_ci_pipeline_yaml_file
(
YAML
.
dump
(
config
))
run_chain
end
let
(
:config
)
do
...
...
@@ -36,20 +37,14 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
end
it
'allocates next IID'
do
run_chain
expect
(
pipeline
.
iid
).
to
be_present
end
it
'ensures ci_ref'
do
run_chain
expect
(
pipeline
.
ci_ref
).
to
be_present
end
it
'sets the seeds in the command object'
do
run_chain
expect
(
command
.
pipeline_seed
).
to
be_a
(
Gitlab
::
Ci
::
Pipeline
::
Seed
::
Pipeline
)
expect
(
command
.
pipeline_seed
.
size
).
to
eq
1
end
...
...
@@ -64,8 +59,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
end
it
'correctly fabricates stages and builds'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
stages
.
size
).
to
eq
2
...
...
@@ -91,8 +84,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
end
it
'returns pipeline seed with jobs only assigned to master'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
size
).
to
eq
1
...
...
@@ -112,8 +103,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
end
it
'returns pipeline seed with jobs only assigned to schedules'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
size
).
to
eq
1
...
...
@@ -141,8 +130,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
project:
project
)
}
it
'returns seeds for kubernetes dependent job'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
size
).
to
eq
2
...
...
@@ -154,8 +141,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
context
'when kubernetes is not active'
do
it
'does not return seeds for kubernetes dependent job'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
size
).
to
eq
1
...
...
@@ -173,8 +158,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
end
it
'returns stage seeds only when variables expression is truthy'
do
run_chain
seed
=
command
.
pipeline_seed
expect
(
seed
.
size
).
to
eq
1
...
...
@@ -187,24 +170,8 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Seed do
->
(
pipeline
)
{
pipeline
.
variables
.
build
(
key:
'VAR'
,
value:
'123'
)
}
end
context
'when FF ci_seed_block_run_before_workflow_rules is enabled'
do
it
'does not execute the block'
do
run_chain
expect
(
pipeline
.
variables
.
size
).
to
eq
(
0
)
end
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'executes the block'
do
run_chain
expect
(
pipeline
.
variables
.
size
).
to
eq
(
1
)
end
it
'does not execute the block'
do
expect
(
pipeline
.
variables
.
size
).
to
eq
(
0
)
end
end
end
...
...
spec/services/ci/create_pipeline_service_spec.rb
View file @
3d54b561
...
...
@@ -2402,16 +2402,6 @@ RSpec.describe Ci::CreatePipelineService do
expect
(
build_names
).
to
contain_exactly
(
'regular-job'
)
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'does not a pipeline'
do
expect
(
pipeline
).
not_to
be_persisted
end
end
context
'when a job requires the same variable'
do
let
(
:config
)
do
<<-
EOY
...
...
@@ -2440,16 +2430,6 @@ RSpec.describe Ci::CreatePipelineService do
expect
(
pipeline
).
to
be_persisted
expect
(
build_names
).
to
contain_exactly
(
'build'
,
'test1'
,
'test2'
)
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'does not a pipeline'
do
expect
(
pipeline
).
not_to
be_persisted
end
end
end
end
...
...
@@ -2460,16 +2440,6 @@ RSpec.describe Ci::CreatePipelineService do
expect
(
pipeline
).
not_to
be_persisted
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'does not create a pipeline'
do
expect
(
pipeline
).
not_to
be_persisted
end
end
context
'when a job requires the same variable'
do
let
(
:config
)
do
<<-
EOY
...
...
@@ -2497,16 +2467,6 @@ RSpec.describe Ci::CreatePipelineService do
it
'does not create a pipeline'
do
expect
(
pipeline
).
not_to
be_persisted
end
context
'when FF ci_seed_block_run_before_workflow_rules is disabled'
do
before
do
stub_feature_flags
(
ci_seed_block_run_before_workflow_rules:
false
)
end
it
'does not create a pipeline'
do
expect
(
pipeline
).
not_to
be_persisted
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