Skip to content

An open-source, faster Devin alternative

TypeScript

move s3 call for restore

Brian Reardonce2cf673e9f3
diff --git a/internal/worker/grpc_server.go b/internal/worker/grpc_server.go
index be51c8b6..d300d699 100644
--- a/internal/worker/grpc_server.go
+++ b/internal/worker/grpc_server.go
@@ -136,16 +136,11 @@ func (s *GRPCServer) CreateSandbox(ctx context.Context, req *pb.CreateSandboxReq
SecretAllowedHosts: parseSecretAllowedHosts(req.SecretAllowedHosts),
}
- // Warm fork: if checkpoint_id is set, try snapshot-based fork first.
- // ForkFromCheckpoint handles warm fork with cold boot fallback internally.
+ // Warm fork: if checkpoint_id is set, fork from the local checkpoint cache.
+ // ForkFromCheckpoint uses the local cache directly — no S3 needed.
+ // Skip resolveTemplateDrives here: it tries S3 first which can hang on DNS
+ // failures, and ForkFromCheckpoint already handles cache lookup internally.
if req.CheckpointId != "" {
- // Ensure checkpoint drives are cached locally (download from S3 if needed)
- if req.TemplateRootfsKey != "" && req.TemplateWorkspaceKey != "" {
- if _, _, err := s.resolveTemplateDrives(ctx, req.TemplateRootfsKey, req.TemplateWorkspaceKey); err != nil {
- log.Printf("grpc: warm fork %s: resolve drives failed: %v, continuing with ForkFromCheckpoint", req.CheckpointId, err)
- }
- }
-
sb, err := s.manager.ForkFromCheckpoint(ctx, req.CheckpointId, cfg)
if err == nil {
// Register with sandbox router for rolling timeout tracking