Loading
Remove approval_policies_block_on_failed_scan_job feature flag
What does this MR do and why?
Removes the approval_policies_block_on_failed_scan_job feature flag (beta, default enabled), which has been enabled on GitLab.com for months. The flag was introduced in !243540 (merged).
A scanner required by a merge request approval policy whose CI job failed or was canceled without producing a report now always blocks the merge request (fail-closed policies). Self-managed and Dedicated already had the flag enabled by default, so there is no behaviour change.
- Deletes the flag YAML and the
Feature.enabled?check inSecurity::ScanResultPolicies::UpdateApprovalsService#enforce_scan_job_success!. - Specs: drops the flag-disabled context in
update_approvals_service_spec.rb. The flag-on expectations are unchanged. - Docs: adds a history entry and removes the flag mention from the failure reasons list in
merge_request_approval_policies.md. - Shortens pre-existing comment blocks in the two touched Ruby files to satisfy
Gitlab/CommentLength.
References
Related to #604861 (closed)
How to set up and validate locally
bundle exec rspec ee/spec/services/security/scan_result_policies/update_approvals_service_spec.rbNot run locally: the worktree's Gemfile.lock has gems that are not installed in the GDK, so bundle exec fails. Relying on CI.
Feature flag removal checklist
- Flag YAML deleted
- All
Feature.enabled?checks removed, enabled path kept - Dead code only used by the disabled path removed
- Flag stubs and disabled-only specs removed
- Docs updated to note the flag removal
- Specs run locally (not possible, see above)
- Rubocop run locally (not possible, see above)
- Feature flag deleted via chatops (to be done after this MR is deployed, per the rollout issue)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.