Failed to catch conflict in open MR
Summary
GitLab failed to catch a (subtle) conflict in an open MR, resulting in an incorrect merge.
Steps to reproduce
- The second hunk of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926/diffs?commit_id=b9f18d0ddb6b075819bc2c6b9fa36dee483ef443 started like this:
@@ -480,13 +491,9 @@ sanity:
rules:
- if: *is-pre-merge
when: on_success
- - if: *is-forked-branch
- when: manual
# Other cases default to never
script:
# ci-fairy check-commits --junit-xml=check-commits.xml
- While https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926 was still open, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7904/diffs?commit_id=f20153536087079f39f1ab9995ac3d36dd3c467f was merged:
@@ -484,10 +484,8 @@ sanity:
- .fdo.ci-fairy
stage: sanity
rules:
- - if: *is-pre-merge
+ - if: *is-forked-branch-or-pre-merge
when: on_success
- - if: *is-forked-branch
- when: manual
# Other cases default to never
variables:
GIT_STRATEGY: none
Notice how 2. removed the same two lines as 1. intended to remove. However, it also changed a preceding line which was part of 1.'s context.
What is the current bug behavior?
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926 wasn't marked as requiring manual conflict resolution when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7904 was merged. This resulted in an incorrect merge of the former, which left the preceding context line different from what was intended.
What is the expected correct behavior?
When https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7904 was merged, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926 should have been marked as requiring manual conflict resolution.
/cc @fooishbar