Add merge conflict github PR check#10812
Conversation
|
Naive question: have we explored the native facilities that GitHub provides to ensure that changes aren't in conflict / that the PR branch is up to date with incoming changes in the target branch? Or is there some use case that you're targeting that's not covered by those? |
Yeah, I am targeting in particular edge case of the fast track cherry-pick tool we have, it is the one that would commit merge conflicts and create PRs with them. A different approach might be to make that tool not create PRs and push merge conflicts in the first place, but then it would block the cherry-pick process via tool when any merge conflicts are present that needs to be resolved and will require it be done manually. I believe such edge case is not entirely rare A PR check was a suggestion in this bug by Henry https://microsoft.visualstudio.com/OS/_workitems/edit/53883399. What other native facilities that Github provides do you suggest? |
|
Ah, I didn't realize this was primarily for cherry picks; thanks for the explanation. With that context, I'd agree it's a good idea to prevent unresolved (but already merged) conflicts from getting checked in (i.e., what you're doing here). I also think it's a good idea to pursue how to improve the cherry-picking process to avoid them getting committed in the first place, but agree that's more complicated and separable. |
This reverts commit 81813a7.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Added merge conflict PR check to catch case of cherry-pick tools committing merge conflicts to fix bug https://microsoft.visualstudio.com/OS/_workitems/edit/53883399
Change Log
Does this affect the toolchain?
NO
Example of simulated committed merge conflict https://github.com/microsoft/azurelinux/actions/runs/11584391919/job/32251428087