[FF] discard_stale_mergeability_verdicts -- Discard mergeability verdicts computed for stale inputs
Summary
Roll out the fix currently behind the discard_stale_mergeability_verdicts feature flag.
- DRI: @marc_shaw
- 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?
The flag makes MergeabilityCheckService claim the merge status write in the database instead of writing it unconditionally, so a verdict is discarded when the merge request no longer has the target branch or the source diff it was computed from (!247555 (merged)).
A write refused in error leaves the merge request at checking — "Checking mergeability" in the UI — because nothing re-enqueues a check. Watch for a rise in merge requests stuck in checking. Rollback needs no data repair.
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 discard_stale_mergeability_verdicts 50 --actors --dev --pre --staging --staging-ref
/chatops gitlab run feature set discard_stale_mergeability_verdicts true --dev --pre --staging --staging-refProduction — percentage rollout (wait ≥15 min between steps, watch dashboards):
/chatops gitlab run feature set discard_stale_mergeability_verdicts <percentage> --actorsOr target specific actors instead:
/chatops gitlab run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss discard_stale_mergeability_verdicts true
/chatops gitlab run feature set --group=gitlab-org,gitlab-com discard_stale_mergeability_verdicts true
/chatops gitlab run feature set --user=marc_shaw discard_stale_mergeability_verdicts 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
Cleanup
Remove the flag once deemed stable — see cleaning up. Remove the flag and its YAML definition from the codebase, then:
/chatops gitlab run release check <merge-request-url> <milestone>
/chatops gitlab run feature delete discard_stale_mergeability_verdicts --dev --pre --staging --staging-ref --productionRollback
/chatops gitlab run feature set discard_stale_mergeability_verdicts false # production
/chatops gitlab run feature set discard_stale_mergeability_verdicts false --dev --pre --staging --staging-ref # non-production
/chatops gitlab run feature delete discard_stale_mergeability_verdicts --dev --pre --staging --staging-ref --production # remove entirely