Allow Charmcraft to upload a rock directly from the file or directly between registries
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and deferred. Implementation tracked via internal Jira ticket CRAFT-2921 and superseded by related work in PR #1685. No direct code changes were merged. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1708 feat: backport rock upload to charmcraft 2.x | charmcraft | merged | Merged a backport enabling Charmcraft 2.7+ to use skopeo URLs directly for OCI image resource uploads. Approved by two reviewers, passed CI, and merged with 414 additions and 34 deletions across 14 files. |