Remove `build SHA is outdated for this ref` check for pages builds
As can be seen in https://gitlab.com/gitlab-org/gitlab/pipelines/121633442:
Proposed solution
Add a "smart" check when validating the SHA #208322 (comment 627360109)
def validate_outdated_sha!
return if latest?
if Feature.enabled?(:smart_outdated_pages_check, default_enabled: :yaml)
deployed_build_id = project.pages_metadatum&.pages_deployment&.ci_build_id
return unless deployed_build_id
return if deployed_build_id < build.id
end
raise InvalidStateError, 'build SHA is outdated for this ref'
end
Edited by Jaime Martinez