build: expose image build parallelism knobs to workflows#516
build: expose image build parallelism knobs to workflows#516simonrosenberg merged 4 commits intomainfrom
Conversation
Add an explicit build_batch_size parameter to the shared build helper, thread it through the current image build entrypoints, and surface the corresponding workflow inputs for SWE-Bench and SWT-Bench. This lets workflow-dispatched max worker and batch-size values reach the build logic without being overridden by environment defaults. Co-authored-by: openhands <openhands@all-hands.dev>
all-hands-bot
left a comment
There was a problem hiding this comment.
Taste Rating: 🟡 Acceptable - Solves a real operational problem with clean parameter threading, but has minor consistency issues.
Linus-Style Analysis:
This is good pragmatic work. You're exposing real knobs that matter for actual production builds, and the parameter threading is straightforward. The test proves the precedence logic works. Worth merging.
Minor warts:
- Workflow parameter naming is inconsistent (see inline comments)
- One unrelated bug fix snuck in that should be called out
See inline comments for details.
Rename the SWT image-build batch-size workflow input to match the SWE-Bench workflow and move the eval-env-specific knob to eval-env-build-batch-size for clarity. Co-authored-by: openhands <openhands@all-hands.dev>
|
Addressed the review feedback:
|
|
Merged current
Validation after conflict resolution:
|
Keep the newly exposed workflow knobs, but reset their default values to match the original main-branch behavior for SWE-Bench and SWT-Bench image builds. Co-authored-by: openhands <openhands@all-hands.dev>
|
Restored the workflow defaults to match the original
The PR still changes propagation, but no longer changes the default runtime behavior. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Clean parameter threading that solves a real operational problem (CI build parallelism control). Straightforward precedence logic (explicit arg > env var) with test coverage. The force_build fix is a good catch. No fundamental issues found.
Verdict: ✅ Ship it.
Key insight: This is how you add operational controls without over-engineering - simple parameter threading with clear precedence.
Summary
build-batch-sizeplumbing to the shared image build helper and current build entrypointsBUILD_BATCH_SIZEenvironment defaults, with regression coveragebenchmarks/swebenchmultilingual/build_images.pyso--force-buildis forwarded instead of being silently ignoredTesting
uv run pre-commit run --files .github/workflows/build-swebench-images.yml .github/workflows/build-swtbench-images.yml benchmarks/utils/build_utils.py benchmarks/commit0/build_images.py benchmarks/gaia/build_images.py benchmarks/multiswebench/build_images.py benchmarks/swebench/build_images.py benchmarks/swebenchmultilingual/build_images.py benchmarks/swebenchmultimodal/build_images.py benchmarks/swegym/build_images.py benchmarks/swesmith/build_images.py benchmarks/swtbench/build_images.py tests/test_image_utils.pyuv run pytest tests/test_image_utils.pySplit out of #507.