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
b68e407f
Commit
b68e407f
authored
Oct 01, 2021
by
Jaime Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pages_smart_check_outdated_sha feature flag
Changelog: other
parent
02ad2733
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
30 deletions
+4
-30
app/services/projects/update_pages_service.rb
app/services/projects/update_pages_service.rb
+4
-6
config/feature_flags/development/pages_smart_check_outdated_sha.yml
...ture_flags/development/pages_smart_check_outdated_sha.yml
+0
-8
spec/services/projects/update_pages_service_spec.rb
spec/services/projects/update_pages_service_spec.rb
+0
-16
No files found.
app/services/projects/update_pages_service.rb
View file @
b68e407f
...
...
@@ -136,13 +136,11 @@ module Projects
def
validate_outdated_sha!
return
if
latest?
if
Feature
.
enabled?
(
:pages_smart_check_outdated_sha
,
project
,
default_enabled: :yaml
)
# use pipeline_id in case the build is retried
last_deployed_pipeline_id
=
project
.
pages_metadatum
&
.
pages_deployment
&
.
ci_build
&
.
pipeline_id
# use pipeline_id in case the build is retried
last_deployed_pipeline_id
=
project
.
pages_metadatum
&
.
pages_deployment
&
.
ci_build
&
.
pipeline_id
return
unless
last_deployed_pipeline_id
return
if
last_deployed_pipeline_id
<=
build
.
pipeline_id
end
return
unless
last_deployed_pipeline_id
return
if
last_deployed_pipeline_id
<=
build
.
pipeline_id
raise
InvalidStateError
,
'build SHA is outdated for this ref'
end
...
...
config/feature_flags/development/pages_smart_check_outdated_sha.yml
deleted
100644 → 0
View file @
02ad2733
---
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
spec/services/projects/update_pages_service_spec.rb
View file @
b68e407f
...
...
@@ -173,14 +173,6 @@ RSpec.describe Projects::UpdatePagesService do
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
before
do
old_build
=
create
(
:ci_build
,
pipeline:
old_pipeline
,
ref:
'HEAD'
)
...
...
@@ -189,14 +181,6 @@ RSpec.describe Projects::UpdatePagesService do
end
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
context
'when newer deployment present'
do
...
...
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