← Back to issue list

build/pack: add support for bases in managed mode (CRAFT-131)

View original Github issue

Metadata

Project
charmcraft
Number
#390
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged changes adding bases support for managed mode in build/pack. Introduces a bases module, extends configuration validation with warnings, and updates run() to return built charms. Approved by two reviewers and merged.

Suggested action:

No scores available.

Issue body

- Intoduce bases module with `get_host_as_base()` and `check_if_base_matches_host()`. - Extend build/pack to support `bases` configuration if present and managed-mode is enabled. Error if unable to build for any of the configured bases. Warn for each bases config that cannot be built for. Provide additional debug logging on matching behavior to help diagnose matching issues when they occur. - Update run() to return a list of charms built rather than just the charm file name. Note bases are currently required with the use of managed mode until we introduce the default bases configuration. Signed-off-by: Chris Patterson <chris.patterson@canonical.com>

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged changes adding bases support for managed mode in build/pack. Introduces a bases module, extends configuration validation with warnings, and updates run() to return built charms. Approved by two reviewers and merged.
qwen3.6-35b-a3b-mtp-q6 Merged implementation adding a bases module and extending build/pack to support bases configuration in managed mode. The run function now returns a list of built charms. Bases are required in managed mode until default configurations are introduced.
qwen3.6-35b-a3b-mtp-q6 Merged. Added a bases module and extended build/pack to support bases configuration in managed mode. Updated run() to return a list of built charms. Bases are required in managed mode until defaults are introduced. Resolves CRAFT-131.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#411 build: pack charm in provided environment when using bases (CRAFT-313) charmcraft merged Merged implementation for packing charms in provided environments per bases configuration (CRAFT-313). Approved by two reviewers, modifying two files (+175/-30). Future work will add verbose and quiet mode flag support.
83%
#384 manifest: add bases support to create_manifest() (CRAFT-63) charmcraft merged Merged after approval and CI checks. Adds an optional bases_config parameter to create_manifest() and relocates it to a dedicated module to prevent import loops. Runtime retains legacy behavior while new tests prepare for future bases implementation.
76%
#383 commands/build: charm file name format support for bases (CRAFT-66) charmcraft merged Merged following approval by three reviewers. Introduces charm file name format support for bases configuration, preserving the existing format as a legacy runtime path. Includes corresponding tests. (+98/-1 lines, 2 files changed)
74%
#1795 fix(package): Limit the bases in manifest.yaml charmcraft merged Merged a fix correcting manifest.yaml generation for bases charms. The build previously output all run bases instead of only the specific bases for the current build. Approved by two reviewers, modified 8 files.
74%
#341 config: add short-form bases support (CRAFT-11) charmcraft merged Merged: Added short-form bases support to configuration, resolving CRAFT-11. Approved by two reviewers, the change adds 130 lines across two files to allow bases to imply their long-form build-on/run-on equivalents.
73%
#299 [WIP] charmcraft config: introduce support for bases keyword charmcraft closed Charmcraft bases keyword support was closed without merging. The branch was abandoned with twelve unresolved review comments and pending unit tests, leaving the feature unimplemented.
72%
#399 Implement support for Bases in Store layer (CRAFT-298) charmcraft merged Merged implementation of Bases support in the Store layer (CRAFT-298). Approved by two reviewers with passing CI checks. Updates three files (+114/-49 lines) to enable future status command functionality.
72%
#392 pack: introduce support for --bases-index to specify targets (CRAFT-148) charmcraft merged Merged. Adds --bases-index flag to pack command, letting users specify target build indices. Validated at runtime and passed to pack.run() to avoid extending deprecated arguments. Approved and passed CI.
71%