Optimize Beam JS sandbox lifecycle and command startup - #49
Closed
luke-lombardi wants to merge 4 commits into
Closed
Optimize Beam JS sandbox lifecycle and command startup#49luke-lombardi wants to merge 4 commits into
luke-lombardi wants to merge 4 commits into
Conversation
…exec # Conflicts: # package-lock.json
Contributor
Author
|
Superseded by beam-cloud/beam-client#74. The publishable JavaScript SDK source now lives under |
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.
What changed
waitexec option and consume inline exit status/stdout/stderr responses.Why
ComputeSDK's
node -vprobe paid several avoidable HTTP round trips and a 100 ms polling interval after every sandbox became ready. Concurrent first-use creates could also collide in file synchronization and fail withSync already in progress.Impact
With the coordinated beta9 polling change, the latest-upstream ComputeSDK production-order run completed:
Validation
npm test -- --runInBand— 140 passed, 3 skippednpm run build— CJS and ESM builds cleannpm pack --dry-run— package validated as 1.0.13Summary by cubic
Improves sandbox startup and stability with inline exec results, transient retries, and shared runtime preparation. Also adds Docker support, filesystem helpers, sandbox examples, and opt-in e2e tests;
workspaceIdis now optional.New Features
waitto return inlineexitCode/stdout/stderrfor short commands; addedexecShell,status/poll/wait, and server-backedlistProcesses.writeText/writeBytes,readText/readBytes, andremove.Image.withDocker()andSandboxDockerManager(docker.version,docker.run,docker.compose); ensures daemon readiness and uses host network/pid namespaces.Performance
wait; reduces polling and round trips.Written for commit adcf058. Summary will update on new commits.