Request: be able to specify the location of metadata.yaml (and the rest of the charm code)
Metadata
Current evaluation
Resolved in Charmcraft 3.0 by merged PR canonical/charmcraft#1524 (commit 9988b7db), preserving metadata.yaml generated by the charm tool for reactive charms.
Resolution: closed resolved
Reason: PR #1524 was merged in commit 9988b7db and released with Charmcraft 3.0. Reactive charms can remain in a subdirectory without symlinking metadata.yaml to the repository root.
Evaluated by: mr-cal-bot
No scores available.
Issue body
In repositories such as https://git.launchpad.net/charm-grafana for reactive charms, it is possible to charmcraft pack the charm using:
```yaml
type: charm
parts:
charm:
source: src
plugin: reactive
build-snaps: [charm]
bases:
- name: ubuntu
channel: "20.04"
architectures: ["amd64"]
```
Note that `source: src` is specified because we put the charm in a `src` directory. When we build the charm using reactive tools we run `charm build src/`. Currently, in order to use charmcraft and the recipe in Launchpad "create charm recipe" I need to have charmcraft.yaml in the root of the repo, and that requires me to symlink metadata.yaml to the root also so that charmcraft can find it.
I'd like to be able to specify in charmcraft.yaml where the metadata.yaml is to be found - I'd have expected it to be located in the `source:` directive of the reactive plugin.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved in Charmcraft 3.0 by merged PR canonical/charmcraft#1524 (commit 9988b7db), preserving metadata.yaml generated by the charm tool for reactive charms. | |
| stealth/space-bunny-alpha | — | closed resolved | Reactive charms no longer need to relocate metadata.yaml with Charmcraft 3.0, which uses metadata generated by the charm tool; fixed in canonical/charmcraft#1524. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1524. Charmcraft 3.0 removes the need to specify metadata.yaml location for reactive charms by automatically using the metadata generated by the charm tool. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in #1524 and released in charmcraft 3.0. The requested config option was replaced by automatically using the metadata.yaml generated by the charm tool, removing the need to specify paths or create symlinks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1524. The feature is no longer required for reactive charms in charmcraft 3.0, which now automatically uses the metadata.yaml generated by the charm tool. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#1524
(confidence 99%)
Merged fix prevents Charmcraft from replacing metadata generated by charm build; the maintainer explicitly cited it as the resolution in Charmcraft 3.0.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2874 feat: mediate creation of metadata.yaml | charmcraft | merged | PR #2874 merged to charmcraft main (2 approvals): implements craft-application's package service API so metadata.yaml creation is mediated in Charm/rock layers, tracking CHARMCRAFT-723. | |
| #2856 Implement metadata mediation for metadata.yaml | charmcraft | closed | Fixed by merged charmcraft PR #2874, which added a craft-application package service to mediate metadata.yaml creation. | |
| #570 Update metadata.yaml.j2 | charmcraft | merged | Merged #570 in commit f690f605, updating metadata.yaml.j2 with a more complete charm metadata reference link. | |
| #1666 fix: only keep metadata.yaml for reactive charms | charmcraft | merged | Merged #1666 (b2b127e6), retaining metadata.yaml only for reactive charms so non-reactive repacks no longer carry stale integration metadata; fixes #1654. | |
| #1126 Allow use actions/config/metadata in charmcraft.yaml | charmcraft | merged | Merged in canonical/charmcraft#1126 (044b94f8), adding inline actions, config, and ST087-compliant metadata support when standalone YAML files are absent. | |
| #1122 config: make metadata.yaml file optional | charmcraft | closed | Closed unmerged and superseded by #1126, merged as 044b94f8 to support actions, config, and metadata directly in charmcraft.yaml when separate YAML files are absent. |