Commit not associated to merge request
Summary
A Commit that was associated to a MR lost this association after a rebase (or was never associated at all). This caused a code-anchored thread to disappear from the MR overview. (This may be a duplicate of #209093 (closed) )
Steps to reproduce
Reproducing failed.
Example Project
Can't reproduce. Affected gitlab instance is not public.
What is the current bug behavior?
But this is what we think we did:
- Add a code-anchored review comment to a MR through the 'changes' tab. (not the commits tab)
- This comment was visible in the MR overview (100% sure, at that point I did not look into my mails yet)
- Answer to that comment
- Rebase and force-push to the branch (affecting the line of the comment)
- The comment and answer disappeared from the overview tab (and from the changes tab as well)
Clicking on the relevant commit id in the overview does open this url /project-path/reponame/-/merge_requests/123/diffs?commit_id=12345abc. The comment is not visible there. (yes, I checked the commit id thrice)
The email that was send for the comment contains a link to /project-path/reponame/-/commit/12345abc. The comments are visible there. On the top of this page, it says: [MR icon] Keine zugehörigen Merge-Requests gefunden (german; = no associated merge requests found).
When we tried to reproduce this, all the old branch head commits with comments say [MR icon] 1 Merge-Request !xxx MR title (but never no associated merge requests found like in the problem case).
-> It seems there is e.g. a race condition that removes the commit<>MR association. (It could also be that the association was missing from the beginning, but at the time where the commit was the head of the MR branch, it showed up in the overview even without this association)
What is the expected correct behavior?
All outdated threads are visible in the overview with the link @xyz changed this line in version x of the diff ..... This is what happened when we tried to reproduce.
Relevant logs and/or screenshots
n/a