← Back to issue list

Charmcraft 3.0.0 renders .charm files missing dispatch script and any meaningful python

View original Github issue

Metadata

Project
charmcraft
Number
#1609
Type
issue
State
closed
Author
phvalguima
Labels
—
Created
Updated
Closed

Current evaluation

Closed as intentional 3.0 behavior: prime filters rather than includes files. Maintainers documented a dump-part workaround and merged warning PR #1642 (207a9176).

Resolution: closed not a bug

Reason: Maintainers confirmed this was an intentional breaking change aligning prime with Snapcraft and Rockcraft. They documented corrected YAML using a separate dump part and merged warning PR #1642, commit 207a9176.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Hi team, I am currently running on charmcraft v3.0.0 and I noticed that a charm built with it is getting errors when deploying as such: ``` ERROR invalid charm "sysbench-operator": has no hooks nor dispatch file ``` My code repo: https://github.com/canonical/sysbench-operator However, a run on my CI using charmcraft v2.5.5 works fine: https://github.com/canonical/sysbench-operator/actions/runs/8292552070/job/22694061013?pr=4 The contents of the final `.charm` are: ``` drwxrwxr-x 3 pguimaraes pguimaraes 4096 Mär 15 11:08 ./ drwxrwxrwt 27 root root 12288 Mär 15 11:08 ../ -rw-r--r-- 1 pguimaraes pguimaraes 249 Mär 15 11:07 manifest.yaml -rw-r--r-- 1 pguimaraes pguimaraes 615 Mär 15 11:04 metadata.yaml drwxrwxr-x 2 pguimaraes pguimaraes 4096 Mär 15 11:08 scripts/ -rw-r--r-- 1 pguimaraes pguimaraes 18019 Mär 15 11:08 sysbench-operator_ubuntu-22.04-amd64.zip ``` snap info charmcraft in my env: https://pastebin.canonical.com/p/w7pY7QJkWZ/ Full `charmcraft pack --debug -v` logs: https://pastebin.canonical.com/p/WSHg2Yxfwp/ ### To Reproduce Install charmcraft v3.0.0 Checkout the repo above Copy this: https://pastebin.canonical.com/p/3qsZ5dQd66/ to `requirements.txt` try build and deploy the repo above with `charmcraft pack` ### Environment Ubuntu 23.10 ### charmcraft.yaml ```shell type: charm bases: - build-on: - name: ubuntu channel: "22.04" run-on: - name: ubuntu channel: "22.04" parts: charm: override-pull: | craftctl default if [[ ! -f requirements.txt ]] then echo 'ERROR: Use "tox run -e build-dev" instead of calling "charmcraft pack" directly' >&2 exit 1 fi charm-strict-dependencies: true prime: - scripts build-packages: - libffi-dev - libssl-dev - pkg-config - rustc - cargo ``` ``` ### Relevant log output ```shell See the bug report pastebins ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed as intentional 3.0 behavior: prime filters rather than includes files. Maintainers documented a dump-part workaround and merged warning PR #1642 (207a9176).
stealth/space-bunny-alpha — closed not a bug Closed as an intentional Charmcraft 3.0 breaking change: prime now filters files instead of including them. Maintainers provided a dump-plugin YAML workaround and merged warning PR #1642 (207a9176).
stealth/space-bunny-alpha — closed not a bug Closed as intentional Charmcraft 3.0 behavior: prime now excludes files instead of adding them. Maintainers linked documentation, supplied a separate dump-part workaround, and promised a warning in the next beta.
qwen3.6-35b-a3b-mtp-q6 — — Closed as an intentional breaking change in 3.0.0. Maintainers provided a YAML workaround and will add a deprecation warning for affected charms in the next beta release.
qwen/qwen3.6-35b-a3b — — Closed as an intentional breaking change in charmcraft 3.0.0 regarding prime behavior. A workaround was provided. Maintainers will add a warning for older charms using prime to the next beta release.
qwen/qwen3.6-35b-a3b — — The missing dispatch script stemmed from an intentional charmcraft 3.0.0 breaking change. The report was closed without reverting the behavior. Maintainers will add a warning for legacy charms using the prime keyword to alert users.
qwen3.6-35b-a3b-mtp-q6 — — Closed as by design. The behavior was an intentional v3.0.0 breaking change regarding the prime keyword. A configuration workaround was provided, and a deprecation warning for affected charms was scheduled for the next beta.

Update history

No update history recorded yet.

Related work

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

    Merged PR 1642 added the promised warning for legacy prime usage.

Related issues

Issue Project State Summary Similarity
#666 Transition from "prime" to "charm-files" for including files charmcraft closed Superseded in Charmcraft 3.0: the prime-to-charm-files rewrite was dropped; prime now follows standard craft-parts filtering, with dump-plugin migration docs.
71%