Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return after single arch push #4977

Merged
merged 2 commits into from Nov 6, 2023
Merged

Conversation

djeremiah
Copy link
Contributor

@djeremiah djeremiah commented Nov 6, 2023

When running crossplane xpkg push with a package built with a single architecture, the push command mistakenly falls through to the code block that adds an index to the manifest list. If done with a package built on anything other than linux/amd64, this confuses the package manager later, which will error out with a message like the following:

0s Warning ParsePackage configurationrevision/platform-ref-apigateway-187041da383f cannot initialize parser backend: failed to fetch package from remote: no child with platform linux/amd64 in index index.docker.io/steve/platform-ref-apigateway:v0.1.0

This PR adds a return statement inside the len(c.PackageFiles) == 1 case.

Fixes #4980

@djeremiah djeremiah requested review from phisco and a team as code owners November 6, 2023 22:08
cmd/crank/xpkg/push.go Outdated Show resolved Hide resolved
Signed-off-by: Murph <murph@opusdavei.org>
Signed-off-by: Murph <murph@opusdavei.org>
Copy link
Member

@negz negz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Can you update the description with a little more info on the bug this fixes, it’ll help with release notes. We’ll need to ship a patch release to fix this.

@negz negz merged commit 9d7129a into crossplane:master Nov 6, 2023
16 of 18 checks passed
Copy link

github-actions bot commented Nov 6, 2023

Successfully created backport PR for release-1.14:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crossplane xpkg push results in 2 packages pushed and one has "--" appended to it
2 participants