fix(promote-charms): verify all revision tags on target commit are provided - #381
Open
xhon-pelushi wants to merge 1 commit into
Open
xhon-pelushi wants to merge 1 commit into
xhon-pelushi wants to merge 1 commit into
Conversation
…ovided Only checking that at least one tag per charm was passed let a partial promotion slip through: if a commit produced more than one revision tag for the same charm (e.g. separate amd64/arm64 revisions), promoting a subset would leave the missed revision behind on the lower channel. Diff revision tags found on the resolved commit against the `revisions` input and fail before promoting if any are missing. Closes canonical#369 Signed-off-by: xhon-pelushi <xhon@pelushi.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.
Fixes #369
_parse_revision_tagsonly validated that at least one revision tag wasprovided per charm found in the repo. It didn't check whether the
resolved commit had other revision tags (e.g. a second build/arch
revision for the same charm) that were silently left out of the
revisionsinput — the "amd64 provided, arm64 not" scenario raised in#366 (discussion_r3137318781).
This adds a check that diffs revision tags found on the resolved commit
against the
revisionsinput, and fails before promoting if any aremissing, so a partial promotion can't happen by mistake.
Test plan
(two revision tags on one commit, one on another): a partial
promotion input correctly flags the missing tag; a complete input
passes with nothing flagged.
ruff check(project's ownpyproject.tomlconfig) — no newfindings introduced by this change.
promote-charmsentry point end-to-end(needs charmcraft + live Charmhub access).