DFM-4530: guard release-branch publish version line#48
Open
franciscofabian wants to merge 1 commit into
Open
Conversation
Follow-up to the per-MINOR-line hotfix CI (DFM-4530). publish-package-release reuses publish-package, which derives the version from pyproject.toml via codeartifact/timestamp_version, with nothing preventing a stray version bump on a release-vN.M branch from publishing out-of-line artifacts. Add an assert-release-version guard (wired on publish-package-release) that fails the build if pyproject.toml's MAJOR.MINOR drifts from the branch line. Mirrors visualfabriq/vf_initialize_data#261 (Finding 2) and visualfabriq/translate#62. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Follow-up to the per-MINOR-line hotfix CI (DFM-4530). The
publish-package-releasejob reusespublish-package, which derives the published version frompyproject.tomlviacodeartifact/timestamp_version. Nothing prevented a stray version bump on arelease-vN.Mbranch from publishing out-of-line artifacts (e.g. a higher MINOR's timestamp build off an older release line).This adds an
assert-release-versionguard (wired onpublish-package-release) that fails the build ifpyproject.toml's MAJOR.MINOR drifts from therelease-vN.Mbranch line. Mirrors the fix in visualfabriq/vf_initialize_data#261 (Finding 2) and visualfabriq/translate#62.Test plan
mainpublish unaffected (guard defaults off)release-vN.Mbranch with a mismatchedpyproject.tomlversion fails the publishjira: DFM-4530