The upload-resource command should accept images id or digests
Metadata
Current evaluation
Merged PR #871 resolved support for OCI image IDs and digests in upload-resource, improving local ID handling and missing-image errors.
Resolution: closed resolved
Reason: PR #871 was merged in commit cefabea2, with implementation commit efbcbe87 adding support for both OCI image IDs and digests. Later PR #908 refined digest-based image lookup.
Evaluated by: mr-cal-bot
No scores available.
Issue body
(all this is for OCI images, file resources are fine)
Currently is mixed: accepts "ids" (and no point in checking remotely in that case) but the docs say "digest".
It should:
- accept "id" or digest, these two should be fine: `charmcraft upload-resource mychar myresource ...`
`--image=3e42dd4e79c7`
`--image=sha256:9bc34afe08ca30ef179404318cdebe6430ceda35a4ebe4b67d10789b17bdf7c4`
- the distinction between id or digest should happen checking if it starts with `sha`
- if it's an ID
- just upload from local (no point in checking remotely); however inform it in "debug"
- get the image info from local dockerd as it currently does
- if it's a Digest
- do the "check remote, if not there check local" dance as today
- get the image info from local dockerd searching *all* the images (`/images/json`) and checking which one (if any) has the indicated digest in one of the `RepoDigests` items
- command documentation should be improved to reflect this
- forum post about uploading resource should also be improved
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #871 resolved support for OCI image IDs and digests in upload-resource, improving local ID handling and missing-image errors. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged PR #871 (merge commit cefabea2): OCI upload-resource now accepts both local image IDs and digests, with faster ID handling and clearer missing-image errors. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or linked pull requests. The feature request to support both image IDs and digests in upload-resource was abandoned. No resolution or implementation details were provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The request to update upload-resource to accept both image IDs and digests was abandoned due to prolonged inactivity. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. The feature request to allow the upload-resource command to accept image IDs or digests was abandoned. No linked PRs or resolution details were provided. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#871
(confidence 100%)
Merged fix implementing image ID and digest support for upload-resource.
-
Related To:
canonical/charmcraft#908
(confidence 85%)
Follow-up fix for retrieving local image information by repository digest.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #871 Support both image id and digest when uploading oci-image resources (CRAFT-1324). | charmcraft | merged | Merged in canonical/charmcraft#871 via commit cefabea2, adding OCI image ID and digest support, faster local-ID handling, clearer missing-image errors, and resolution of #853. | |
| #1952 Fix docs and help messages about OCI image uploads | charmcraft | open | Docs/help for `upload-resource --image` are outdated: manage-resources.rst and the CLI help still claim only sha256 digests or local image IDs are accepted, while the code now supports OCI archives, directories, and any skopeo transport string. | |
| #908 Fix for getting image info from digest | charmcraft | merged | Merged PR #908 fixes OCI image lookup when Docker returns RepoDigests as None, adds a regression test, and clarifies upload-resource image ID help text. | |
| #444 unable to upload oci-image resource from dockerhub using image digest | charmcraft | closed | Closed by maintainer facundobatista as superseded: charmcraft 1.1.1 (in candidate at the time) reworked OCI uploads to push images from the local machine and always reference them by digest, so the reported remote-digest limitation no longer applied. |