Repository navigation
fix(smoke-test): idempotent release pipeline across candidate→final - #614
Merged
Merged
Conversation
…ding Treat a re-run of finalize against a version this tool already dated (the linked ## [X.Y.Z](…) - YYYY-MM-DD form) as a no-op, so candidate→final on one base version no longer errors on a reused release branch. Refs: #612
Fold an existing ## [X.Y.Z] section (TBD or dated) back into the freshly frozen Unreleased content and drop it, so re-preparing the same base version on a reused release branch yields a single ## [X.Y.Z] - TBD heading. Refs: #612
Add reset_version_to_tbd() and the 'reset-version' CLI subcommand to revert a dated ## [X.Y.Z] heading back to the - TBD placeholder. Idempotent (no-op when already TBD or absent), so a dispatch can normalize a reused release branch before prepare/release run. Refs: #612
… base version - repository-dispatch.yml: scope the deploy-seed verification to the Unreleased section so a bullet stranded in a stale [X.Y.Z] section can no longer mask an un-seeded Unreleased. - prepare-release.yml: run prepare-changelog reset-version before prepare to normalize a dated [X.Y.Z] heading back to TBD at freeze time. Refs: #612
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
Makes the smoke-test release pipeline idempotent when one base version
X.Y.Zisexercised by both a candidate pass (
X.Y.Z-rcN) and a final pass (X.Y.Z).Previously the
## [X.Y.Z]CHANGELOG heading could end up dated before thedownstream
release-corevalidation (which requires the## [X.Y.Z] - TBDplaceholder), failing with
does not contain '## [X.Y.Z] - TBD'and requiringmanual CHANGELOG recovery (as happened for 0.3.7).
Defense-in-depth across the Python SSoT (
vig-utils) and the synced workflowtemplates.
Type of Change
fix-- Bug fixChanges Made
prepare_changelog.py(vig-utils, the tested SSoT):finalizeis now a no-op when the version heading is already dated (thelinked
## [X.Y.Z](…) - YYYY-MM-DDform this tool writes), instead of erroring.A plain historical dated heading is still rejected.
preparededupes an existing same-version heading (TBD or dated): it foldsthe existing section's bullets back into the freshly-frozen content and drops it,
yielding exactly one
## [X.Y.Z] - TBDheading instead of stacking a duplicate.reset-version <version>command reverts a dated heading back to- TBD(idempotent; no-op when already TBD or absent).
Synced workflow templates:
repository-dispatch.yml: the post-seed verification is now scoped to the## Unreleasedsection (awk), so a bullet stranded in a stale[X.Y.Z]section can no longer mask an un-seeded Unreleased.
prepare-release.yml: runsprepare-changelog reset-versionimmediately beforeprepare, normalizing a dated heading to- TBDat freeze time (in-container,where the CLI is on PATH).
Changelog Entry
Fixed
prepare-changelog finalizeis now a no-op when the version heading is already dated, instead of erroringprepare-changelog preparefolds an existing same-version heading back into a single## [X.Y.Z] - TBDsection instead of stacking a duplicateprepare-changelog reset-version <version>command reverts a dated heading back to- TBD(idempotent); the smoke-test dispatch template runs it at dispatch start and scopes its deploy-seed check to theUnreleasedsectionTesting
just test)Manual Testing Details
uv run pytest), ruff check + format clean.test:commit, then afix:commit.(prior) finalize dates it →
reset-versionreverts to TBD → prepare again yieldsa single heading →
finalizetwice both succeed (idempotent), leaving a datedheading and zero leftover
TBDfor the version.[X.Y.Z]section correctlyfails the seed check, while a properly-seeded Unreleased passes.
Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
the next release ships these changes and a real downstream candidate→final smoke
run passes. Hence
Refs:(notCloses:) below.vig-os/devcontainer-smoke-test(downstream tracking issue [FEATURE] Smoke-test repository to validate shipped CI/CD workflows #169) by bumping it tothe new devcontainer tag, then run
publish-candidate+finalize-releaseon thesame base version to confirm green.
reset-versioncall lives inprepare-release.yml's in-container freeze step rather than therepository-dispatch.ymldeploy job, because that job runs on plainubuntu-24.04(no
prepare-changelogon PATH). Thepreparededupe covers the same case at thePython layer regardless.
Refs: #612