[Backport release-25.05] workflows/get-merge-commit: support merge conflicts, run as step in main jobs#410471
Merged
wolfgangwalther merged 4 commits intorelease-25.05from May 24, 2025
Conversation
…ub-script The reason this was a separate shell script was, that this would be included in multiple workflows separately. But a while ago this had been changed to a re-usable workflow, so we can just as well inline the script. This also allows us to use actions/github-script, which makes for a much more readable script than the bash script before. (cherry picked from commit 277f7b9)
When a PR is having conflicts with the base branch, we used to skip most jobs depending on the target branch. With this change, we still run those jobs, but without actually merging the PR temporarily. That means we compare the head of the PR with the merge-base of the PR's branch and the target branch - i.e. the point where the PR branched off. This is not 100% accurate, but that's not important, because after resolving the merge conflicts, those workflows will run again anyway. It allows to give early feedback, though, instead of just skipping all the jobs. (cherry picked from commit c77cfb9)
We don't need a separate workflow anymore, because we don't need to skip dependent jobs on failures anymore. The biggest failure mode was "conflict" previously, but we resolved that on the last commit. The remaining failure modes are so rare, that it's OK to just fail the jobs in this case instead of marking them as "skipped". Especially, because the resolve-merge-commit job would have previously failed anyway. By moving this to an action we avoid running separate jobs each time we need the merge commit. This also makes the check list in PRs much cleaner. (cherry picked from commit e48d9d6)
…mit action This makes a difference for the case of a merge conflict: In that case, the magic `.../merge` branch actually points to the *last test merge commit* that was successful, which might not contain the latest head commit in any way. Running the tests on that commit is heavily misleading. By using the get-merge-commit action, we run on the PR's head commit in this case, which is much better. (cherry picked from commit 039a954)
2 tasks
Contributor
Author
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-410471-to-release-24.11 origin/release-24.11
cd .worktree/backport-410471-to-release-24.11
git switch --create backport-410471-to-release-24.11
git cherry-pick -x 79ea708cc01146a9c6557df3cdc4ece7481f6b39 3e119410bbc0545e17e557198585640ac252f4ea e2a29971275bc417570400010af4feffa38c114c 30b698a54e435d8d4d18399b14f903286facd5da |
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bot-based backport to
release-25.05, triggered by a label in #410430.