`charmcraft init --profile machine` doesn't produce `config.yaml`
Metadata
Current evaluation
Fixed in PR #1149. The machine charm init template and output were updated to remove config.yaml and metadata.yaml from the default files, now directing users to only edit charmcraft.yaml.
Suggested action: —
No scores available.
Issue body
### Bug Description
The `charmcraft init --profile machine` command output says to edit, among other things, the `config.yaml` file. However, when you inspect the files it has generated, there is no `config.yaml` file.
### To Reproduce
1. Run `charmcraft init --profile machine`.
2. Inspect the files this has generated.
### Environment
Charmcraft 2.3.0 on Multipass VM running Ubuntu 22.04
### charmcraft.yaml
```shell
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
```
### Relevant log output
```shell
$ charmcraft init --profile machine
Charmed operator package file and directory tree initialised.
Now edit the following package files to provide fundamental charm metadata and other information:
metadata.yaml
config.yaml
src/charm.py
README.md
$ ls
CONTRIBUTING.md README.md metadata.yaml requirements.txt tests
LICENSE charmcraft.yaml pyproject.toml src tox.ini
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed in PR #1149. The machine charm init template and output were updated to remove config.yaml and metadata.yaml from the default files, now directing users to only edit charmcraft.yaml. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via PR #1149. The misleading init output message was updated to only list charmcraft.yaml for editing, removing metadata.yaml and config.yaml from the default machine charm template. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via merged PR #1149. The misleading init message was updated to remove references to config.yaml and metadata.yaml, as they are no longer generated in the default machine charm template. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved via PR #1149 by updating charmcraft init output to remove references to config.yaml and metadata.yaml. The default machine template no longer generates these optional files, directing users to edit charmcraft.yaml instead. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved via PR #1149. Updated charmcraft init to only prompt editing charmcraft.yaml, removing the misleading suggestion to edit the now-optional config.yaml and metadata.yaml from the default template. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1259 Init output issue | charmcraft | closed | Fixed in PR #1149. The charmcraft init command for the machine profile incorrectly instructed users to edit a non-existent config.yaml file. Output instructions were corrected to reflect the actual generated files. | |
| #2167 charmcraft init --profile machine does not produce a valid charmcraft.yaml | charmcraft | closed | Closed and converted to a feature request. The machine profile template uses the legacy bases key, causing validation failures on newer versions. Resolution involves updating templates to use the platforms key. | |
| #966 `charmcraft init --help` doesn't list the available profiles | charmcraft | closed | Fixed in pull request #2311. The charmcraft init help output now correctly lists all available profiles, resolving the usability concern. | |
| #328 charmcraft init produces error charm for machine charms | charmcraft | closed | Closed without resolution. Maintainers acknowledged the core issue persists: charmcraft init still lacks a machine charm template or flag, leaving machine charm workflows unsupported despite claims that metadata changes fixed it. | |
| #1128 `charmcraft init`: issues with --profile docs, default profile, and default charm.py links | charmcraft | closed | The outdated charm.py link was updated to official documentation via PR #1158, closing the issue. Profile documentation improvements were acknowledged but not implemented. | |
| #1149 command: charmcraft init to use charmcraft.yaml only | charmcraft | merged | Merged after review. Updated charmcraft init to use a unified charmcraft.yaml by default, replacing separate metadata, actions, and config files. Added profile descriptions and updated URLs. Initially blocked but eventually merged. |