test: failing reproducer - snap developer-id not asserted - #948
Draft
lengau wants to merge 3 commits into
Draft
Conversation
Collaborator
Author
…445) Agent-Logs-Url: https://github.com/canonical/craft-providers/sessions/bef6730a-5abc-4b51-8aec-eedec9432721 Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/craft-providers/sessions/bef6730a-5abc-4b51-8aec-eedec9432721 Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Contributor
Fixed in 5df1922. The change modifies
A helper |
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.
Reproducer for #445
When a snap changes ownership (e.g. transferred from a personal account to an org), the
snap-revisionassertion contains adeveloper-idthat differs from the current publisher. The current code only asserts the publisher's account, not the developer's, causingsnap ackto fail with:Root cause
_get_assertions_file()insnap_installer.pyalways queriesaccount-id=<publisher_id>but never reads thedeveloper-idfield from the snap-revision assertion bytes to also fetchaccount-id=<developer-id>.Fix
Parse the snap-revision assertion to extract
developer-id. If it differs from the publisher-id, also fetch["account", "account-id=<developer-id>"]and include it in the assertion file.Closes #445