Skip to content

fix: exec runs unbounded by default and is never retried#5

Merged
jackowfish merged 1 commit into
mainfrom
jack/exec-timeout
Jul 15, 2026
Merged

fix: exec runs unbounded by default and is never retried#5
jackowfish merged 1 commit into
mainfrom
jack/exec-timeout

Conversation

@jackowfish

Copy link
Copy Markdown
Contributor

Description

All requests are capped by the client-wide timeout (30s by default currently), which bounds how long sandbox.exec() can run. The retry loop also treated httpx.TimeoutException like any network error, so a command that outlived that could get re-executed server-side up to three more times.

Exec is long-running by nature (the API responds only once the command exits), so the generated exec method now disables the client-side timeout and is never retried: a failed attempt may have executed server-side, and re-sending it could run the command again. A per-call bound is still available through the raw resource (porter.sandboxes.raw.exec_sandbox(id=..., body=..., timeout=120)), and timeouts elsewhere now raise SandboxTimeoutError instead of being retried.

Other endpoints keep the 30s default; the server caps those anyway. The resource files are generated, so the emitter produces the new exec signature and this PR carries the matching output alongside the transport change.

@jackowfish
jackowfish merged commit e74ecca into main Jul 15, 2026
7 checks passed
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.

2 participants