update docs to match new templates system, some fixes#68
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Preview Environment DestroyedThe preview environment |
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
Docs: Replace all references to the old Dockerfile-based Templates system with the current Image builder + Snapshots system.
Per-template golden snapshots: When a snapshot/image is built, the worker now captures a golden snapshot from the checkpoint cache. Subsequent
Sandbox.create({ snapshot })uses snapshot restore (~150ms) instead of cold boot (~10s).Proxy readiness: The control plane proxy now blocks requests until async sandbox operations complete, instead of returning 500:
Sandbox.create({ image/snapshot })— exec blocks until VM finishes bootingcreateCheckpoint— exec blocks until VM resumes after pause+snapshotrestoreCheckpoint— exec blocks until restore completes (already worked via pendingCreates)Changes
Docs (6 files)
docs/sandboxes/templates.mdx— Full rewrite with CodeGroup tabs (TS/Python/curl) for both Image builder and Snapshots workflowsdocs/reference/api.mdx— Replace Templates section with Snapshots API, addimage/snapshotfields to create sandbox endpoint, update route tabledocs/reference/typescript-sdk.mdx— Replace Templates with Image + Snapshots sections, add missing params to SandboxOptsdocs/reference/python-sdk.mdx— Replace Template with Image + Snapshots sections, add missing params to Sandbox.createdocs/how-it-works.mdx— Update Templates paragraphdocs/guides/build-a-lovable-clone.mdx— Fix stale Dockerfile referencePer-template golden snapshots (5 files)
proto/worker/worker.proto— Addprepare_goldenfield to CreateCheckpointRequestinternal/firecracker/snapshot.go—RegisterTemplateGoldenFromCache(): reflink-copies checkpoint cache files to golden dir (~1ms),createFromGoldenSnapshot()now checks per-checkpoint goldensinternal/firecracker/manager.go—templateGoldensmap on Manager, lookup increateWithIDbefore cold bootinternal/worker/grpc_server.go— CallRegisterTemplateGoldenFromCachefrom onReady callback whenprepare_goldenis setinternal/api/image_builder.go— SetPrepareGolden: trueon CreateCheckpoint during image buildspkg/types/sandbox.go— AddCheckpointIDfield to SandboxConfigProxy readiness + checkpoint blocking (3 files)
internal/proxy/sandbox_api_proxy.go—waitForReadycallback, blocks proxy until pendingCreates resolvesinternal/api/router.go— Wire waitForReady using existing pendingCreates sync.Mapinternal/api/sandbox.go— Register pendingCreates during createCheckpoint so exec blocks during pause; mark checkpoint ready immediately after gRPC returns (not after S3 upload)Test results (dev.opensandbox.ai)