← Back to issue list

Do not require the filepath in charmcraft upload

View original Github issue

Metadata

Project
charmcraft
Number
#312
Type
issue
State
closed
Author
facundobatista
Labels
—
Created
Updated
Closed

Current evaluation

Automatic upload-path discovery was rejected; charmcraft upload keeps requiring an explicit filepath because bases builds may create multiple, complexly named artifacts.

Resolution: closed not a bug

Reason: In the closing maintainer comment dated 2022-03-07, facundobatista explained that bases support could produce many artifacts with complex names, so explicit path selection remained preferable. No path-inference implementation was made.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The `upload` command currently requires the filepath. But it can be guessed in some situations. So if the user specifies the filepath, honor it, but if it doesn't, search for the file in the project's directory. This should work for "charm" and "bundles". We need to decide how "findable" would be the built files once we change the file names to include architecture and other metadata (see issue #30). (this issue is created after #194, specifically the following paragraph: *if we can actually use a metadata.yaml, then providing a path to the metadata.yaml, or a path to a directory with a metadata.yaml, would work. If there are multiple architecture builds in that directory in future then we could either try to upload them all or abort with a list and tell the user to be more specific.* )

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Automatic upload-path discovery was rejected; charmcraft upload keeps requiring an explicit filepath because bases builds may create multiple, complexly named artifacts.
stealth/space-bunny-alpha — closed not a bug Path auto-detection was rejected; charmcraft upload will keep requiring an explicit filepath because bases builds can produce multiple artifacts with complex names.
qwen3.6-35b-a3b-mtp-q6 — — Rejected. The maintainer closed the issue, noting that bases support allows pack to generate multiple files with complex names, making auto-detection unfeasible. Explicit filepaths will remain required.
qwen/qwen3.6-35b-a3b — — Rejected. Maintainer decided against auto-detecting upload filepaths after bases support was added, as pack can generate multiple files with complex names. Explicit filepaths will remain required.
qwen/qwen3.6-35b-a3b — — Rejected. Automatic filepath guessing for the upload command was deemed unfeasible after bases support enabled producing multiple files with complex names. The maintainer decided to keep requiring explicit filepaths for clarity and closed the issue.
qwen3.6-35b-a3b-mtp-q6 — — Rejected. Bases support now allows the pack command to generate multiple files with complex names, making auto-detection unreliable. The maintainer decided to keep the filepath requirement explicit.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#194 (confidence 98%)

    The earlier upload-path design discussion directly prompted #312.

Related issues

Issue Project State Summary Similarity
#194 charmcraft upload should take a path directly charmcraft closed Positional upload paths were implemented; automatic charm-file discovery was split into #312 and rejected because bases builds may produce multiple complex artifacts.
79%