← Back to issue list

`charmcraft init --profile machine` doesn't produce `config.yaml`

View original Github issue

Metadata

Project
charmcraft
Number
#1139
Type
issue
State
closed
Author
tmihoc
Labels
good first issue
Created
Updated
Closed

Current evaluation

Fixed in canonical/charmcraft#1149 via commit ca4df024: machine init now uses charmcraft.yaml and no longer tells users to edit metadata.yaml or config.yaml.

Resolution: closed resolved

Reason: PR #1149, commit ca4df024, updated initialization to scaffold a unified charmcraft.yaml only and removed metadata.yaml and config.yaml from the files users were told to edit.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Fixed in canonical/charmcraft#1149 via commit ca4df024: machine init now uses charmcraft.yaml and no longer tells users to edit metadata.yaml or config.yaml.
stealth/space-bunny-alpha — closed resolved Reported that `charmcraft init --profile machine` told users to edit config.yaml that was never generated. Fixed by PR #1149 (commit ca4df024): init now scaffolds a unified charmcraft.yaml only, and no longer lists metadata.yaml/config.yaml.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1149 (commit ca4df024): charmcraft init now uses charmcraft.yaml only, and its output no longer instructs users to edit config.yaml or metadata.yaml.
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.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1149 (confidence 99%)

    The linked PR updated the machine-charm initialization flow and resolved the incorrect config.yaml guidance.

Related issues

Issue Project State Summary Similarity
#2167 charmcraft init --profile machine does not produce a valid charmcraft.yaml charmcraft closed Fixed by #2200 (commit c4d43add), which migrated the machine init template from legacy bases syntax to platforms.
83%
#1259 Init output issue charmcraft closed Fixed by merged PR #1149 (commit ca4df024): machine-profile init no longer advertises nonexistent config.yaml and metadata.yaml after adopting charmcraft.yaml.
79%
#328 charmcraft init produces error charm for machine charms charmcraft closed Machine charms gained a dedicated charmcraft init profile, resolving Kubernetes-only initialization; the change was merged in PR #868 (commit 2ed9033c).
76%
#1149 command: charmcraft init to use charmcraft.yaml only charmcraft merged Merged in ca4df024: charmcraft init now generates a unified charmcraft.yaml containing metadata, actions, and config, with profile descriptions and an updated URL.
75%
#868 Added a machine profile to init command (CRAFT-1046). charmcraft merged Merged PR #868 added a machine profile to charmcraft init, resolving #568 and #593; merge commit: a6c21119.
75%
#966 `charmcraft init --help` doesn't list the available profiles charmcraft closed Fixed by merged PR #2311 (commit c24c0f47): charmcraft init help now lists Kubernetes, machine, and supported 12-factor profiles.
72%