Add sidekiq worker for scheduled merge
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
Related to #14380 (closed)
This MR is part of a multi-MR feature:
Changes | MR |
---|---|
New attribute on MRs | !165092 (merged) |
Mergeability check | !165099 (merged) |
Sidekiq worker | |
Frontend & Controller changes | !165250 (merged) |
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Ensure you have a runner set up (you need to be able to get a successful pipeline)
- Create (or use an existing) project
- Have a pipeline in the project.
Something simple as this is enough:
job: script: - exit 0
- Make any change and open a MR
- In the rails console, execute
MergeRequests::MergeSchedule.create(merge_request: MergeRequest.last, merge_after: 2.minutes.from_now)
- Reload the MR page and see that one merge check fails (the widget won't show the failing check as that is getting added in the next MR of the chain)
- Set the MR to auto-merge
- Observe that the MR will get auto-merged after the
merge_after
time you set earlier
Edited by Niklas van Schrick