Commit e60ba66f authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch '336574-remove-ff-pages_smart_check_outdated_sha' into 'master'

Remove pages_smart_check_outdated_sha feature flag

See merge request gitlab-org/gitlab!71530
parents 8f1f5ab8 b68e407f
...@@ -136,13 +136,11 @@ module Projects ...@@ -136,13 +136,11 @@ module Projects
def validate_outdated_sha! def validate_outdated_sha!
return if latest? return if latest?
if Feature.enabled?(:pages_smart_check_outdated_sha, project, default_enabled: :yaml) # use pipeline_id in case the build is retried
# use pipeline_id in case the build is retried last_deployed_pipeline_id = project.pages_metadatum&.pages_deployment&.ci_build&.pipeline_id
last_deployed_pipeline_id = project.pages_metadatum&.pages_deployment&.ci_build&.pipeline_id
return unless last_deployed_pipeline_id return unless last_deployed_pipeline_id
return if last_deployed_pipeline_id <= build.pipeline_id return if last_deployed_pipeline_id <= build.pipeline_id
end
raise InvalidStateError, 'build SHA is outdated for this ref' raise InvalidStateError, 'build SHA is outdated for this ref'
end end
......
---
name: pages_smart_check_outdated_sha
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67303
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/336574
milestone: '14.2'
type: development
group: group::release
default_enabled: false
...@@ -173,14 +173,6 @@ RSpec.describe Projects::UpdatePagesService do ...@@ -173,14 +173,6 @@ RSpec.describe Projects::UpdatePagesService do
include_examples 'successfully deploys' include_examples 'successfully deploys'
context 'when pages_smart_check_outdated_sha feature flag is disabled' do
before do
stub_feature_flags(pages_smart_check_outdated_sha: false)
end
include_examples 'fails with outdated reference message'
end
context 'when old deployment present' do context 'when old deployment present' do
before do before do
old_build = create(:ci_build, pipeline: old_pipeline, ref: 'HEAD') old_build = create(:ci_build, pipeline: old_pipeline, ref: 'HEAD')
...@@ -189,14 +181,6 @@ RSpec.describe Projects::UpdatePagesService do ...@@ -189,14 +181,6 @@ RSpec.describe Projects::UpdatePagesService do
end end
include_examples 'successfully deploys' include_examples 'successfully deploys'
context 'when pages_smart_check_outdated_sha feature flag is disabled' do
before do
stub_feature_flags(pages_smart_check_outdated_sha: false)
end
include_examples 'fails with outdated reference message'
end
end end
context 'when newer deployment present' do context 'when newer deployment present' 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