-
Notifications
You must be signed in to change notification settings - Fork 73
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
Multi-arch OCI image incorrectly uploaded to Charmhub registry #1685
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2922.
|
charmcraft 2.7.0 contains a fix for multi-arch OCI images issue: canonical/charmcraft#1685 fix: canonical/charmcraft#1708 However, it fixes it in a "backwards-compatible" way—if the image is available locally, it will still upload it incorrectly. Stop downloading the image locally & always use GHCR so that charmcraft uploads the image correctly This will break on charmcraft < 2.7.0
from testing https://github.com/canonical/postgresql-k8s-operator/actions/runs/9577566037/job/26407018728?pr=490 thank you @lengau! |
is it planned to deprecate the local image upload & remove it in a future charmcraft major version (to avoid mistakes)? |
…#198) charmcraft 2.7.0 contains a fix for multi-arch OCI images issue: canonical/charmcraft#1685 fix: canonical/charmcraft#1708 However, it fixes it in a "backwards-compatible" way—if the image is available locally, it will still upload it incorrectly. Stop downloading the image locally & always use GHCR so that charmcraft uploads the image correctly This will break on charmcraft < 2.7.0
What's currently in Charmcraft 3 is all that's currently planned, though I can see an argument for charmcraft 4 requiring the user to explicitly include |
Bug Description
charmcraft upload-resource
with a multi-arch image (e.g. https://github.com/canonical/charmed-postgresql-rock/pkgs/container/charmed-postgresql/208426154?tag=14.11-22.04_edge) uploads the amd64 image (if running charmcraft on amd64 machine) to the Charmhub registryContext:
https://warthogs.atlassian.net/browse/DPE-4280
https://matrix.to/#/!LhFxJIPEcCacgdMghH:ubuntu.com/$JMmA26BWFkqAKsCJ0tfAx4fpVOSndhej3-CYHwHyBpc?via=ubuntu.com&via=matrix.org
To Reproduce
ghcr.io/canonical/charmed-postgresql:14.11-22.04_edge@sha256:31cf150b4523481202c1ff9b7b5d7f0b36729edad89d61242d8f1eb56b2912c0
)juju deploy
charm on arm64 machineNote: if
juju deploy ./postgresql-k8s.charm --resource postgresql-image=ghcr.io/canonical/charmed-postgresql:14.11-22.04_edge@sha256:31cf150b4523481202c1ff9b7b5d7f0b36729edad89d61242d8f1eb56b2912c0
is used on amd64 or arm64, the charm deploys correctlyEnvironment
Ubuntu 22.04 amd64
charmcraft.yaml
Relevant log output
The text was updated successfully, but these errors were encountered: