fix: reject daytona resource override flags#32
Conversation
fb25d89 to
24d4c7a
Compare
|
Rebased onto current main ( Local verification on this commit: CLI wiring smoke (no creds set):
Live API smoke (warmup → run → ssh → stop) requires a Happy to keep this in draft for a scope discussion, or convert to ready-for-review on your signal — your call. |
24d4c7a to
7b08d93
Compare
Live API verification completeRan the full lifecycle against the real Daytona API ( Bugs caught and fixed by the live smoke
Verified output (key + tokens scrubbed)Still user-side prerequisites (unchanged)
Quality gates on
|
|
Follow-up fixes pushed in Addressed the review blockers:
Added regression coverage for all three: coordinator bypass, official label wrapper payload, and stopped-sandbox reuse before SSH token creation. Local verification on the pushed commit: gofmt -w internal/cli/daytona.go internal/cli/daytona_test.go internal/cli/target.go
go test -count=1 ./...
go test -race -count=1 ./internal/cli/...
go vet ./...
go build -trimpath ./cmd/crabbox
git diff --checkAll passed. Scope remains unchanged: direct Daytona provider only, no Worker/coordinator, VNC, Windows/macOS, Tailscale, or CLI wrapper expansion. |
steipete
left a comment
There was a problem hiding this comment.
Thanks for the careful follow-up and the live Daytona smoke. I’m leaving this as requested changes for now because the current merge result is not narrow anymore.
I fetched GitHub’s merge ref for this PR against current main (0bb34bd) and compared the actual merge result:
git fetch origin pull/32/merge:refs/tmp/crabbox-pr-32-merge
git diff --stat main..refs/tmp/crabbox-pr-32-mergeThat merge result is 61 files changed, 1866 insertions(+), 3163 deletions(-), and it would delete or rewrite unrelated current-main code/docs, including:
D docs/commands/code.md
M docs/commands/webvnc.md
D docs/features/image-bake-runbook.md
D docs/features/prebaked-images.md
D internal/cli/code.go
M worker/src/fleet.ts
So before we can review/approve CI, please rebase onto current main and keep the diff limited to the Daytona provider surface. Expected shape is roughly the new Daytona provider + tests + provider/docs/changelog wiring, without removing the current code/webvnc/image-bake work.
I’m intentionally not approving the pending fork CI run while the merge ref has this unrelated rollback shape.
|
I did a deeper pass on the Daytona-specific code as well. Separate from the stale merge-ref/rebase blocker above, I found two things worth fixing before this should be considered ready:
if daytonaSnapshot(cfg) == "" {
return ..., exit(2, "provider=daytona requires daytona.snapshot or CRABBOX_DAYTONA_SNAPSHOT")
}Then later it only sends That means Best fix: either drop/hide the resource override surface from this first snapshot-only PR, or add the proper image/base-image creation mode with the correct request shape. I’d strongly prefer the former for this narrow PR unless we know we need image creation now.
The docs added here say the org ID is “only required for JWT auth”, and Daytona’s SDK docs say Local proof I ran on the current PR head ( go test -count=1 ./...
go vet ./...
go test -race -count=1 ./internal/cli/...
go build -trimpath ./cmd/crabboxThose pass, so this is not a compile/test-red problem; it is API-surface correctness before we bless the new provider. |
|
Thanks! Will review. |
00be307 to
b8f08f2
Compare
|
Rebased and pushed Addressed the latest Daytona review items:
Verification on pushed commit go test -count=1 ./...
go test -race -count=1 ./internal/cli/...
go vet ./...
go build -trimpath ./cmd/crabbox
git diff --check origin/main...HEADAll passed. |
64f8ad3 to
137f98d
Compare
Live verification on
|
137f98d to
eb2fc94
Compare
Current scope
This branch is rebased onto current
main(a20584c). Currentmainalready contains the Daytona provider implementation, so PR #32 is now narrowed to the remaining review-safety delta Peter asked for: explicit Daytona--classand--typeinputs fail fast instead of looking functional while Daytona creation remains snapshot-first.Review comments addressed
main: the provider is registered withCoordinatorNever.daytona.NewSandboxLabels(labels).DAYTONA_JWT_TOKENfails fast unlessDAYTONA_ORGANIZATION_IDis also configured.--daytona-cpu,--daytona-memory, or--daytona-disk; this PR also rejects explicit global--classand--typeforprovider=daytona.Verification
Passed on pushed commit
eb2fc94:gh pr checkscurrently reports no checks for this branch.Daytona docs/source check
Checked against Daytona's current official docs and SDK source: Go SDK JWT auth requires
DAYTONA_ORGANIZATION_ID, snapshot creation is distinct from image creation with resources, labels use theSandboxLabelswrapper, and stopped sandboxes are restartable through the documented start path.