fix(microsandbox): use msb run --detach with split entrypoint/cmd - #1105
Conversation
msb create became boot-only upstream (superradcompany/microsandbox#1298, unreleased), so the microsandbox driver's entrypoint never executed and the Devsy agent never started, even though msb inspect reported the sandbox as running. Switch Create to `msb run --detach`. Instead of joining Entrypoint+Cmd into one string and re-detecting shell-script shapes (fragile: any argv shape microsandbox's CLI --entrypoint can't represent would be silently dropped, running the image default instead), carry Entrypoint (string) and Cmd ([]string) separately on sandboxSpec, the same split driver.RunOptions and the docker driver already use. --entrypoint sets the executable; a trailing "--" plus argv overrides the image CMD while preserving that entrypoint, matching microsandbox's own OCI ENTRYPOINT/CMD resolution exactly. Fixes #1035
✅ Deploy Preview for devsydev canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Microsandbox driver now stores entrypoints and commands separately. ChangesMicrosandbox run flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change updates microsandbox command invocation and preserves separate entrypoint and command arguments; no actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for images-devsy-sh canceled.
|
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 5 complexity · 0 duplication
Metric Results Complexity 5 Duplication 0
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
msb createbecame boot-only upstream (superradcompany/microsandbox#1298, unreleased): the configured entrypoint no longer executes, somsb inspectreports the sandbox asrunningwhile the Devsy agent never starts.Fix
Switch
Createtomsb run --detach. Instead of joiningEntrypoint+Cmdinto a single string and re-detecting shell-script shapes at the CLI boundary (the approach in #1036 — fragile: any argv shape the CLI's--entrypointstring can't represent gets silently dropped, running the image default instead), carryEntrypoint(string) andCmd([]string) separately onsandboxSpec, mirroring the splitdriver.RunOptionsand the docker driver already use.--entrypointsets the executable; a trailing--plus argv overrides the image CMD while preserving that entrypoint — this matches microsandbox's own OCI ENTRYPOINT/CMD resolution exactly, with no upstream fix required (see superradcompany/microsandbox#1340).Fixes #1035. Supersedes #1036 (closing with credit to the original reporter/diagnosis).
Testing
go test ./pkg/driver/microsandbox/...— all pass, new cases cover: full spec, minimal spec, cmd-without-entrypoint, entrypoint-without-cmd.golangci-lint run ./pkg/driver/microsandbox/...— 0 issues.go build ./...,go vet(incl.microsandbox_integrationbuild tag) — clean.Summary by CodeRabbit
New Features
Bug Fixes