What does this MR do?
This MR fixes the exception report => #121989 (closed).
Confirmed that the problem can be reproduced by the following steps:
- Multiple pipelines finished simulteniously in multiple MRs
- Each pipeline invokes
AutoMergeProcessWorkerto refresh and merge merge requests on train.
RefreshMergeRequestsServiceis concurrent-safe architecture, it exclusively locks the process with one of the MRs. The rest of the items are enqueued and waiting until the currently-running process finished.
- After the currently-running process finished, it refreshes the other MRs, but it's already processed (merged) at the 3., it's no longer processible, thus raises an error.
This means Merge Train is functional however causing unnecessary exceptions and triggering sidekiq retry.
Close #121989 (closed)
Does this MR meet the acceptance criteria?
- [-] Documentation (if required)
Code review guidelines
Merge request performance guidelines
Separation of EE specific content
Availability and Testing
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- [-] Tested in all supported browsers
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team