Skip to content

Close issues async after merging MR

Patrick Bajao requested to merge 360639-async-close-issue into master

What does this MR do and why?

When closing issues errors out, it can stop the execution of PostMergeService which can result to other operations not being executed.

To ensure that we still run the rest of logic in PostMergeService when that happens, we close issues asynchronously.

This is behind the async_mr_close_issue feature flag as a new worker is being introduced.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the async_mr_close_issue feature flag: Feature.enable(:async_mr_close_issue).
  2. Create an issue.
  3. Create a MR that references that issue with Closes prefix (e.g. Closes #1).
  4. Merge the MR.
  5. The referenced issue should be closed.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Patrick Bajao

Merge request reports