Repository navigation
feat: Create new minor templates on main before the first build - #1373
Closed
BaggioWongHK wants to merge 2 commits into
Closed
BaggioWongHK wants to merge 2 commits into
BaggioWongHK wants to merge 2 commits into
Conversation
Since 31c0e14, a new minor's template has been copied from the previous minor during that minor's first build and committed only to its release branch. Main never had it, so nobody editing templates on main could see that the new minor needed their change, and a later port that created the folder on main gave the two branches unrelated copies that conflicted. That is what broke 4.6.0 (#1343, #1361, #1363). Make the copy on main instead: - create-minor-template.yml: when X.Y.0 is published (or on manual dispatch), open a pull request to main that copies vX.Y to vX.(Y+1). The propagation check verifies it is an exact copy. - main.py: _ensure_minor_template_exists no longer copies; it fails and points to that pull request. X.0 still needs a manual template. - build-image.yml: commit only build_artifacts/ to release branches. - CONTRIBUTING.md: describe the new flow. - template_tools.py: add `create` and require_minor_template.
This was referenced Oct 7, 2026
BaggioWongHK
added this pull request to stack #1374
October 7, 2026 20:25
Merge the simplified propagation check from #1372, and drop the create-minor-template workflow and template_tools.py. A new minor's template is created once per minor by someone following the minor release runbook, so a one-line cp in a pull request to main is enough. main.py still refuses to create a missing template, and its error now prints the cp command. CONTRIBUTING.md describes the step.
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
Since 31c0e14, a new minor's template has been copied from the previous minor during that minor's first build and committed only to its release branch. Main never had it, so nobody editing templates on main could see that the new minor needed their change, and a later port that created the folder on main gave the two branches unrelated copies that conflicted. That is what broke 4.6.0 (#1343, #1361, #1363).
This moves the copy to main, as a manual step done once per minor:
main.py:_ensure_minor_template_existsno longer copies. It fails and prints the command to run in a pull request to main, e.g.cp -r template/v4/v4.6 template/v4/v4.7. X.0 still needs a template created by hand.build-image.yml: commit onlybuild_artifacts/to release branches.CONTRIBUTING.md: describes the copy PR, including adiff -rcheck before merging it, so a change to the previous minor that lands while the copy is in review isn't lost.The minor release runbook gets a matching step: when X.Y.0 is released, open the X.(Y+1) copy PR and merge it before the first X.(Y+1).0 build. If that step is skipped, the nightly X.(Y+1).0 build fails with the message above.
Stacked on #1372; merge after it. Squash on merge.
Timing: this needs to merge before 4.6.0 ships. The night after 4.6.0 is published, the nightly starts 4.7.0 and would otherwise create v4.7 on
release-4.7.0again. Either way, open the v4.7 copy PR right after 4.6.0 ships.Type of Change
Release Information
How Has This Been Tested?
_ensure_minor_template_existswas run in isolation: it returns when the template exists, and raises with thecpcommand for 4.7 and the by-hand message for 5.0, without creating anything.src/main.py.test/test_main.pywas not run: it needs the conda environment, and its 8 minor/major artifact tests already fail on main.Checklist:
Related Issues
#1343, #1361, #1363