File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 |
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
8881try :
8982 RUNNER_GROUP_ID = int (os .environ .get ("RUNNER_GROUP_ID" , "1" ))
9083except 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
9598def get_gpu_config (gpu_key : str ):
9699 """Resolve a GPU label key to a Modal GPU config object."""
You can’t perform that action at this time.
0 commit comments