Skip to content

Commit be2e246

Browse files
committed
chore: remove unused DEFAULT_MAX_PARALLEL dead code
1 parent 4a8dadd commit be2e246

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

DEPLOY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,5 @@ GitHub retries webhooks when responses are slow or network issues occur. This is
142142
| `BLOCK_NETWORK` | No | `false` | Fully isolate sandbox network |
143143
| `CACHE_VOLUME_NAME` | No | - | Modal Volume name for persistent `/cache` mount |
144144
| `MODAL_REGION` | No | - | Modal region for sandbox deployment |
145-
| `DEFAULT_MAX_PARALLEL` | No | `2` | Default max concurrent sandboxes |
146145
| `SANDBOX_EXTRA_ENV` | No | - | JSON string of extra env vars for sandboxes |
147146
| `GITHUB_ENTERPRISE_DOMAIN` | No | - | Custom domain for GitHub Enterprise |

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ sequenceDiagram
166166
| `CACHE_VOLUME_NAME` | No | | Modal Volume name for persistent `/cache` |
167167
| `MODAL_REGION` | No | | Modal region for sandbox deployment |
168168
| `SANDBOX_EXTRA_ENV` | No | | JSON string of extra env vars for sandboxes |
169-
| `DEFAULT_MAX_PARALLEL` | No | `2` | Default max concurrent sandboxes |
170169
| `GITHUB_ENTERPRISE_DOMAIN` | No | | Custom domain for GitHub Enterprise |
171170

172171
## Limitations

runner/config.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,23 @@
7777
except json.JSONDecodeError:
7878
logging.getLogger("runner").warning("SANDBOX_EXTRA_ENV is not valid JSON, ignoring")
7979

80-
# Default max concurrent sandboxes
81-
try:
82-
DEFAULT_MAX_PARALLEL = max(1, int(os.environ.get("DEFAULT_MAX_PARALLEL", "2")))
83-
except ValueError:
84-
logging.getLogger("runner").warning("Invalid DEFAULT_MAX_PARALLEL; using default=2")
85-
DEFAULT_MAX_PARALLEL = 2
86-
8780
# GitHub runner group ID
8881
try:
8982
RUNNER_GROUP_ID = int(os.environ.get("RUNNER_GROUP_ID", "1"))
9083
except ValueError:
9184
logging.getLogger("runner").warning("Invalid RUNNER_GROUP_ID; using default=1")
9285
RUNNER_GROUP_ID = 1
9386

87+
# Sandbox spawn retry configuration (for transient failures under load)
88+
try:
89+
SANDBOX_MAX_RETRIES = max(0, int(os.environ.get("SANDBOX_MAX_RETRIES", "3")))
90+
except ValueError:
91+
logging.getLogger("runner").warning("Invalid SANDBOX_MAX_RETRIES; using default=3")
92+
SANDBOX_MAX_RETRIES = 3
93+
94+
# Backoff delays in seconds for sandbox spawn retries (exponential)
95+
SANDBOX_RETRY_BACKOFF = [1, 2, 4]
96+
9497

9598
def get_gpu_config(gpu_key: str):
9699
"""Resolve a GPU label key to a Modal GPU config object."""

0 commit comments

Comments
 (0)