Allow Charmcraft to upload a rock directly from the file or directly between registries
Metadata
Current evaluation
Direct rock-file and cross-registry uploads were implemented with skopeo in PR #1696 (fb8680ec), then backported to Charmcraft 2.x by PR #1708 (7b86722c).
Resolution: closed resolved
Reason: Merged PR #1696 introduced skopeo-based uploads from OCI archives and registry transport references. PR #1708 subsequently backported rock upload support to the 2.x release line.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Currently charmcraft requires an image digest on the local docker registry to upload an OCI image. When it does that, it extracts the OCI image to a tarball (equivalent to `docker image save`) and then uploads that.
Charmcraft should be able to take a rock file directly. For example:
```
$ charmcraft upload-resource my-charm my-resource ./my-rock_1.0.rock
```
This would do the equivalent of `skopeo copy oci-archive:my-rock_1.0.rock docker://registry.charmhub.io/my-rock:latest`
For copying between registries, Charmcraft should take something like:
```
$ charmcraft upload-resource my-charm my-resource docker://ghcr.io/canonical/charmed-postgresql:14.11-22.04_edge
```
This would do the equivalent of `skopeo copy docker://ghcr.io/canonical/charmed-postgresql:14.11-22.04_edge docker://registry.charmhub.io/my-rock:latest`
We have permission from @sergiusens to replace the current Python-based implementation with `skopeo`, but we must still be able to take:
```
$ charmcraft upload-resource my-charm my-resource --filepath some-file
$ charmcraft upload-resource my-charm my-resource --image 31cf150b4523481202c1ff9b7b5d7f0b36729edad89d61242d8f1eb56b2912c0
```
cc @carlcsaposs-canonical
### Why it needs to get done
Rockcraft outputs files directly
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Direct rock-file and cross-registry uploads were implemented with skopeo in PR #1696 (fb8680ec), then backported to Charmcraft 2.x by PR #1708 (7b86722c). | |
| stealth/space-bunny-alpha | — | closed resolved | Direct rock-file and cross-registry OCI uploads were added with skopeo in merged PR #1696 (commit fb8680ec), while retaining filepath and image-ID uploads. | |
| stealth/space-bunny-alpha | — | closed resolved | Feature request to let Charmcraft upload rocks/files or copy OCI images between registries. Implemented with skopeo: PR #1696 (fb8680ec) on main and backported via PR #1708 (7b86722c) to Charmcraft 2.x. | |
| stealth/space-bunny-alpha | — | closed resolved | Direct rock-file and cross-registry uploads were implemented with skopeo in merged PR #1696 (commit fb8680ec). | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and superseded by PR #1685. The feature enabling direct rock file and cross-registry uploads in charmcraft was addressed through the referenced pull request instead of the proposed skopeo-based workflow. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The request to enable direct rock uploads from files or between registries via skopeo was abandoned, with related functionality tracked in issue #1685. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and superseded by PR #1685. The feature to upload rocks directly from files or between registries using skopeo was addressed via the linked pull request and tracked internally as CRAFT-2921. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. The request was abandoned, with work tracked in Jira CRAFT-2921 and linked to related PR #1685. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#1696
(confidence 99%)
Merged commit fb8680ec implements direct OCI archive and registry-source uploads with skopeo.
-
Likely Fixed By:
canonical/charmcraft#1708
(confidence 97%)
Merged commit 7b86722c backports rock upload support to Charmcraft 2.x.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1708 feat: backport rock upload to charmcraft 2.x | charmcraft | merged | Merged PR #1708 (commit 7b86722c) backporting skopeo-based direct OCI-image resource uploads to Charmcraft 2.7+, letting `upload-resource` pass `docker://` URLs straight to skopeo. |