Fix git clone timeout controls#573
Merged
whoiskatrin merged 3 commits intomainfrom Apr 10, 2026
Merged
Conversation
Raise the default clone timeout to 10 minutes and let callers override the git clone subprocess timeout per checkout. Thread the override through the SDK and container layers so validation, transport behavior, and timeout reporting stay aligned.
🦋 Changeset detectedLatest commit: e8752d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Contributor
🐳 Docker Images Published
Usage: FROM cloudflare/sandbox:0.0.0-pr-573-e8752d2Version: 📦 Standalone BinaryFor arbitrary Dockerfiles: COPY --from=cloudflare/sandbox:0.0.0-pr-573-e8752d2 /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]Download via GitHub CLI: gh run download 24241616049 -n sandbox-binaryExtract from Docker: docker run --rm cloudflare/sandbox:0.0.0-pr-573-e8752d2 cat /container-server/sandbox > sandbox && chmod +x sandbox |
aron-cf
reviewed
Apr 10, 2026
aron-cf
reviewed
Apr 10, 2026
Co-authored-by: Aron <263346377+aron-cf@users.noreply.github.com>
Co-authored-by: Aron <263346377+aron-cf@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitCheckout()clone timeout from 2 minutes to 10 minutes so larger or slower repositories stop failing on the current hard limitcloneTimeoutMsoverride that is threaded through the SDK, transport layer, request types, container handler, and git servicetimeoutcommand so the API matches what the subprocess actually doesWhy
Users on
0.8.7and0.8.8can hit a hardcoded 120 second timeout in the clone path behindgitCheckout(), even withdepth: 1. This change fixes the immediate product issue and makes the timeout user-controlled without broadening the API beyond the existing checkout primitive.Testing
npm test -w @cloudflare/sandbox -- git-client.test.ts sandbox.test.tsbun test tests/handlers/git-handler.test.ts tests/services/git-service.test.ts tests/managers/git-manager.test.tsnpm run typecheck:e2egit pushpre-push hook:npm run typecheckReviewer Notes
cloneTimeoutMsis intentionally scoped to thegit clonesubprocess. It does not try to represent total wall-clock time including cold start or container readiness retries, which keeps the API semantics explicit.