Repository navigation
fix: Stop the release build when merging main conflicts - #1371
Closed
BaggioWongHK wants to merge 2 commits into
Closed
BaggioWongHK wants to merge 2 commits into
BaggioWongHK wants to merge 2 commits into
Conversation
added 2 commits
October 7, 2026 18:18
The "Open Pull Request" job runs under `bash -l {0}`, which does not
exit on errors. When `git merge main` into an existing release branch
conflicted, the job carried on, regenerated artifacts from the
conflicted template and committed the unfinished merge, conflict
markers included. That is how release-4.6.0 got 59b9f07 and why its
image build then failed.
Abort the merge and fail the job instead, so the conflict is resolved
in a pull request into the release branch before the build reruns.
The failed merge pushes nothing, so the release PR showed no sign of the failure, and only the person who triggered the run (or last edited the nightly schedule) got GitHub's failure email. Comment on the release PR with the conflicting files and the run link instead.
Contributor
Author
|
Closing without merging. The team decided this tooling change is too costly to audit and test relative to its benefit. The conflict this guarded against is prevented instead by a release-runbook step: create the next minor's template on main ( |
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.
Description
The "Open Pull Request" job in
build-image.ymlruns underbash -l {0}, which does not exit on errors. Whengit merge maininto an existing release branch conflicted, the job carried on, regenerated artifacts from the conflicted template and committed the unfinished merge, conflict markers included. That is howrelease-4.6.0got 59b9f07 and why its image build then failed (fixed for 4.6.0 by #1363).This aborts the merge and fails the job instead. Because nothing is pushed, the release PR would otherwise show no sign of the failure, so the job also comments on the release PR with the conflicting files and the run link. Maintainers then resolve the conflict in a pull request into the release branch, merge it, and use "Re-run failed jobs".
Independent of #1372 and #1373; can merge on its own. Squash on merge.
Type of Change
Release Information
How Has This Been Tested?
This workflow only runs in aws/sagemaker-distribution and needs the CodeBuild secrets, so the step's script was run locally under
bash -lagainst a throwaway repo whose release branch conflicts with main, withghand the remote calls stubbed. The step exits 1, leaves the working tree clean, sends nothing to the remote, and posts:The workflow parses as YAML. It has not run on GitHub yet.
Checklist:
Related Issues
#1352, #1363