← Back to issue list

Upload resources on charmcraft upload when specified as upstream-resource in the metadata file

View original Github issue

Metadata

Project
charmcraft
Number
#839
Type
issue
State
closed
Author
arturo-seijas
Labels
Created
Updated
Closed

Current evaluation

Rejected. Maintainers declined automatic resource uploads to prevent copying third-party images to Canonical's registry and avoid inefficient uploads. Developers should script the process using Charmcraft's CLI.

Suggested action:

No scores available.

Issue body

Resources source can be specified in the metadata.yaml as `upsteam-source` but they still need to be published by running the `charmcraft upload-resource` command. Here's a snippet of a resource with with this specified: ``` resources: nginx-prometheus-exporter-image: type: oci-image description: Prometheus exporter for nginx auto-fetch: true upstream-source: nginx/nginx-prometheus-exporter:0.10.0 ``` Under this scenario, the resource and the charm share their life-cycle, so it would make sense to be able to publish both the charm and the resource by running the `charmcraft upload`command. This would improve developer experience and could help control dangling images when the charm upload fails after a successful resource upload, a common scenario when publishing via CI. Thank you!

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Rejected. Maintainers declined automatic resource uploads to prevent copying third-party images to Canonical's registry and avoid inefficient uploads. Developers should script the process using Charmcraft's CLI.
qwen/qwen3.6-35b-a3b Rejected. Maintainers declined automatic resource uploads to avoid copying third-party images to Canonical's registry, ensure developer control, and prevent inefficiency. Scripting Charmcraft's outputs is recommended instead.
qwen3.6-35b-a3b-mtp-q6 Rejected. Charmcraft will not auto-upload OCI resources with upstream-source during charm uploads to prevent copying third-party images and ensure efficiency. Developers can script Charmcraft's outputs to replicate the workflow.
qwen3.6-35b-a3b-mtp-q6 Rejected. Maintainers declined to auto-upload OCI resources during charm uploads to prevent copying third-party images to Canonical's registry and avoid unnecessary overhead. Developers are advised to script Charmcraft's programmatic outputs instead.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#840 Add command line options to charmcraft upload to enable publishing the charm and its resources with a single command run charmcraft closed The request to atomically upload charms and new resources was declined. Maintainers cited complexity and Charmhub's two-step upload inefficiency, recommending external scripts instead. The issue was closed without implementation.
75%
#1953 Charmcraft 3 should still accept image digests for `upload-resource` charmcraft open Charmcraft 3 `upload-resource` rejects bare image digests (e.g. sha256:…) that charmcraft 2 accepted; the ImageService lacks a digest-based lookup via RepoDigests. Unlabeled, no maintainer response, only a bot Jira-sync comment.
71%