You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
charmcraft uses the same LXC container for both platforms. This means that if you pack the 20.04 charm, then the 22.04 charm, and then the 20.04 charm, the 3rd pack will be slow because the container from the 1st pack was overriden
Expected behavior
charmcraft uses different LXC containers for each platform. (In aforementioned example) the 3rd pack is fast because it reuses the container from the 1st pack
To Reproduce
git clone https://github.com/canonical/mysql-router-operator
cd mysql-router-operator
git checkout f12c6bb4b8b49f238bf9d1874f453fa8950b2cb8
charmcraft pack -v
lxc --project charmcraft ls
Good catch, thanks! @mr-cal thinks we have a craft-providers bug related to this, and if not this is probably something to address in craft-application, but this is definitely a blocker for 3.3.
To be clear, charmcraft is building each charm in the correct build environment. So the artifacts are correct but this is inconvenient for iterative development.
The problem is that the same container name is re-used, so charmcraft is having to recreate the container every time charmcraft builds on a different base.
This has come up in canonical/craft-providers#544. Now I'm wondering if encoding the platform name in the lxc container is the right move.
Bug Description
When packing a charm with
charmcraft uses the same LXC container for both platforms. This means that if you pack the 20.04 charm, then the 22.04 charm, and then the 20.04 charm, the 3rd pack will be slow because the container from the 1st pack was overriden
Expected behavior
charmcraft uses different LXC containers for each platform. (In aforementioned example) the 3rd pack is fast because it reuses the container from the 1st pack
To Reproduce
Environment
Ubuntu 22.04
charmcraft.yaml
Relevant log output
The text was updated successfully, but these errors were encountered: