Feature flag rollout: automerge_skip_mergeability_cache
Summary
Feature flag rollout issue for automerge_skip_mergeability_cache.
What does the feature flag do?
When enabled, the auto-merge process (MergeWhenChecksPassService#process and AddToMergeTrainWhenChecksPassService#process) bypasses the mergeability cache by passing use_cache: false to mergeable?. This ensures fresh approval state is evaluated before triggering the actual merge, avoiding unnecessary MergeWorker jobs based on stale cached data.
When disabled, the existing behavior is preserved — the auto-merge process uses the default use_cache: true.
Why?
With the introduction of the short-TTL approval cache (!227379), cached mergeability results could be up to 30 seconds stale for edge cases. While the merge strategies already bypass the cache during the actual merge, the auto-merge process call is the decision point for whether to queue the merge at all. Using fresh data here avoids queueing merge attempts that would just be rejected.
Rollout plan
- Enable on
gitlab-org/gitlabfor internal testing - Enable on a percentage of projects (10% → 50% → 100%)
- Monitor for increased latency in
AutoMergeProcessWorkeror unexpected merge failures - Enable globally
- Remove feature flag
MR
Related
- !227379 — short-TTL approval cache (dependency)
- #523857 — original investigation issue