Commit ae05b90a authored by Alper Akgun's avatar Alper Akgun

Merge branch 'cleanup-sticky_environments_in_job_retry-feature-flag' into 'master'

Cleanup sticky_environments_in_job_retry feature flag

See merge request gitlab-org/gitlab!73606
parents 993b1c4f a4e3412d
......@@ -77,13 +77,8 @@ module Ci
end
def deployment_attributes_for(new_build, old_build)
if Feature.enabled?(:sticky_environments_in_job_retry, project, default_enabled: :yaml)
::Gitlab::Ci::Pipeline::Seed::Build
.deployment_attributes_for(new_build, old_build.persisted_environment)
else
::Gitlab::Ci::Pipeline::Seed::Build
.deployment_attributes_for(new_build)
end
end
end
end
......
---
name: sticky_environments_in_job_retry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72970
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/343874
milestone: '14.5'
type: development
group: group::release
default_enabled: false
......@@ -354,22 +354,6 @@ RSpec.describe Ci::RetryBuildService do
it 'does not create a new environment' do
expect { new_build }.not_to change { Environment.count }
end
context 'when sticky_environments_in_job_retry feature flag is disabled' do
before do
stub_feature_flags(sticky_environments_in_job_retry: false)
end
it 'creates a new environment' do
expect { new_build }.to change { Environment.count }
end
it 'ignores the previous persisted environment' do
expect(build.persisted_environment.name).to eq("review/#{build.ref}-#{other_developer.id}")
expect(new_build.persisted_environment.name).to eq("review/#{build.ref}-#{developer.id}")
end
end
end
context 'when build has needs' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment