Packing a bundle produces a zip that is rejected by charmhub
Metadata
Current evaluation
charmcraft 3.x pack produces a bundle zip with metadata.yaml instead of bundle.yaml, so charmcraft upload is rejected by charmhub. A maintainer asked for the charmcraft.yaml on 2025-06-27; no further activity since.
Suggested action: keep open
Reason: A maintainer (lengau) actively triaged on 2025-06-27, asking for the charmcraft.yaml to understand why bundle.yaml is omitted, so the issue is acknowledged and awaiting the reporter's reply. The reporter's follow-up that charmcraft 2.x produces an accepted zip with bundle.yaml confirms a real regression in 3.x packing, not a usage error. It should stay open pending that information.
Impact:
55
Quick Win:
30.25
Staleness:
72
Complexity:
45
Confidence:
60
Support Request:
15
Issue body
### Bug Description
I have a bundle I need to update.
After packing,
```
> unzip -l cos-lite.zip
Archive: cos-lite.zip
Length Date Time Name
--------- ---------- ----- ----
5740 2025-06-20 14:33 README.md
11358 2025-06-20 14:33 LICENSE
2275 2025-06-20 14:35 metadata.yaml
--------- -------
19373 3 files
```
the metadata.yaml file contains what I have in bundle.yaml, but upload fails:
```
> charmcraft upload ./cos-lite.zip
Upload failed with status 'rejected':
- review-error: Missing required file bundle.yaml in bundle
```
### To Reproduce
```bash
git clone https://github.com/canonical/cos-lite-bundle.git
cd cos-lite-bundle
tox -e render-edge
charmcraft pack
charmcraft upload ./cos-lite.zip
```
### Environment
charmcraft 3.4.6 6672
Ubuntu 24.04.2
### charmcraft.yaml
```yaml
Not applicable - it's a bundle.yaml rendered from
https://github.com/canonical/cos-lite-bundle/blob/main/bundle.yaml.j2
```
### Relevant log output
```shell
See above.
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
30.25
Staleness:
72
Complexity:
45
Confidence:
60
Support Request:
15
|
keep open | charmcraft 3.x pack produces a bundle zip with metadata.yaml instead of bundle.yaml, so charmcraft upload is rejected by charmhub. A maintainer asked for the charmcraft.yaml on 2025-06-27; no further activity since. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
45
Confidence:
85
Support Request:
10
|
close stale | Reports a charmcraft pack regression where generated bundles lack bundle.yaml and are rejected by Charmhub. Maintainer requested charmcraft.yaml for diagnosis, but author hasn't responded in over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
50
Confidence:
80
Support Request:
10
|
close stale | charmcraft pack v3.4.6 produces bundle zips missing bundle.yaml, failing Charmhub upload. Maintainer requested charmcraft.yaml for debugging, but no response has been received in over a year. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
50
Confidence:
75
Support Request:
10
|
needs triage | charmcraft pack generates a bundle zip with metadata.yaml instead of bundle.yaml, causing Charmhub upload rejection. Issue lacks labels and maintainer assessment after 10+ months of inactivity. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
40
Confidence:
85
Support Request:
10
|
keep open | charmcraft pack omits bundle.yaml from the generated zip, causing Charmhub upload rejection. Regression from v2.x. Maintainer requested charmcraft.yaml to debug the missing file. Awaiting author input. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #373 Multiple files for packing a bundle is confusing | charmcraft | closed | Request to merge bundle.yaml into charmcraft.yaml was rejected. bundle.yaml is legacy and being replaced by stacks. charmcraft.yaml remains strictly for build-time definitions. Users should construct bundles using the parts syntax with the bundle plugin instead. | |
| #2233 charmcraft should complain if the charm contains a bundle | charmcraft | open | Request for charmcraft pack to warn or fail when a charm root contains a bundle.yaml, since juju then deploys the bundle instead of the charm. No labels, no maintainer response; validation still absent from current pack code. | |
| #1530 Changing charmcraft.yaml doesn't update the resulting charm's metadata.yaml | charmcraft | open | Bug: editing charmcraft.yaml then re-running `charmcraft pack` does not update the resulting charm's metadata.yaml. Filed by a maintainer (lengau); last comment (2024-09-09) says it's unclear if still reproducible. Related open craft-application#821 describes the same 'Already packed' skip behavior. | |
| #1160 `charmcraft pack` does not recognize updated `charmcraft.yaml` file | charmcraft | open | charmcraft pack ignores updated build-snaps channel in charmcraft.yaml without a clean; tracked as a craft-parts bug (canonical/craft-parts#496, still open) awaiting a dependency patch release to pull into charmcraft. | |
| #821 5.5.0 changes pack semantics if the project file has different metadata | craft-application | open | Charmcraft pack skips repacking when only charmcraft.yaml metadata (e.g. summary, config, platforms) changes, leaving a stale .charm. Triaged and moved to craft-application; workaround is clean. Conditional repacking support added in #1111. |