← Back to issue list

No support for paralell builds for multi-base charms

View original Github issue

Metadata

Project
charmcraft
Number
#861
Type
issue
State
open
Author
fnordahl
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Enhancement request (triaged) to let `charmcraft pack` build the bases/platforms of a multi-base charm in parallel; still unimplemented, scoped upstream to the whole craft ecosystem (CHARMCRAFT-655).

Suggested action: keep open

Reason: The feature is still absent from the code: grepping the repo for `base-build-concurrency`/`build-concurrency` returns no matches, and the multi-base build loop now lives upstream in craft-application since PRs #1538/#1704 replaced charmcraft's bespoke lifecycle commands — so only the deprecated `--bases-index` flag remains in charmcraft/application/commands/lifecycle.py. Maintainers acknowledged it as valid: facundobatista proposed a `charm-base-build-concurrency` option defaulting to 1 (disabled in destructive mode) and flagged the Craft CLI managed-output problem, and lengau (2025-09-17) said it should be implemented for the whole craft ecosystem but is "probably a full cycle's worth of work", with an internal ticket CHARMCRAFT-655 created. Labeled `Status: Triaged` / `Type: Enhancement` with a concrete design direction, so it should remain open despite being 4 years old; complexity is elevated because it requires cross-project (craft-application/craft-cli) changes, not just a charmcraft option.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 8 Complexity: 70 Confidence: 85 Actionability: 60

Issue body

For a charm with multiple bases it would be useful to be able to optionally have charmcraft build those bases in parallel. With charmcraft's use of build providers such as LXD this should in theory be possible to implement. The reasoning behind this request comes from the need to build charms from source and/or for non-x86/arm architectures. When building from source, most of the build time is spent in `pip`'s dependency resolution algorithm, and very little time is spent actually compiling code. Other architectures currently don't have pre-compiled wheels shipped on PyPi, so everyone would need to build from source for those architectures. The lack of support for this natively in `charmcraft` could be worked around by interpreting the charmcraft.yaml and running multiple invocations of `charmcraft` with an appropriate `--bases-index` argument. But it feels like an awful lot of work to delegate to the end user, and it would be much simpler with a `--base-build-concurrency N` argument or something similar?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 8
Complexity: 70
Confidence: 85
Actionability: 60
keep open Enhancement request (triaged) to let `charmcraft pack` build the bases/platforms of a multi-base charm in parallel; still unimplemented, scoped upstream to the whole craft ecosystem (CHARMCRAFT-655).
stealth/space-bunny-alpha
Impact: 48
Quick Win: 7
Complexity: 76
Confidence: 93
Actionability: 65
keep open Triaged enhancement requesting parallel multi-base charm builds; it remains open, with no concurrency option in current source and maintainers estimating it requires ecosystem-wide work.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 13
Complexity: 70
Confidence: 70
Actionability: 60
keep open Enhancement request to add parallel build support for multi-base charms via a --base-build-concurrency option. Triaged, not yet implemented, with maintainer discussion about implementation approach.
qwen/qwen3.8-27b
Impact: 50
Quick Win: 12
Staleness: 35
Complexity: 75
Confidence: 80
Support Request: 10
keep open Feature request to add optional parallel builds for multi-base charms (e.g. a --base-build-concurrency option). Triaged and acknowledged by maintainers as a valid enhancement; still open and unimplemented, with a recent 2025 comment noting it is a full cycle of work for the craft ecosystem.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 70
Confidence: 85
Support Request: 5
keep open Enhancement request to add parallel build support for multi-base charms in charmcraft to speed up source and cross-architecture builds. Currently triaged but inactive for ~10 months, with maintainers noting significant implementation effort and terminal handling considerations.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 80
Confidence: 75
Support Request: 10
keep open Feature request for parallel multi-base charm builds to improve cross-architecture and source build times. Triaged and acknowledged by maintainers as a valid but large-scope enhancement for the craft ecosystem, currently awaiting prioritization.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 85
Confidence: 75
Support Request: 10
keep open Feature request to add parallel build support for multi-base charms in charmcraft to improve build times. Currently triaged, with maintainers noting it requires significant ecosystem-wide effort and technical work to manage concurrent terminal output.

Update history

No update history recorded yet.

Related work

  • Blocked By: charmcraft#1532 (confidence 70%)

    PR #1538 (5e3b927c) and PR #1704 replaced charmcraft's bespoke lifecycle/pack commands with upstream craft-application ones, so the per-base build loop that would need parallelising no longer lives in this repo.

  • Related To: craft-providers#412 (confidence 55%)

    Prior report of a parallel-building race condition in charmcraft 2.4.1 producing 'Incompatible base detected' — evidence that provider isolation is a real obstacle to parallel per-base builds.

Related issues

Issue Project State Summary Similarity
#2008 Multi-base platform support charmcraft closed Multi-base support shipped in charmcraft#2054 (commit 1ad02d82) via platforms-based recipes; the prototype was not separately polished, but the requested capability was implemented.
74%
#81 feat: multi-base support for charm build plans craft-platforms merged Merged PR #81 as commit 519b705, adding multi-base charm build-plan support and fixing #73, with stricter shorthand validation and CraftPlatformsError.
74%
#1789 Unable to build multi-base subordinate charms on 24.04 charmcraft closed Multi-base builds were implemented with platforms-based recipes in merged PR #2054 (commit 1ad02d82), enabling one recipe to build charms for multiple Ubuntu bases.
73%
#215 fix(charm): accept redundant multi-base charms craft-platforms merged Merged PR #215 as commit 4879309, allowing redundant multi-base charms when they produce equivalent valid build plans and addressing canonical/charmcraft#2620.
73%
#73 Add multi-bases support for charm build plans craft-platforms closed Multi-base charm build-plan support was merged in PR #81 (commit 519b705), with validation tightening and error-handling updates; it resolved #73.
72%
#411 build: pack charm in provided environment when using bases (CRAFT-313) charmcraft merged Merged PR #411 (CRAFT-313) to pack each viable bases configuration in its provided build environment; merge commit 523c6fb0.
72%
#148 feat(charm): add a build planner for bases charms craft-platforms merged Merged PR #148 added a Charm build planner for legacy charms using the bases key, addressing CHARMCRAFT-630 in commit 16ff218.
71%