← Back to issue list

Charmcraft 2.4.0 is stricter about reactive part names

View original Github issue

Metadata

Project
charmcraft
Number
#1360
Type
issue
State
closed
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Resolved by renaming the top-level reactive part to charm in charmcraft.yaml. Version 2.4.0 enforces this name for proper layer merging. The reporter applied the configuration fix and closed the report as a documented requirement.

Suggested action:

No scores available.

Issue body

### Bug Description See original report on Charmhub discourse by @cjwatson: [charmcraft 2.4.0 is stricter about reactive part names](https://discourse.charmhub.io/t/charmcraft-2-4-0-is-stricter-about-reactive-part-names/11303) > A number of Launchpad’s charms are still using the reactive framework for reasons I won’t go into right now. We noticed that they were misbuilding with charmcraft 2.4.0: in the packed charm, config.yaml and other similar top-level files were just copies of those files from the topmost layer, rather than correctly merging information from all layers. This looked very much like [charmcraft#1150](https://github.com/canonical/charmcraft/issues/1150), except that for us it was a new occurrence of that bug in a release that was supposed to fix it. > On closer inspection, I found that the problem is because we were calling our top-level parts something other than charm. I’d interpreted that part of the [documentation](https://juju.is/docs/sdk/charmcraft-yaml#heading--the-reactive-plugin) as a placeholder, but in fact it seems that it has functional importance. I’ve applied changes to all our charms along the lines of [this merge proposal](https://code.launchpad.net/~cjwatson/lp-archive/+git/lp-archive/+merge/448500), and I’ve checked that there are no other charmcraft.yaml files on my laptop with the same bug, but one of my team mentioned that it might be worth posting about it more widely in case anyone else runs into the same problem; I agree. ### To Reproduce https://code.launchpad.net/~cjwatson/lp-archive/+git/lp-archive/+merge/448500 ### Environment Launchpad builds ### charmcraft.yaml ```shell See: https://code.launchpad.net/~cjwatson/lp-archive/+git/lp-archive/+merge/448500 ``` ### Relevant log output ```shell N/A ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Resolved by renaming the top-level reactive part to charm in charmcraft.yaml. Version 2.4.0 enforces this name for proper layer merging. The reporter applied the configuration fix and closed the report as a documented requirement.
qwen/qwen3.6-35b-a3b Closed. The reporter resolved the build failures by renaming top-level parts to charm and warned the community. No upstream code changes were made as the stricter validation is intentional.
qwen/qwen3.6-35b-a3b Closed without code changes. charmcraft 2.4.0 enforces strict naming for reactive plugin parts, requiring the name charm. The author updated their charms and shared the fix to warn others. No upstream changes were made.
qwen3.6-35b-a3b-mtp-q6 Charmcraft 2.4.0 enforces "charm" as the required name for reactive plugin parts to ensure proper config merging. The issue closed without code changes; resolution required renaming top-level parts to "charm" in charmcraft.yaml.
qwen3.6-35b-a3b-mtp-q6 Charmcraft 2.4.0 enforces strict naming for reactive parts, requiring the top-level part to be named charm for proper layer merging. The issue closed without code changes after users applied a workaround by renaming their parts accordingly.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1816 Reactive charm built with charmcraft 3.x is missing options from the included layers and is broken charmcraft open Reactive charms built with charmcraft 3.x lose config.yaml options from included layers; 2.x works. Maintainer acknowledged and plans a rewrite of the reactive build logic; reporter confirmed still broken on 3.4.3 and is willing to wait.
75%