You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Charmcraft 3 doesn't accept digests, just image IDs, when uploading a resource.
Solution: Reimplement this method on the ImageService. It can use Docker's images.list() method and find the digest under image.attrs["RepoDigests"]. Note that these digests are in <name>@<hash-algo>:<hash> form, so you'll need to check if it matches a regex something like ".+@([a-z0-9]+:)?{digest}" (so it works with just the hash or algo:hash).
Bug Description
Charmcraft 3 doesn't accept digests, just image IDs, when uploading a resource.
Solution: Reimplement this method on the ImageService. It can use Docker's images.list() method and find the digest under
image.attrs["RepoDigests"]
. Note that these digests are in<name>@<hash-algo>:<hash>
form, so you'll need to check if it matches a regex something like".+@([a-z0-9]+:)?{digest}"
(so it works with just the hash or algo:hash).To Reproduce
See: https://discourse.charmhub.io/t/publish-your-charm-on-charmhub/12281/6?u=lengau
Environment
n/a
charmcraft.yaml
n/a
Relevant log output
$ charmcraft upload-resource loki-worker-k8s loki-image --image=sha256:583ddc10f52bb4fe4806baa05ecbaa2a3246238f1423bd2a6c35b02fd87b446c Unknown OCI image reference. Recommended resolution: Pass a valid container transport string. Full execution log: '/home/jose/.local/state/charmcraft/log/charmcraft-20240801-171905.784405.log'
The text was updated successfully, but these errors were encountered: