Have to run charmcraft clean after adding a new integration
Metadata
Current evaluation
Stale charm metadata omitted newly added integrations on repack; the fix shipped to latest/edge and was slated for the next Charmcraft 3.0 hotfix.
Resolution: closed resolved
Reason: Maintainer @lengau confirmed on 2024-04-26 that the stale-integration-data fix would reach latest/edge and be included in the next Charmcraft 3.0 hotfix before the report was closed.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
It seems that, after packing a charm, then adding a new integration in `charmcraft.yaml` and then re-packing the charm the created charm doesn't have the newly added integration. After running charmcraft clean, the newly added integration does appear.
### To Reproduce
Follow this tutorial from https://juju.is/docs/sdk/write-your-first-kubernetes-charm-using-the-paas-app-charmer#heading--enable-juju-config-sample-flask-languagelanguage and the step for adding the mysql integration should fail without running a clean before another pack.
### Environment
Using the `latest/edge` of charmcraft and rockcraft on Ubuntu 22.04 using the `flask-framework` extension where everything for the charm is defined in `charmcraft.yaml`
### charmcraft.yaml
```shell
name: sample-flask
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
# (Required)
summary: A very short one-line summary of the flask application.
# (Required)
description: |
A comprehensive overview of your Flask application.
extensions:
- flask-framework
# Uncomment the below for the second run of charmcraft pack
# requires:
# mysql:
# interface: mysql_client
# limit: 1
```
### Relevant log output
```shell
juju integrate sample-flask postgresql-k8s
ERROR no relations found
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Stale charm metadata omitted newly added integrations on repack; the fix shipped to latest/edge and was slated for the next Charmcraft 3.0 hotfix. | |
| stealth/space-bunny-alpha | — | closed resolved | Stale integration data on repack was fixed on latest/edge; maintainer @lengau said it would be included in the next Charmcraft 3.0 hotfix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed a packaging bug where newly added integrations were omitted unless charmcraft clean was run. The fix is available in latest/edge and will be included in the next 3.0 hotfix. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in latest/edge and included in the next 3.0 hotfix. Charmcraft now correctly includes newly added integrations during pack without requiring a manual clean step. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in the next 3.0 hotfix and available on latest/edge. The bug causing charmcraft pack to omit newly added integrations without a prior clean step was resolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed a bug requiring manual charmcraft clean after adding new integrations before repacking. The fix was merged and released to latest/edge, with inclusion in the 3.0 hotfix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1791 Charmcraft 3 including previously-built charms in new charm builds | charmcraft | closed | Fixed in PR #1793 (commit affc209b): subsequent charmcraft pack runs no longer include previously built .charm artifacts in the new charm. |