fix: cache SDK sdist across image builds#515
Merged
simonrosenberg merged 2 commits intomainfrom Mar 13, 2026
Merged
Conversation
Pre-build the vendored SDK sdist once per image-build run and pass the path through to the SDK build helper so individual image builds can reuse it. This keeps the existing SDK-owned build path and telemetry while removing repeated sdist work across batches. Bump the vendored software-agent-sdk submodule to the compatible prebuilt-sdist API commit and update uv.lock to match the new workspace dependency graph. Co-authored-by: openhands <openhands@all-hands.dev>
all-hands-bot
approved these changes
Mar 13, 2026
Collaborator
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Clean caching optimization that solves a real problem without adding complexity.
Key strengths:
- Pragmatic solution: Builds SDK sdist once and reuses it across all image builds
- Proper resource management: Context manager ensures temp directory cleanup
- Graceful degradation: Falls back to per-image builds if caching fails
- Well-tested: Verifies parameter propagation through both single and multi-image build paths
- Backward compatible: Optional parameter, no breaking changes
Verdict: ✅ Worth merging - Straightforward efficiency improvement with solid error handling and appropriate test coverage.
Update the vendored software-agent-sdk submodule from the merge resolution commit to the exact head of software-agent-sdk PR #2426 so benchmarks PR #515 tracks the intended SDK change directly. Co-authored-by: openhands <openhands@all-hands.dev>
Collaborator
Author
|
Updated Validation after the submodule update:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prebuilt_sdistAPI in the vendored SDKbuild_image()andbuild_all_images()testsTesting
uv run pre-commit run --files benchmarks/utils/build_utils.py tests/test_image_utils.pyuv run pytest tests/test_image_utils.pySplit out of #507.