Incorrect MR status in JIRA after potential network failure

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Merge request status is not correctly reflected in Jira.

Steps to reproduce

Not reproducible at will.

What is the current bug behavior?

Merge request is successfully merged on GitLab.com, however the Jira PR's status remains open.

What is the expected correct behavior?

The Jira PR should accurately reflect the status of the MR.

Relevant logs and/or screenshots

For the MR in question we have observed the following in Kibana (internal):

image

We can see that every single job had failed on the first attempt, but succeeded on the second attempt. It would appear that the MergeWorker does not properly execute the after_merge actions on the 2nd attempt.

image Kibana link (internal)

Which is where we believe the sync to Jira is handled, see:

In addition to this specific MR, similar failures been identified in Kibana (internal), however as these are namespaces unrelated to the initial report, it is not known if these result in failure to update/sync the Jira PR.

Output of checks

This bug happens on gitlab.com

Possible fixes

Ensure Jira sync is handled correctly on subsequent retries.

Workaround

See #450355 (comment 1815583849)

Edited by 🤖 GitLab Bot 🤖