Skip to content
Snippets Groups Projects
Unverified Commit 282e8f83 authored by Avielle Wolfe's avatar Avielle Wolfe Committed by GitLab
Browse files

Merge branch '471925-rollout-run-keyword' into 'master'

Remove pipeline_run_keyword feature flag

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167722



Merged-by: default avatarAvielle Wolfe <awolfe@gitlab.com>
Approved-by: default avatarAvielle Wolfe <awolfe@gitlab.com>
Co-authored-by: default avatarRajendra Kadam <rkadam@gitlab.com>
parents 66bd33d1 f38c167a
No related branches found
No related tags found
No related merge requests found
---
name: pipeline_run_keyword
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/440487
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/146333
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/471925
milestone: '17.2'
group: group::pipeline authoring
type: gitlab_com_derisk
default_enabled: false
Loading
Loading
@@ -4674,6 +4674,7 @@ DETAILS:
**Status:** Experiment
 
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/440487) in GitLab 17.3 [with a flag](../../administration/feature_flags.md) named `pipeline_run_keyword`. Disabled by default. Requires GitLab Runner 17.1.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/471925) in GitLab 17.5. Feature flag `pipeline_run_keyword` removed.
 
FLAG:
The availability of this feature is controlled by a feature flag.
Loading
Loading
Loading
Loading
@@ -23,8 +23,7 @@ class Response < Grape::Entity
 
expose :runner_variables, as: :variables
expose :steps, using: Entities::Ci::JobRequest::Step, unless: ->(job) do
::Feature.enabled?(:pipeline_run_keyword, job.project) &&
job.execution_config&.run_steps.present?
job.execution_config&.run_steps.present?
end
 
expose :runtime_hooks, as: :hooks, using: Entities::Ci::JobRequest::Hook
Loading
Loading
@@ -38,10 +37,7 @@ class Response < Grape::Entity
Entities::Ci::JobRequest::Dependency.represent(job.all_dependencies, options.merge(running_job: job))
end
 
expose :run, if: ->(job) {
::Feature.enabled?(:pipeline_run_keyword, job.project) &&
job.execution_config&.run_steps.present?
} do |job|
expose :run, if: ->(job) { job.execution_config&.run_steps.present? } do |job|
job.execution_config.run_steps.to_json
end
end
Loading
Loading
Loading
Loading
@@ -147,11 +147,7 @@ class Job < ::Gitlab::Config::Entry::Node
:allow_failure, :publish, :pages, :manual_confirmation, :run
 
def self.matching?(name, config)
if ::Gitlab::Ci::Config::FeatureFlags.enabled?(:pipeline_run_keyword, type: :gitlab_com_derisk)
!name.to_s.start_with?('.') && config.is_a?(Hash) && (config.key?(:script) || config.key?(:run))
else
!name.to_s.start_with?('.') && config.is_a?(Hash) && config.key?(:script)
end
!name.to_s.start_with?('.') && config.is_a?(Hash) && (config.key?(:script) || config.key?(:run))
end
 
def self.visible?
Loading
Loading
@@ -189,7 +185,7 @@ def value
publish: publish,
pages: pages,
manual_confirmation: self.manual_confirmation,
run: ::Gitlab::Ci::Config::FeatureFlags.enabled?(:pipeline_run_keyword, type: :gitlab_com_derisk) ? run : nil
run: run
).compact
end
 
Loading
Loading
Loading
Loading
@@ -97,7 +97,7 @@ def to_resource
delegate :logger, to: :@context
 
def build_execution_config_attribute
return {} unless ::Feature.enabled?(:pipeline_run_keyword, @pipeline.project) && @execution_config_attribute
return {} unless @execution_config_attribute
 
execution_config = @context.find_or_build_execution_config(@execution_config_attribute)
{ execution_config: execution_config }
Loading
Loading
Loading
Loading
@@ -65,19 +65,6 @@
end
 
it { is_expected.to be_truthy }
context 'when pipeline_run_keyword feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
context 'when config has run key' do
let(:name) { :rspec }
let(:config) { { run: [{ name: 'step1', step: 'some reference' }] } }
it { is_expected.to be_falsey }
end
end
end
 
context 'when config is a bridge job' do
Loading
Loading
@@ -969,16 +956,6 @@
end
end
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
it 'return nil for run value' do
expect(entry.value[:run]).to be_nil
end
end
end
 
context 'with retry present in the config' do
Loading
Loading
Loading
Loading
@@ -73,16 +73,6 @@
)
end
 
context 'when feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
it 'does not include execution_config attribute' do
expect(subject).not_to include(:execution_config)
end
end
context 'when job:run attribute is not specified' do
let(:attributes) do
{
Loading
Loading
Loading
Loading
@@ -505,19 +505,6 @@
expect(response).to have_gitlab_http_status(:created)
expect(json_response['steps']).to be_nil
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
it 'returns nil for run steps' do
request_job
expect(response).to have_gitlab_http_status(:created)
expect(json_response['run']).to be_nil
end
end
end
 
context 'when job does not have execution config' do
Loading
Loading
@@ -551,20 +538,6 @@
expect(response).to have_gitlab_http_status(:created)
expect(json_response['run']).to be_nil
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
it 'returns nil for run steps' do
request_job
expect(response).to have_gitlab_http_status(:created)
expect(json_response['run']).to be_nil
expect(json_response['steps']).to eq(expected_steps)
end
end
end
end
 
Loading
Loading
Loading
Loading
@@ -47,16 +47,6 @@
}
])
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(pipeline_run_keyword: false)
end
it 'does not create a pipeline' do
expect(pipeline).not_to be_created_successfully
end
end
end
 
context 'when job has multiple run steps with different configurations' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment