← Back to issue list

Include charm revision for upload errors of type already exists in database

View original Github issue

Metadata

Project
charmcraft
Number
#826
Type
issue
State
open
Author
hemanthnakkina
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request to include the charm revision in upload failures reporting "already exists in the database". Maintainer agreed it is a good idea but said Charmhub must expose the revision first (filed Launchpad snapstore-server#1987284); still unresolved.

Suggested action: keep open

Reason: Maintainer facundobatista explicitly triaged this: "It's a good idea. Sadly, it's not 100% up to Charmcraft, we need Charmhub to provide this information. I opened this ticket in the Store." That acknowledgement makes it a validated feature request rather than an untriaged one. Inspection confirms charmcraft only relays the backend text — `UploadCommand.run` in charmcraft/application/commands/store.py prints `error.code`/`error.message` verbatim and the repo contains no "Cannot insert package" or digest-to-revision mapping — so no charmcraft-side fix can land until the Store API changes. Age alone (1513 days, no activity since the 2022 comment) is not grounds to close, but confidence is held down because we cannot verify the current state of the linked Launchpad ticket or whether the Charmhub API has since started returning revision data.

Evaluated by: mr-cal-bot

Impact: 32 Quick Win: 6 Complexity: 50 Confidence: 66 Actionability: 35

Issue body

Is it possible to include charm revision as well if a charm upload fails with error message that says the package already exists in the database? Details: Uploaded a charm which resulted in Gateway Timeout ``` charmcraft upload --release latest/edge --name horizon-k8s horizon-k8s_ubuntu-20.04-amd64.charm Issue encountered while processing your request: [504] Gateway Time-out. Full execution log: '/home/hemanth/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220810-114700.938763.log' ``` Re-uploaded the charm which resulted in error with message package already exists. ``` charmcraft upload --release latest/edge --name horizon-k8s horizon-k8s_ubuntu-20.04-amd64.charm Upload failed with status 'rejected': - review-error: Cannot insert package. An upload with that digest (SHA3-384: '7058526548d07e54d68d8b19f23b89eb9697c3da543e4ab1f207e24f7399aeb214e0671086f9524730181844d993f6ba') already exists in the database. ``` Charmcraft CLI does not provide any mapping of charm revisions with the SHA. How to get the revision number of the charm that is just uploaded? Otherwise the simplest mechanism is to include the revision number in the error message that says 'already exist in the database'. Thoughts?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 32
Quick Win: 6
Complexity: 50
Confidence: 66
Actionability: 35
keep open Feature request to include the charm revision in upload failures reporting "already exists in the database". Maintainer agreed it is a good idea but said Charmhub must expose the revision first (filed Launchpad snapstore-server#1987284); still unresolved.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 6
Complexity: 50
Confidence: 60
Actionability: 40
keep open Feature request to include charm revision in upload error messages when package already exists. Acknowledged by maintainer as a good idea but blocked on Store API changes.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15
Staleness: 55
Complexity: 40
Confidence: 78
Support Request: 10
keep open Feature request to include charm revision number in upload error messages when a package already exists in the database. Maintainer acknowledged and opened snapstore-server bug 1987284; blocked on Charmhub API providing the revision in error responses. No activity in ~1 year.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 15
Confidence: 65
Support Request: 5
keep open Request to include charm revision number in 'already exists' upload error messages. Acknowledged by maintainer as dependent on Charmhub/Store changes; currently awaiting upstream implementation with no recent activity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 15
Confidence: 85
Support Request: 10
close stale Request to include charm revision in upload already exists error messages. Acknowledged by maintainer but deferred to upstream Charmhub/Store. Inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 15
Confidence: 70
Support Request: 10
close stale Feature request to include charm revision in upload error messages when a package already exists. Maintainer acknowledged the idea but noted it depends on the Charmhub backend providing the data, and opened a related ticket there.

Update history

No update history recorded yet.

Related work

  • Blocked By: snapstore-server#1987284 (confidence 90%)

    Maintainer states the work depends on this Charmhub/Store ticket: "we need Charmhub to provide this information. I opened this ticket in the Store." (https://bugs.launchpad.net/snapstore-server/+bug/1987284)

Related issues

No related issues found above the similarity threshold.