Remove auto_merge_abort_uses_target_project feature flag
What does this MR do and why?
This MR removes the auto_merge_abort_uses_target_project feature flag. The flag is type gitlab_com_derisk and was default_enabled: false. The rollout is complete on GitLab.com and the rollout issue is closed.
The flag fixed a bug with merge requests opened from a fork. When auto-merge or a merge train was pending and got aborted, the "aborted the automatic merge" system note was never saved. RefreshService and UnlinkForkService run with the source (fork) project. The note was built against that project. Note validation rejects a note whose project does not match the target project of the merge request. The abort itself still happened, but the note was lost without an error.
Changes:
MergeRequests::BaseService#abort_auto_mergenow always passesmerge_request.target_projecttoAutoMergeService.- The feature flag YAML file is deleted.
- The "when the flag is disabled" spec contexts are deleted from
spec/services/merge_requests/post_merge_service_spec.rbandspec/services/merge_requests/refresh_service_spec.rb.
The flag was off by default. Removing it ships the fix to self-managed and Dedicated for the first time. This is a user-facing change, so the changelog type is fixed.
References
- Flag introduced in 19.4 by !253849 (merged)
- Original issue: #614048
- Rollout issue: #627840 (closed)
Screenshots or screen recordings
Not applicable. This MR has no UI changes.
How to set up and validate locally
- Run the two service specs:
bundle exec rspec spec/services/merge_requests/post_merge_service_spec.rb spec/services/merge_requests/refresh_service_spec.rb - Both specs pass locally.
To check the behavior by hand:
- Fork a project and open a merge request from the fork to the target project.
- Set auto-merge on the merge request.
- Push a new commit to the source branch to abort auto-merge.
- The merge request now shows the "aborted the automatic merge" system note.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
The flag rollout is complete. The only production change is that the abort path always uses the target project.