Repository navigation
ci(swtbench): default cache-mode to off - #541
Merged
Merged
Conversation
BuildKit cache export is useless for benchmark builds (100% miss rate) and adds ~22s overhead per image. With 433 SWT-Bench images, this wastes ~26 minutes on registry round-trips even when all images are skipped. Closes #540 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
all-hands-bot
left a comment
Collaborator
There was a problem hiding this comment.
🟡 Acceptable - Pragmatic fix for a real performance problem. One minor code smell to clean up.
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| BUILDKIT_PROGRESS: plain | ||
| OPENHANDS_BUILDKIT_CACHE_MODE: ${{ inputs.cache-mode || 'off' }} |
Collaborator
There was a problem hiding this comment.
🟢 Nit: The || 'off' fallback is redundant. GitHub Actions inputs with default values are never empty - inputs.cache-mode will already be 'off' if not provided. This defensive programming adds noise without value.
Suggested change
| OPENHANDS_BUILDKIT_CACHE_MODE: ${{ inputs.cache-mode || 'off' }} | |
| OPENHANDS_BUILDKIT_CACHE_MODE: ${{ inputs.cache-mode }} |
Why it matters (barely): Good code doesn't have unnecessary special cases. If the input system guarantees a default, trust it.
The input already has default: 'off', so the || fallback is unnecessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
juanmichelini
approved these changes
Mar 19, 2026
juanmichelini
left a comment
Collaborator
There was a problem hiding this comment.
Love the analysis!
This was referenced Mar 19, 2026
simonrosenberg
pushed a commit
that referenced
this pull request
Mar 19, 2026
Registry cache export is needed for the Dockerfile ARG reorder fix (SDK PR #2522) to work. With the fix, base-image-minimal layers become SDK-independent and reusable across SDK commits via --cache-from. But --cache-from only works if a previous build exported the layers with --cache-to. The prior rationale for cache-mode=off (#540) was that registry cache had a 100% miss rate. That was because OPENHANDS_BUILD_GIT_SHA busted the base layers on every SDK change. With the ARG reorder fix, the base layers will be cache-stable and registry export becomes useful. Related: #542, #541, #531 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 19, 2026
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
cache-modeworkflow input to the SWT-Bench image build workflow, defaulting tooffOPENHANDS_BUILDKIT_CACHE_MODEenv var to the build stepWhy
BuildKit cache export has a 100% miss rate for benchmark image builds and adds ~22s overhead per image. With 433 SWT-Bench images, this wastes ~26 minutes on registry cache round-trips even when all images already exist and are skipped.
See #540 for the full analysis:
maxmode: 35.5 img/hoffmode: 50.7 img/h (43% faster)Test plan
OPENHANDS_BUILDKIT_CACHE_MODE=offappears in logsCloses #540
🤖 Generated with Claude Code