← Back to issue list

utils: log envvar SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT when invalid

View original Github issue

Metadata

Project
snapcraft
Number
#4041
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #4041 (commit 1f8bef63c): snapcraft/utils.py get_parallel_build_count() now emits a debug log with the invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT value. No functional change.

Resolution: closed resolved

Reason: The PR was approved and merged into main as commit 1f8bef63c ("utils: log envvar SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT when invalid (#4041)"). The resulting code at snapcraft/utils.py:144 reads `emit.debug(f"Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT {max_count_env!r}")` in the ValueError handler.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- No functional changes. Minor logging improvement to log the environment variable `SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT` when it is invalid.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #4041 (commit 1f8bef63c): snapcraft/utils.py get_parallel_build_count() now emits a debug log with the invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT value. No functional change.
stealth/space-bunny-alpha — closed resolved Merged #4041 into main, adding logging for invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT values without changing build behavior.
qwen/qwen3.6-35b-a3b — — Merged into main. Adds logging for the SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT environment variable when invalid. Approved by reviewer, passed CI, and contains no functional changes.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Adds logging for invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT environment variable without functional changes. Approved by maintainer mr-cal with 100% diff coverage.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#3997 (confidence 70%)

    Earlier PR 'providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance' (31a3990c8) propagates the same env var into build instances.

  • Related To: 354ad897c (confidence 60%)

    Commit 'parts: fix parallel build count' introduced the SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT env var that this PR improves logging for.

Related issues

Issue Project State Summary Similarity
#3997 providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance snapcraft merged PR #3997 merged (commit 31a3990c8) forwarding SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT into the build provider instance, so parallel build limits are honored inside the build environment.
74%
#4785 bug: snapcraft uses '1' for CRAFT_PARALLEL_BUILD_COUNT on multi-core machine snapcraft closed Core24 builds now receive the CPU-based CRAFT_PARALLEL_BUILD_COUNT; the fix shipped in Snapcraft 8.4.4 on 2024-10-24.
73%
#1997874 SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT doesn't seem to be passed through to lxd container snapcraft (launchpad) closed SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT was not forwarded into the LXD/Multipass build instance. Fixed by merged PR snapcore/snapcraft#3997 (commit 31a3990c8, 'providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance'), released in snapcraft 7.3.
73%
#1666271 Expose parallel_build_count as a well-known variable to scriptlets snapcraft (launchpad) closed Feature request fulfilled: PR snapcore/snapcraft#1154 (commit 9da78e45a, "project: expose parallel_build_count to scriptlets") added SNAPCRAFT_PARALLEL_BUILD_COUNT to scriptlet env vars; author confirmed implementation, issue closed.
71%
#1988748 SNAPCRAFT_PARALLEL_BUILD_COUNT not respected if set in `override-build:` snapcraft (launchpad) closed Closed as working as intended: maintainer sergiusens explained craftctl reads the configured parallel-build count, so exporting SNAPCRAFT_PARALLEL_BUILD_COUNT inside override-build cannot change it (it is set by snapcraft itself, per PR #1154).
70%
#1154 Expose parallel_build_count to scriptlets (LP: #1666271). snapcraft merged Merged PR #1154 in commit 9da78e45a, exposing parallel_build_count to scriptlets as SNAPCRAFT_PARALLEL_BUILD_COUNT after the requested rename.
70%