Charmcraft release 1.4.0 -- Call for testing!

Charmcraft supports the development of operators using the Charmed Operator Framework. It enables developers to build, upload and release operators on Charmhub and collaboration through charm libraries.

This new version was just released to candidate channel, we’d appreciate any tests on this, please report here any issues you find. Once we find this is solid enough, we will release it to stable.

It includes the following changes:

  • Several packing related improvements:

    • added two new properties to the default charm plugin: charm-python-packages to list Python packages to install from PyPI before installing requirements (these packages will be installed from sources and built locally at packing time) and charm-binary-python-packages very similar to the first one but allowing binary packages to be used

    • updated the craft-parts library to allow the packing of hook based charms (more information in the Pack a hook based charm with Charmcraft tutorial).

    • introduced a new reactive plugin to pack charms using the legacy charm tool (see the Pack a reactive based charm with Charmcraft tutorial for more information)

    • created two new linters to verify that mandatory actions.yaml and config.yaml files exist and have a proper YAML format

    • the building process now ignores the venv directory in the project sources

  • The store-related functionality is now provided by the craft-store library, which uses a new authentication backend that allowed several benefits:

    • there is a new --export option in the login command to save the obtained credentials to a file

    • the content of that file can be given to charmcraft through a new CHARMCRAFT_AUTH environment variable, which allows for easier integration with non-interactive environments (e.g. a CI/CD system)

    • added options to the login command to restrict the obtained credentials (shorter time to live, applies to specific charms, etc.)

    • the whoami command now shows the credentials restrictions

    A combination of several of these new features can be found in the How to authenticate Charmcraft in remote environments tutorial.

  • The craft-cli library handles the exposure of messages to the user, improving the UX in general, and in particular:

    • added a new --trace global option that sets the Emitter level in TRACE, for debugging purposes

    • now a proper progress bar is used where uploading files is involved in different commands

  • The CHARMCRAFT_DEVELOPER environment variable is no longer mandatory to run charmcraft from alternative sources (i.e. not from the snap)

Use Charmcraft to:

We recommend the Charmed Operator Framework for charm development, but Charmcraft will help you publish charms written in any language. The Charmed Operator Framework enables the development of operators in a simple and straightforward way, using standard Python structures to allow for clean, maintainable, and reusable code.

Happy charming!