[FF] prevent_reopen_merge_request_without_branch -- Prevent reopening an MR when a branch is missing
Summary
Roll out the feature currently behind the prevent_reopen_merge_request_without_branch feature flag.
- DRI: @patrickbajao
- Team Slack channel:
#g_code_review
Note
Process and guidance live in the docs — this issue is just the commands and a place to track the rollout. "Rolling out" means incrementally enabling the flag on GitLab.com to validate stability — it is not the same as releasing the feature, which happens when the flag is removed. Feature flag controls · Feature flag lifecycle
What could go wrong?
Small blast radius: the flag only changes behaviour when reopening a closed merge request whose source or target branch no longer exists. When enabled, such a reopen is rejected (the merge request stays closed) instead of recreating an empty diff. There is no data-loss risk — the change prevents the existing data loss (an empty diff overwriting the stored one).
Check https://log.gprd.gitlab.net/app/r/s/dwFX4 for relevant errors.
Rollout
Run all production /chatops in #production and cross-post the results to #g_code_review. Background: incremental rollout process, feature actors.
Non-production
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch 50 --actors --dev --pre --staging --staging-ref
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch true --dev --pre --staging --staging-refProduction — percentage rollout (wait ≥15 min between steps, watch dashboards):
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch 25 --actors
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch 50 --actors
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch 75 --actorsOr target specific actors instead:
/chatops gitlab run feature set --project=patrickbajao/verification prevent_reopen_merge_request_without_branch true
/chatops gitlab run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss prevent_reopen_merge_request_without_branch trueBefore global rollout
Confirm the relevant gotchas before going to 100% — see enabling a feature for GitLab.com:
- Docs + version history updated
- Breaking changes announced, if any
- Change management issue opened, if required
- External API consumers handled with a fail-open mechanism, if applicable
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch trueCleanup
Remove the flag once deemed stable — see cleaning up. Track it here, or open a follow-up Feature Flag Cleanup issue. Remove the flag and its YAML definition from the codebase, then:
/chatops gitlab run release check https://gitlab.com/gitlab-org/gitlab/-/merge_requests/250807 19.4
/chatops gitlab run feature delete prevent_reopen_merge_request_without_branch --dev --pre --staging --staging-ref --productionRollback
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch false # production
/chatops gitlab run feature set prevent_reopen_merge_request_without_branch false --dev --pre --staging --staging-ref # non-production
/chatops gitlab run feature delete prevent_reopen_merge_request_without_branch --dev --pre --staging --staging-ref --production # remove entirely