Skip to content

Conversation

@juanmichelini
Copy link
Collaborator

Summary

This PR addresses issue #400 where SWT-Bench image build workflows were hanging indefinitely (2+ hours) at the "Build and push SWT-Bench images" step, blocking evaluation runs.

Problem

SWT-Bench builds after 14:12 UTC on 2026-02-06 were freezing with no progress updates, while earlier builds completed successfully in ~10 minutes. The builds were consuming runner resources indefinitely and blocking evaluation pods.

Root Cause Analysis

Comparing the SWT-Bench workflow with the working SWE-Bench workflow revealed several missing safeguards:

  1. No preflight step - SWE-Bench has a preflight step that prunes BuildKit cache and verifies disk space before building
  2. No BUILDKIT_RESET_ON_FAILURE - SWE-Bench sets this env var to help recover from BuildKit failures
  3. No timeout - Neither workflow had timeouts, but SWT-Bench was more susceptible to hangs
  4. Per-ref concurrency - Concurrent builds on different refs could interfere with each other

Changes

  1. Add preflight step to prune BuildKit cache and verify disk space

    • Matches the existing safeguard in build-swebench-images.yml
    • Prunes cache to 60GB max and checks for 75GB free space
    • Fails early if disk space is insufficient
  2. Add timeout-minutes to build steps

    • 30 minutes for main image build (expected ~10 min)
    • 60 minutes for prebaked eval env images
    • Prevents indefinite hangs from blocking runners
  3. Add BUILDKIT_RESET_ON_FAILURE=1 environment variable

    • Helps recover from BuildKit failures/corruption
  4. Change concurrency group to global (not per-ref)

    • Prevents concurrent builds from interfering with each other
    • Uses cancel-in-progress: true to cancel old runs when new ones start

Testing

This is a workflow configuration change. The fix will be validated when the workflow runs in GitHub Actions. The changes align with the working SWE-Bench workflow configuration.

Fixes #400

@juanmichelini can click here to continue refining the PR

This commit addresses issue #400 where SWT-Bench image build workflows
were hanging indefinitely (2+ hours) at the build step.

Changes:
1. Add preflight step to prune BuildKit cache and verify disk space
   - Matches the existing safeguard in build-swebench-images.yml
   - Prunes cache to 60GB max and checks for 75GB free space
   - Fails early if disk space is insufficient

2. Add timeout-minutes to build steps
   - 30 minutes for main image build (expected ~10 min)
   - 60 minutes for prebaked eval env images
   - Prevents indefinite hangs from blocking runners

3. Add BUILDKIT_RESET_ON_FAILURE=1 environment variable
   - Helps recover from BuildKit failures/corruption

4. Change concurrency group to global (not per-ref)
   - Prevents concurrent builds from interfering with each other
   - Uses cancel-in-progress: true to cancel old runs

Fixes #400

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SWT-Bench image build workflows hanging indefinitely (2+ hours)

2 participants