Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-commit0-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ env:
N_LIMIT: ''
INSTANCE_IDS: ''
SELECT_FILE: ''
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-commit0-${{ github.ref }}
Expand Down Expand Up @@ -182,8 +183,7 @@ jobs:

echo "Running: $CMD"
eval "$CMD"
env:
DOCKER_BUILDKIT: 1
env: DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain

- name: Archive build logs
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-gaia-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ concurrency:
group: build-gaia-${{ github.ref }}
cancel-in-progress: false

env:
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

jobs:
build-and-push:
if: >
Expand Down Expand Up @@ -96,8 +99,7 @@ jobs:
eval "$CMD"

echo "✅ GAIA image with MCP layer built and pushed successfully"
env:
DOCKER_BUILDKIT: 1
env: DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain

- name: Archive build logs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-multiswebench-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ env:
BUILD_BATCH_SIZE: '15'
BUILDKIT_PRUNE_KEEP_GB: '60'
BUILDKIT_PRUNE_THRESHOLD_PCT: '60'
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-multiswebench-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-swebench-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ env:
BUILD_BATCH_SIZE: '15'
BUILDKIT_PRUNE_KEEP_GB: '60'
BUILDKIT_PRUNE_THRESHOLD_PCT: '60'
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-swe-bench-${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-swebenchmultimodal-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ env:
BUILD_BATCH_SIZE: '15'
BUILDKIT_PRUNE_KEEP_GB: '60'
BUILDKIT_PRUNE_THRESHOLD_PCT: '60'
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-swe-bench-multimodal-${{ github.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-swegym-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ env:
BUILD_BATCH_SIZE: '15'
BUILDKIT_PRUNE_KEEP_GB: '60'
BUILDKIT_PRUNE_THRESHOLD_PCT: '60'
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-swe-gym-${{ github.ref }}
Expand Down Expand Up @@ -240,8 +241,7 @@ jobs:

echo "Running: $CMD"
eval "$CMD"
env:
DOCKER_BUILDKIT: 1
env: DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
BUILDKIT_RESET_ON_FAILURE: 1

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-swesmith-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ env:
BUILD_BATCH_SIZE: '15'
BUILDKIT_PRUNE_KEEP_GB: '60'
BUILDKIT_PRUNE_THRESHOLD_PCT: '60'
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

concurrency:
group: build-swe-smith-${{ github.ref }}
Expand Down Expand Up @@ -240,8 +241,7 @@ jobs:

echo "Running: $CMD"
eval "$CMD"
env:
DOCKER_BUILDKIT: 1
env: DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
BUILDKIT_RESET_ON_FAILURE: 1

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-swtbench-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ concurrency:
group: build-swt-bench-${{ github.ref }}
cancel-in-progress: false

env:
LOG_JSON: '1' # Disable rich logging to prevent multiprocessing deadlock

jobs:
build-and-push:
if: >
Expand Down Expand Up @@ -178,8 +181,7 @@ jobs:

echo "Running: $CMD"
eval "$CMD"
env:
DOCKER_BUILDKIT: 1
env: DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain

- name: Build prebaked eval env images
Expand Down
24 changes: 24 additions & 0 deletions sitecustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,35 @@
this file at the repo root guarantees the patch runs before swebench is used.
"""

import os
import sys


# ============================================================================
# CENTRALIZED LOGGING CONFIGURATION
# ============================================================================
# Disable rich logging to avoid threading issues with multiprocessing.
# Rich's RichHandler creates locks and threads that don't play well with fork().
os.environ["LOG_JSON"] = "1"

print("benchmarks sitecustomize imported", file=sys.stderr, flush=True)

# Suppress verbose Docker build stderr warnings (75k+ lines from uv copying files).
# This MUST be done in sitecustomize.py to affect forked child processes.
# The SDK logs every "[stderr] copying..." line as WARNING, causing massive log output
# and 3x slowdown with JSON logging (Rich logging throttled these automatically).
try:
import logging

# Import SDK logger to trigger auto-configuration with LOG_JSON=1
from openhands.sdk.logger import get_logger # noqa: F401

# Now suppress the verbose build logger in ALL processes (including forked children)
logging.getLogger("openhands.agent_server.docker.build").setLevel(logging.ERROR)
except Exception:
# Best-effort: don't break if SDK structure changes
pass

try:
# Reuse the actual patch logic that lives alongside the benchmarks package.
from benchmarks.utils.sitecustomize import _apply_modal_logging_patch
Expand Down
Loading