charmcraft init produces error charm for machine charms
Metadata
Current evaluation
Machine charms gained a dedicated charmcraft init profile, resolving Kubernetes-only initialization; the change was merged in PR #868 (commit 2ed9033c).
Resolution: closed resolved
Reason: PR #868 added a machine-specific profile for charmcraft init and was merged as a6c21119, with implementation commit 2ed9033c. It directly addressed the inability to initialize machine charms.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### description
I'm having a really bad experience from starting charming with charmcraft.
The default charm created as part of a "charmcraft init" seems defaulted to a kubernetes charm, which means that for anyone like me - still working on machine charms - the produced charm is broken from start and needs to be heavily modified to get running.
Consider new charmers. They will be stuck from start and giving up here.
The produced charm from "charmcraft init" should NEVER fail as this destroys the experience from anyone trying to get started on juju.
**Please create a charm that works from start regardless if you are working on a K8 or machine charm.**
Since K8 charms and Machine charms are so different, it should be two different default charms created I guess. So, charmcraft init should really take that into consideration.
### version used
charmcraft 1.0.0 403 latest/beta canonical✓ -
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Machine charms gained a dedicated charmcraft init profile, resolving Kubernetes-only initialization; the change was merged in PR #868 (commit 2ed9033c). | |
| stealth/space-bunny-alpha | — | closed stale | Closed unresolved after a maintainer confirmed charmcraft init still generated only Kubernetes charms; no machine-charm template or init option was provided. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without implementing machine-charm templates or init options for charmcraft; a maintainer confirmed that init still generated only Kubernetes charms. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | 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. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as resolved after removing the series keyword from metadata.yaml. The core request to add --vm or --k8s flags for charmcraft init was not implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. A maintainer closed the issue claiming it was fixed by removing the series keyword from metadata.yaml, but the contributor clarified the core problem persists: charmcraft init still defaults to Kubernetes charms, leaving machine charm templates broken. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. A maintainer claimed removing the series field fixed the problem, but another noted the core issue remains: charmcraft init still defaults to Kubernetes and lacks machine charm support. The request was abandoned. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#868
(confidence 99%)
Merged init-machine-profile work added the requested machine-charm template.
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. | |
| #1139 `charmcraft init --profile machine` doesn't produce `config.yaml` | charmcraft | closed | 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. | |
| #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. | |
| #568 Add a `charmcraft init` template for machine charms | charmcraft | closed | The machine-charm init-template request was closed without a linked fix after the March 2022 discussion; later profile work is not tied to its closure. | |
| #91 First pass at 'charmcraft init' | charmcraft | merged | Merged PR #91 delivered the first non-interactive charmcraft init scaffolding implementation; README improvements, extra options, and prompts were deferred (commit 0ebd9f87). | |
| #1128 `charmcraft init`: issues with --profile docs, default profile, and default charm.py links | charmcraft | closed | PR #1158 (commit 5b50d9e6) documented init profiles and replaced the outdated charm.py link; the default Kubernetes profile was left unchanged. | |
| #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. | |
| #238 `charmcraft init` creates broken charm | charmcraft | closed | Superseded by charmcraft#247, a planned overhaul of init templates and generated tests; #247 later closed without implementing its proposed guard against building incomplete templates. | |
| #2436 ci: check charms generated by `charmcraft init` | charmcraft | merged | Merged PR #2436 added dedicated Spread coverage to verify charms generated for Kubernetes and machine profiles pass linting and unit tests. | |
| #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. |