Skip to content

Releases: canonical/charmcraft

Release 1.7.0

24 May 14:35
1.7.0
04c91c1
Compare
Choose a tag to compare
  • The 22.04 base is now supported (related issue).

  • Improved error messages for the JujuMetadata and other linters (related issue).

  • Better support for packing charms using Multipass provider in environments without snapd.

  • Enhanced the revisions and other commands' outputs to show detailed timestamps (related issue).

  • The pack command now includes by default the actions directory, if present (related issue).

  • A keyring is not longer required in the system when using the --export option in the login command (related issue).

  • The entrypoint is now always validated to be correct, even if it's the default src/charm.py (related issue).

  • Produced a specification for Charmcraft Programmatic Outputs.

  • Fixed the user interaction in the --shell option for the pack command (related issue).

  • Other minor fixes/improvements:

    • Save temp retrieved file in current directory so it's fine for the case of running inside a strict snap.

    • Pass the project's dir owner id when creating the lxd instance.

    • Re-use the file descriptor already opened by the tempfile to not leak it.

Release 1.6.0

12 Apr 15:01
1.6.0
b1adccd
Compare
Choose a tag to compare
  • Several performance related improvements:

    • Reuse already installed dependencies from last run if requirements didn't change
    • Faster launch of existing containers when packing charms
  • Improved user experience:

    • Show lifecycle step progress (related issue)
    • The deprecated 'build' command is now hidden and 'pack' appears more prominently in the help messages (related issue)
    • Better error messages in a couple of commands
    • Fixed interaction with user when asking if to install Multipass in Windows (related issue)
  • Enabled craftcl from Craft Parts scriptlets to be able to run the overridden step's built-in handler (related issue)

  • Full logs from building container are always retrieved, even after a success pack (related issue)

  • Updated the ops framework version in the init template

  • Fixed a bug in libraries handling so disk paths are always importable (related issue)

  • Fixed which remote image was used by Multipass provider

  • Save the content of CHARMCRAFT_IMAGE_INFO environment variable into the Charm's manifest

Release 1.5.0

04 Mar 13:50
1.5.0
caa9804
Compare
Choose a tag to compare
  • Added the --name option in the upload command to override the name declared in the metadata

  • Improved logging with details of the system where it's being run (operating system, version, desktop, etc) for better debugging

  • Fixed the Framework linter to use the name from metadata in reactive charms

  • Added instructions to install Charmcraft from PyPI.

  • Fixed the release command to allow resources with revision 0

  • Fixed the process execution inside the isolated container so logs can be properly obtained from it

  • Reworked how Craft Store errors are handled to expose failures correctly

  • Backward compatibility notices (check the Charmcraft deprecations documentation for more info):

    • Deprecated the build command, use pack instead (DN06)

    • Enforced DN01: do not support charmhub attributes with underscores anymore

    • Enforced DN02: the charmcraft.yaml is not longer optional for build command

  • Updated Craft Parts to version 1.2.0, relevant change:

    • performance improvement by not refreshing already installed snaps
  • Updated Craft Store to version 2.0.1, relevant changes:

    • raise an error when a keyring is not found to explicit that credentials could not be stored

    • do not allow overwriting existing credentials (to avoid the peril of leaving the system with wrong credentials stored)

    • fail properly when cannot parse correctly the credentials given through an environment variable

  • Fully adopted the Craft CLI library

Release 1.4.0

11 Jan 11:00
1.4.0
f88226e
Compare
Choose a tag to compare
  • 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)

Release 1.3.1

28 Sep 16:27
1.3.1
b7fa8a3
Compare
Choose a tag to compare
  • Added a charm-python-packages plugin property so any Python package can be installed before the charm packing happens.

Release 1.2.1

13 Aug 11:19
1.2.1
673b324
Compare
Choose a tag to compare
  • Fixed a bug where previously packed and now deleted files were being included anyway in the final charm file (please do charmcraft clean to clean up possible leftovers from previous version).

  • Include more files by default in the charm (if present, as they are optional): icon.svg, README.md and LICENSE.

Release 1.2.0

03 Aug 20:38
1.2.0
1dfb54b
Compare
Choose a tag to compare
  • The Charm and Bundle packing is now done through a parts lifecycle process in the same manner as snapcraft.

    • the charm's requirements and entrypoint can now be specified in the config, to simplify repetitive packing.
    • it opens a world of possibilities to pack charms and bundles: explore the parts lifecycle docs if you have special packaging requirements.
  • Introduced a mechanism to validate that the charm was built using the best charm crafting practices (see all analyzers and linters).

    • this infrastructure is run automatically when packing the charm, aborting the process if problems are found (can be overruled with --force).
    • all linters and checkers can be called explicitly using the new analyze command (use --format=json to produce a machine-consumable output).
    • these verifications can be explicitly ignored (see analysis key in the config).
  • The packing procedure no longer includes all the project's files by default (see this forum post for further reference).

  • When packing charms in Charmcraft-driven LXD containers, perform additional validation of LXD configuration and user permissions to improve user experience.

  • Introduced --destructive-mode option to pack charm on host instead of using an LXD container (use with caution as this mode allows changes to system configuration).

  • Fixed a regression when listing revisions and showing status for bundles.

Release 1.1.2

22 Jul 15:31
1.1.2
db90e18
Compare
Choose a tag to compare
  • Allow including resources when releasing charms directly in the upload command.

Release 1.1.1

09 Jul 12:38
1.1.1
e9527f2
Compare
Choose a tag to compare
  • Save the resulting charm file in the current directory when packing
  • Improved the snapcraft.yaml file to be able to build in armhf

Release 1.1.0

05 Jul 12:31
1.1.0
7cdbeee
Compare
Choose a tag to compare
  • The upload-resource command was improved for OCI Images

  • The charm is now built in a LXD container, allowing the process to be done in a different base than the host

    • the Charmcraft config now has a bases entry to express where the charm can be built and where it can run (short and long forms supported)
    • this configuration is optional for now but will be mandatory in the future (see deprecation notices DN02 and DN03)
    • use of bases enables building in LXD
    • the Charm resulting file name reflects where it was built
    • Charmcraft now uses the craft_providers library, allowing in the future to build using Multipass instances
    • added a clean command to remove any structures that were used for the building
    • related specification)
  • The status command output now includes a column for the charm bases

  • The keywords in Charmcraft configuration are now separated using dashes (see deprecation notice DN01)

  • Some UX improvements

    • filepaths are shown in a consistent style
    • some help messages adjusted
    • better error messages when the charmcraft.yaml config has issues
  • The Charmcraft snap is now classic confined

    • the snap is the recommended way to install and use the tool
  • Other internal Charmcraft improvements

    • Python 3.6 and greater is now supported
    • started to use black for consistent and automated formatting
    • refactored how the project's dependencies are handled
    • migrated to use pydantic in the configuration manager