← Back to issue list

Support setting a parallel build count

View original Github issue

Metadata

Project
craft-application
Number
#180
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Parallel build-count controls landed in canonical/craft-application#191 via commit 35b49c8f, adding app/CRAFT fixed settings and CPU-capped maximum settings.

Resolution: closed resolved

Reason: PR #191 was implemented in commit 35b49c8f. It added the requested app-specific and CRAFT fixed/max environment-variable precedence, with maximum counts capped by the available CPU count.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done 1. craft-application should use `<appname>_PARALLEL_BUILD_COUNT`. 2. If it is not set, use `CRAFT_PARALLEL_BUILD_COUNT` 3. If it is not set, take the lesser of `<appname>_MAX_PARALLEL_BUILD_COUNT` and the total number of CPUs on the system. - If `<appname>_MAX_PARALLEL_BUILD_COUNT` is not set, then use `CRAFT_MAX_PARALLEL_BUILD_COUNT` 4. If neither `MAX` envvars are set and the number of CPUs on the system cannot be determined, do not provide a build count to craft-parts (which will use its default of 1). ### Why it needs to get done 1. To allow setting the number of parallel build jobs 2. To align with the design proposed in https://github.com/snapcore/snapcraft/issues/4537 and https://github.com/canonical/craft-parts/issues/631

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Parallel build-count controls landed in canonical/craft-application#191 via commit 35b49c8f, adding app/CRAFT fixed settings and CPU-capped maximum settings.
stealth/space-bunny-alpha — closed resolved Implemented in PR #191 via commit 35b49c8f, adding fixed, maximum, and CPU-based parallel build-count selection to craft-application.
qwen/qwen3.6-35b-a3b — — Closed without implementation or linked pull requests. Lack of comments and activity indicates the feature request was abandoned or superseded. No resolution or merge details were provided.
qwen/qwen3.6-35b-a3b — — Closed without implementation or discussion. The feature request to configure parallel build counts via environment variables was abandoned. No pull requests or resolution details were provided.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#631 Read `CRAFT_PARALLEL_BUILD_COUNT` craft-parts closed Closed without code changes after parallel build-count configuration was moved upstream; craft-parts no longer needed to read CRAFT_PARALLEL_BUILD_COUNT.
80%
#540 Document parallel build count environment variables craft-application open Documentation request to define and explain CRAFT_PARALLEL_BUILD_COUNT and CRAFT_MAX_PARALLEL_BUILD_COUNT; docs/reference/environment-variables.rst still omits them while util/system.py defines precedence.
75%
#4537 Document and use the correct parallel build count envvars snapcraft closed Parallel-build documentation moved to canonical/craft-application#540; #4537 was closed without completing the requested Snapcraft documentation, as the maintainer later noted.
74%
#502 Incorrect value for $CRAFT_PARALLEL_BUILD_COUNT in project metadata craft-application closed Fixed project YAML expansion to use the resolved parallel-build count instead of always exposing 1; implemented by PR #517 in commit b508b6c0.
74%
#3756 parts: fix parallel build count snapcraft merged Merged #3756 as e3d81491f (implementation 354ad897c), making craft-parts use the host’s available concurrent-job count, with a configurable maximum.
72%
#517 fix: set correct parallel build count in scripts craft-application merged Merged #517 as b508b6c0, fixing CRAFT_PARALLEL_BUILD_COUNT in override scripts; released in 4.2.7 and replacing #509.
72%