Skip to content

Releases: canonical/craft-application

2.6.3

30 Apr 18:42
2.6.3
239c394
Compare
Choose a tag to compare

What's Changed

  • fix: apply yaml transforms first by @mr-cal in #334
  • fix: use build-for when evaluating project variables by @mr-cal in #335

Full Changelog: 2.6.2...2.6.3

2.6.2

30 Apr 12:59
2.6.2
6a30263
Compare
Choose a tag to compare

What's Changed

  • fix: do not process non-grammar keywords by @mr-cal in #330

Full Changelog: 2.6.1...2.6.2

2.6.1

29 Apr 19:44
2.6.1
2a1115d
Compare
Choose a tag to compare

What's Changed

  • fix: allow a mix of strings and dicts for grammar by @mr-cal in #328

Full Changelog: 2.6.0...2.6.1

2.6.0

24 Apr 18:25
2.6.0
071ad27
Compare
Choose a tag to compare

What's Changed

  • tests: change snapcraft owner in launchpad by @mr-cal in #311
  • fix: apply yaml transforms before grammar by @mr-cal in #319
  • feat: support local keys in package-repositories by @tigarmo in #317

Full Changelog: 2.5.0...2.6.0

2.5.0

16 Apr 17:21
2.5.0
28429b8
Compare
Choose a tag to compare

Special thanks to the contributors that made this release happen: @lengau, @renovate, @renovate[bot] and @syu-w

