← Back to issue list

`charmcraft upload` should allow a user to also release the charm

View original Github issue

Metadata

Project
charmcraft
Number
#1979
Type
issue
State
open
Author
lucabello
Labels
Created
Updated
Closed

Current evaluation

Feature request to add --release flag to charmcraft upload command. The --release flag is already implemented (PR #255), but auto-uploading resources from upstream-image field in charmcraft.yaml remains unimplemented. Last activity Feb 2025.

Suggested action: close not a bug

Reason: The primary feature requested (adding --release flag to upload command) is already implemented in PR #255 and visible in current code (store.py line 587) and docs (manage-the-current-charmhub-user.rst line 128). The remaining auto-resource-upload from upstream-image field is a separate feature that should be tracked as its own issue.

Impact: 40 Quick Win: 24.0 Staleness: 55 Complexity: 40 Confidence: 75 Support Request: 10

Issue body

### What needs to get done Currently, to release a charm you have to: ``` charmcraft upload <.charm> # note down the revision number charmcraft upload-resource <resource> # note down the revision number charmcraft release ... ``` We should have a way to release a charm right after uploading it; the resource can be uploaded automatically according to the `upstream-image` field in `charmcraft.yaml`. The approached discussed with @lengau would be to add `--release=latest/edge` flag to the `upload` command. Another option could be to introduce a new command that does both the update and release together. An example would be something like: ``` `charmcraft upload prometheus.charm prometheus-k8s --resource=prometheus-image:ubuntu/prometheus:9 --release=latest/edge` ``` ### Why it needs to get done In CI, releasing a charm currently translates to those three commands with weird parsing of the revision numbers, and the manual process is extremely error-prone.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 24.0
Staleness: 55
Complexity: 40
Confidence: 75
Support Request: 10
close not a bug Feature request to add --release flag to charmcraft upload command. The --release flag is already implemented (PR #255), but auto-uploading resources from upstream-image field in charmcraft.yaml remains unimplemented. Last activity Feb 2025.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Feature request to add a --release flag to charmcraft upload for combining upload and release in CI. Currently has an internal ticket but lacks public triage and prioritization.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 70
Support Request: 10
keep open Feature request to add a --release flag to charmcraft upload for streamlined CI workflows. Currently inactive for over a year with no maintainer implementation, though a community workaround exists.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 80
Support Request: 5
needs triage Feature request to add a --release flag to charmcraft upload, simplifying CI workflows by combining upload and release steps. Currently unlabelled and unassessed by maintainers.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 40
Confidence: 80
Support Request: 10
keep open Feature request to add a --release flag to charmcraft upload for automatic charm and resource release, streamlining CI workflows. Currently under discussion with an internal ticket created and a temporary workaround script in use. Awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#255 (confidence 85%)

    PR #255 'upload-with-release' added the --release option to the upload command, which is the core feature requested in this issue.

Related issues

Issue Project State Summary Similarity
#847 Improve the 'release' response when resources are automatically released with the charm charmcraft open Request to enhance the 'charmcraft release' command output to list resources that Charmhub automatically attaches when a revision is released without explicit --resource flags. Store-side fix was released in 2022, but the client-side message enhancement remains unimplemented.
74%
#368 feature request: charmcraft release=last-revision charmcraft closed Closed as already implemented. The requested auto-release feature already exists via the --release flag on the upload command, as noted by a maintainer. No code changes were needed.
73%
#1313 Make it easier to release charms in CI and in general charmcraft open Feature request to upload and release a charm plus its OCI resources in one command without tracking integer revision IDs. Skopeo integration landed, but upload --resource still requires name:revision format. Maintainers acknowledge it remains applicable and UX is being considered across crafts.
72%
#457 Allow including resources when releasing charms directly in the upload command (CRAFT-381). charmcraft merged Merged. Enables including resources when releasing charms via the upload command, fixing issue #456 and CRAFT-381. Approved by two reviewers with 63 additions across three files. Maintainers prioritized CI workflow improvements.
70%
#255 Add the option to release when uploading a charm or bundle charmcraft merged Merged to add an option for releasing charms or bundles during upload. Approved by one reviewer, the change modifies three files with 80 additions and 8 deletions.
70%