Full list of changes

  • fix(remote-build): enable git repo check @syu-w (#310)
  • feat(grammar): enable grammar-aware for all PartSpec @syu-w (#296)
  • chore(deps): update dependency setuptools to v69.4.0 @renovate (#308)
  • chore(deps): update dependency dev/pytest-rerunfailures to v14 @renovate (#303)
  • chore(deps): update dependency types/pyright to v1.1.358 @renovate (#309)
  • chore(deps): update dependency setuptools to v69.2.0 @renovate (#304)
  • chore(deps): update dependency types/pyright to v1.1.357 @renovate (#305)
  • tests: disable broken integration test @lengau (#307)
  • fix(remote-build): minor edge cases found with snapcraft @lengau (#299)
  • fix(remote): don't crash if the repo exists @lengau (#294)

2.4.0

04 Apr 15:50
2.4.0
8d50bcc
Compare
Choose a tag to compare

What's Changed

  • feat(remote-build): allow a user-provided project by @lengau in #293

Full Changelog: 2.3.0...2.4.0

2.3.0

02 Apr 11:35
2.3.0
a348885
Compare
Choose a tag to compare

Special thanks to the contributors that made this release happen: @renovate, @renovate[bot], @sergiusens and @syu-w

Full list of changes

  • feat: expose partitions to the lifecycle service @sergiusens (#292)
  • chore(deps): update development dependencies (non-major) @renovate (#286)
  • fix(log): keep log emitter running until the run managed @syu-w (#290)

2.2.0

28 Mar 20:37
2.2.0
226fd10
Compare
Choose a tag to compare

Special thanks to the contributors that made this release happen: @lengau, @renovate, @renovate[bot] and @syu-w

Full list of changes

  • fix(log): allows set logging verbosity level from env @syu-w (#289)
  • fix: use correct package for version @lengau (#288)
  • chore(deps): update dependency dev/pytest-cov to v5 @renovate (#287)

2.1.0

21 Mar 22:00
2.1.0
ac19c13
Compare
Choose a tag to compare

Special thanks to the contributors that made this release happen: @lengau, @syu-w and @tigarmo

Full list of changes

  • fix(launchpad): retry create recipes if launchpad error @syu-w (#278)
  • feat(app): provide a way to customize the Dispatcher @tigarmo (#281)
  • fix(app): always "emit" version message @tigarmo (#280)
  • feat: make the filter plan public @syu-w (#283)
  • fix: show better error when project file is missing @syu-w (#276)
  • feat(platforms): support --build-for to select platform @syu-w (#272)
  • feat: always process the project's grammar @tigarmo (#279)
  • fix(application): return the correct error code @lengau (#277)
  • feat(project): keep the full build plan for later use @syu-w (#273)
  • fix(yaml): allow use unicode in yaml @syu-w (#270)
  • feat(package): add a point to do tool-specific updates @tigarmo (#269)

2.0.0

12 Mar 20:41
2.0.0
b9f33a5
Compare
Choose a tag to compare

We've made quite a few architectural changes for 2.0, but here are the highlights:

Breaking changes:

  • Even in destructive mode, we now won't build on incompatible bases. For most systems, that means the base needs to match both the distro name and its version. However, if the build base version is devel, it only needs to match the distro name. Although this is a breaking change, it shouldn't require code changes from applications.
  • get_build_plan is now a part of the new BuildPlanner model rather than the Project model. This allows the build plan to be generated before creating a project, pulling in only the needed parts of the file. Applications using craft-application 2.0 will need to create an application-specific BuildPlanner model that implements get_build_plan and add that planner class as the AppMetadata's BuildPlannerClass.
  • The build environment is now selected by CLI, falling back to environment variable, falling back to snap config (if the app is snap-packaged), finally falling back to the platform default. An Application subclass that implements _configure_services must now accept a provider_name method in that method.
  • The LifecycleService uses the generated, filtered build plan. The build will fail if the build plan does not contain exactly one BuildInfo object. N.B. this still allows building multiple packages in managed mode, as each item in the build plan will result in its own provider. However, in destructive mode, the user must declare a single platform to build (e.g. by the use of the --platform parameter).
  • craft-application 2.0 requires Python 3.10 or later
  • The project directory is now available at Application._project_dir. By default this is the current working directory in unmanaged mode and /root/project in managed mode. If a command specifies a --project-dir parameter, the project directory is set to the user-specified directory in that parameter. Applications may provide further logic by overriding the _pre_run method.

New Features

  • An application may provide a default set of craft-parts plugins to register by providing a dictionary of plugin name to the plugin class in Application._get_app_plugins()
  • Provider instances receive a default bashrc file for use when debugging. Applications may override this or provide their own bashrc by overriding ProviderService._setup_instance_bashrc()
  • All projects now have a package_repositories optional attribute that allows the addition of (build-base specific) repositories. These are only loosely validated.
  • Projects may have advanced grammar (courtesy of craft-grammar), allowing parts to be defined differently for different build-for bases.
  • Parallel builds are enabled by default. The CRAFT_PARALLEL_BUILD_COUNT environment variable will set the precise number of parallel builds to use, or the CRAFT_MAX_PARALLEL_BUILD_COUNT environment variable may be used to limit the parallelization of the builds to the smaller of that number or the CPU count.
  • A new RequestService is available that acts as a wrapper around the popular Requests library. It is recommended that applications use the RequestService when making HTTP requests themselves. A major feature provided here is the download_files_with_progress method (and its little brother, download_with_progress), which will automatically handle downloading files with a progress bar.
  • A Launchpad client (which is a typed wrapper around launchpadlib) is available at craft_application.launchpad. This helps to enable remote builds.
  • A new RemoteBuildService is available for enabling remote builds on Launchpad.
  • Staged packages are tracked automatically during the build lifecycle.
  • Projects support adopt-info by default. Unless otherwise specified by an application in AppMetadata, the only field supported is version. The Package service may update the project model itself based on variables passed by the lifecycle service.
  • Applications have access to the configuration provided to them by snap through use of util.get_snap_config()
  • A strtobool utility function to help make getting boolean values from environment variables easier.
  • The http_proxy, https_proxy and no_proxy environment variables are forwarded to the provider. Applications that want to forward other environment variables may override the setup method in their ProviderService using this implementation as an example: https://github.com/canonical/craft-application/pull/260/files

Full list of changes

  • feat(provider)!: get build env from command line, env, and snap config @mr-cal (#242)
  • feat(application)!: make configure_services not take parameters @lengau (#259)
  • feat: pass environment variables to the instance. @lengau (#260)
  • feat(package): add method to update project @cmatsuoka (#257)
  • feat: add strtobool function @syu-w (#247)
  • docs(test): clarify what is needed for unit tests dependency @mattculler (#252)
  • fix: handle multiple types of Launchpad error when getting projects @lengau (#244)
  • fix(provider): install package-repositories deps @sergiusens (#250)
  • fix(test): don't test mangled names in getattrs @lengau (#245)
  • feat(lifecycle): get pull assets and primed stage packages @cmatsuoka (#240)
  • build(deps): make pygit2 a required dependency @mattculler (#243)
  • feat!: use the build plan on LifecycleService @tigarmo (#216)
  • feat(snap_config): add snap_config model and utilities @mr-cal (#239)
  • feat(app): add lists of adoptable and mandatory project fields @cmatsuoka (#231)
  • feat(lifecycle): always track stage packages @cmatsuoka (#237)
  • feat!: remove optional project commands @lengau (#238)
  • fix(launchpad): correct the uploading build state @lengau (#236)
  • feat(launchpad): add models to support charm building @lengau (#235)
  • fix(launchpad): use timezone-aware expiry time @lengau (#234)
  • fix: revert adopt-info feature @sergiusens (#233)
  • fix: make project directory loading less strict. @lengau (#229)
  • fix: make launchpad client always create relevant files @lengau (#230)
  • feat!(app): forward build-on and build-for @tigarmo (#228)
  • fix(models): address adopt-info validation by name @cmatsuoka (#227)
  • fix(remotebuild): create the launchpad instance correctly @lengau (#224)
  • feat: implement adoptable project variables @cmatsuoka (#217)
  • fix: make GrammarAwareProject accept no parts @lengau (#223)
  • feat: improve Launchpad base model and add tests @lengau (#214)
  • fix: update rendering of git repository paths @lengau (#218)
  • fix: add launchpad build types and states @lengau (#219)
  • fix: putting a target on a new git repo is optional @lengau (#220)
  • fix: separate the builds for Launchpad recipe types @lengau (#221)
  • feat: add optimistic project loading @lengau (#213)
  • refactor!: remove get_build_plan from project @lengau (#209)
  • feat: add getters to launchpad object @lengau (#215)
  • build!: bump minimum Python version @lengau (#207)
  • chore(deps): update development dependencies (non-major) @renovate (#204)
  • chore(deps): update dependency setuptools to v69.1.0 @renovate (#203)
  • fix(remote-build): set a known path to cacerts @tigarmo (#211)
  • build: use ruff from snap @lengau (#206)
  • chore(deps): update ruff and its configuration @lengau (#200)
  • fix: allow project names to start with multiple digits @lengau (#202)
  • build: broaden pygit2 dependency to include 1.14 @lengau (#210)
  • chore(deps): update development dependencies (non-major) @renovate (#199)
  • ci: use GH/JIRA integration bot @sergiusens (#197)
  • feat: remote build service @lengau (#196)
  • feat: launchpad client @lengau (#194)
  • feat!: project directory as an application attribute @lengau (#184)
  • feat: request service @lengau (#192)
  • feat: support control parallel build count from env @syu-w (#191)
  • chore(deps): update documentation dependencies to v2024 (major) @renovate (#189)
  • chore(deps): update dependency lint/ruff to v0.2.0 @renovate (#190)
  • chore(deps): update github actions (major) @renovate (#188)
  • test: skip overlay tests if fuse-overlayfs not installed. @lengau (#187)
  • chore(deps): update development dependencies (non-major) @renovate (#161)
  • style(typing): update pyright @lengau (#186)
  • style(black): update black to v24 @lengau (#185)
  • chore(deps): update dependency lint/ruff to v0.1.14 @renovate (#181)
  • feat: evaluate project using grammar rules @cmatsuoka (#150)
  • feat: support package-repositories in project @syu-w (#178)
  • chore(deps): update dependency dev/pytest to v8 @renovate (#182)
  • feat(provider): inject bashrc into instance @syu-w (#175)
  • feat(plugins): support register plugins @syu-w (#174)
  • test: temporarily disabling non-ubuntu testing due to LXD changes @syu-w (#176)
  • chore(deps): update dependency lint/ruff to v0.1.11 @renovate (#172)
  • chore(deps): update dependency setuptools to v69 @renovate (#171)