Skip to content

Use the public Sandbox API for sandbox lifecycle commands - #8040

Open
HsingTang wants to merge 4 commits into
mainfrom
HsingTang/sandbox-public-lifecycle
Open

HsingTang wants to merge 4 commits into
mainfrom
HsingTang/sandbox-public-lifecycle

Conversation

@HsingTang

Copy link
Copy Markdown
Contributor

Changes

Use the Go SDK's public Sandbox API for sandbox create, list, status, configuration, start, stop and delete. Preserve CLI status names and JSON field names, wait for creation readiness, and retain accepted sandbox IDs when readiness fails or is cancelled. Omit unavailable gateway-only fields and clarify existing auto-stop behavior in help.

Why

Lifecycle commands still use legacy gateway endpoints, while SSH addresses public Sandbox API resources. The supported SDK lifecycle methods let these commands manage both new and existing sandboxes alongside SSH port forwarding.

Tests

Full Go unit/tools tests and acceptance suite; formatting, checks and full lint; affected sandbox and SSH race tests. HTTP contract tests cover public routes, payloads, pagination, update masks, lifecycle states, errors and cancellation. End-to-end lifecycle, SSH, SCP and SFTP checks passed for both creation paths, including stop/start persistence and cleanup.

This PR was written by Codex.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 33229a87e | Workflow run

Selected 18 changed tests (limit=20, 0 not selected)

18 tests: regression=18 unreleased=0 coverage=0 failing=0
test branch main (5b9a0b6) latest (v1.28.0)
TestAccept/cmd/sandbox/config/update-name ✅ ❌ ❌
TestAccept/cmd/sandbox/create/with-name ✅ ❌ ❌
TestAccept/cmd/sandbox/default/not-found ✅ ❌ ❌
TestAccept/cmd/sandbox/default/set ✅ ❌ ❌
TestAccept/cmd/sandbox/delete/no-tty-no-auto-approve ✅ ❌ ❌
TestAccept/cmd/sandbox/delete/not-found ✅ ❌ ❌
TestAccept/cmd/sandbox/delete/success ✅ ❌ ❌
TestAccept/cmd/sandbox/forward/forward ✅ ❌ ❌
TestAccept/cmd/sandbox/forward/not-found ✅ ❌ ❌
TestAccept/cmd/sandbox/list/empty ✅ ❌ ❌
TestAccept/cmd/sandbox/list/json ✅ ❌ ❌
TestAccept/cmd/sandbox/list/region-unavailable ✅ ❌ ❌
TestAccept/cmd/sandbox/list/with-entries ✅ ❌ ❌
TestAccept/cmd/sandbox/start/already-running ✅ ❌ ❌
TestAccept/cmd/sandbox/status/json ✅ ❌ ❌
TestAccept/cmd/sandbox/status/not-found ✅ ❌ ❌
TestAccept/cmd/sandbox/status/running ✅ ❌ ❌
TestAccept/cmd/sandbox/stop/success ✅ ❌ ❌
TestAccept/cmd/sandbox/config/update-name: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [58 bytes] {"sandbox_id":"happy-panda-1234","name":"renamed-project"}
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "PATCH /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n  id         happy-panda-1234\n  name       renamed-project\n  autostop   15m\n\n"
        	            	actual  : "Error: failed to update sandbox happy-panda-1234: No stub found for pattern: PATCH /api/2.0/lakebox/sandboxes/happy-panda-1234\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,6 +1,4 @@
        	            	+Error: failed to update sandbox happy-panda-1234: No stub found for pattern: PATCH /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	            	-  id         happy-panda-1234
        	            	-  name       renamed-project
        	            	-  autostop   15m
        	            	+Exit code: 1
        	            	 
        	            	-
        	Test:       	TestAccept/cmd/sandbox/config/update-name
        	Messages:   	cmd/sandbox/config/update-name/output.txt vs /tmp/TestAcceptcmdsandboxconfigupdate-name4019576389/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/create/with-name: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes
        Body: [33 bytes] {"sandbox":{"name":"my-project"}}
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "POST /api/2.0/lakebox/sandboxes"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "  ✓ Sandbox happy-panda-1234 is running\n  default    happy-panda-1234\n\nhappy-panda-1234\n"
        	            	actual  : "  ✗ Failed to create sandbox\nError: failed to create sandbox: No stub found for pattern: POST /api/2.0/lakebox/sandboxes\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,5 +1,5 @@
        	            	-  ✓ Sandbox happy-panda-1234 is running
        	            	-  default    happy-panda-1234
        	            	+  ✗ Failed to create sandbox
        	            	+Error: failed to create sandbox: No stub found for pattern: POST /api/2.0/lakebox/sandboxes
        	            	 
        	            	-happy-panda-1234
        	            	+Exit code: 1
        	            	 
        	Test:       	TestAccept/cmd/sandbox/create/with-name
        	Messages:   	cmd/sandbox/create/with-name/output.txt vs /tmp/TestAcceptcmdsandboxcreatewith-name2832076087/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/default/not-found: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/no-such-box
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: no sandbox named \"no-such-box\" — `databricks sandbox list` shows available IDs\n"
        	            	actual  : "Error: failed to validate sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-Error: no sandbox named "no-such-box" — `databricks sandbox list` shows available IDs
        	            	+Error: failed to validate sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box
        	            	 
        	Test:       	TestAccept/cmd/sandbox/default/not-found
        	Messages:   	cmd/sandbox/default/not-found/output.txt vs /tmp/TestAcceptcmdsandboxdefaultnot-found3643070291/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/default/set: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Default sandbox set to: happy-panda-1234\n"
        	            	actual  : "Error: failed to validate sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,4 @@
        	            	-Default sandbox set to: happy-panda-1234
        	            	+Error: failed to validate sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/default/set
        	Messages:   	cmd/sandbox/default/set/output.txt vs /tmp/TestAcceptcmdsandboxdefaultset3538536002/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/delete/no-tty-no-auto-approve: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: `databricks sandbox delete` permanently destroys the sandbox; pass --auto-approve to confirm in non-interactive contexts\n"
        	            	actual  : "Error: failed to look up sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-Error: `databricks sandbox delete` permanently destroys the sandbox; pass --auto-approve to confirm in non-interactive contexts
        	            	+Error: failed to look up sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	Test:       	TestAccept/cmd/sandbox/delete/no-tty-no-auto-approve
        	Messages:   	cmd/sandbox/delete/no-tty-no-auto-approve/output.txt vs /tmp/TestAcceptcmdsandboxdeleteno-tty-no-auto-approve2815279902/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/delete/not-found: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/no-such-box
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: no sandbox named \"no-such-box\" — `databricks sandbox list` shows available IDs\n"
        	            	actual  : "Error: failed to look up sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-Error: no sandbox named "no-such-box" — `databricks sandbox list` shows available IDs
        	            	+Error: failed to look up sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box
        	            	 
        	Test:       	TestAccept/cmd/sandbox/delete/not-found
        	Messages:   	cmd/sandbox/delete/not-found/output.txt vs /tmp/TestAcceptcmdsandboxdeletenot-found2715702100/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/delete/success: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "  ✓ Removed happy-panda-1234\n"
        	            	actual  : "Error: failed to look up sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,4 @@
        	            	-  ✓ Removed happy-panda-1234
        	            	+Error: failed to look up sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/delete/success
        	Messages:   	cmd/sandbox/delete/success/output.txt vs /tmp/TestAcceptcmdsandboxdeletesuccess1169490962/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/forward/forward: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n=== The command reports the forward once it is listening\n\n>>> retry --until Press Ctrl-C to stop. cat LOG.forward\nForwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080\nPress Ctrl-C to stop.\n\n=== A local request reaches the sandbox app through the forward route\n\n>>> curl -sS -X POST -H X-Databricks-Org-Id: 999 -d ping http://127.0.0.1:[LOCAL_PORT]/api/items?page=2\nhello from the sandbox app\n\n=== The workspace receives the CLI's routing header in place of the caller's\n\n>>> print_requests.py //sandbox-proxy\n{\n  \"headers\": {\n    \"X-Databricks-Org-Id\": [\n      \"[WORKSPACE_ID]\"\n    ]\n  },\n  \"method\": \"POST\",\n  \"path\": \"/sandbox-proxy/sandboxes/happy-panda-1234/ports/10080/api/items\",\n  \"q\": {\n    \"page\": \"2\"\n  },\n  \"raw_body\": \"ping\"\n}\n"
        	            	actual  : "\n=== The command reports the forward once it is listening\n\n>>> retry --until Press Ctrl-C to stop. cat LOG.forward\n  ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\nForwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080\nPress Ctrl-C to stop.\n\n=== A local request reaches the sandbox app through the forward route\n\n>>> curl -sS -X POST -H X-Databricks-Org-Id: 999 -d ping http://127.0.0.1:[LOCAL_PORT]/api/items?page=2\nhello from the sandbox app\n\n=== The workspace receives the CLI's routing header in place of the caller's\n\n>>> print_requests.py //sandbox-proxy\n{\n  \"headers\": {\n    \"X-Databricks-Org-Id\": [\n      \"[WORKSPACE_ID]\"\n    ]\n  },\n  \"method\": \"POST\",\n  \"path\": \"/sandbox-proxy/sandboxes/happy-panda-1234/ports/10080/api/items\",\n  \"q\": {\n    \"page\": \"2\"\n  },\n  \"raw_body\": \"ping\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,2 +4,3 @@
        	            	 >>> retry --until Press Ctrl-C to stop. cat LOG.forward
        	            	+  ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 Forwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080
        	Test:       	TestAccept/cmd/sandbox/forward/forward
        	Messages:   	cmd/sandbox/forward/forward/output.txt vs /tmp/TestAcceptcmdsandboxforwardforward3162774347/002/output.txt
    acceptance_test.go:1180: 
        LOG.forward:   ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        LOG.forward: Forwarding http://127.0.0.1:35917 -> happy-panda-1234:10080
        LOG.forward: Press Ctrl-C to stop.

latest (v1.28.0):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n=== The command reports the forward once it is listening\n\n>>> retry --until Press Ctrl-C to stop. cat LOG.forward\nForwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080\nPress Ctrl-C to stop.\n\n=== A local request reaches the sandbox app through the forward route\n\n>>> curl -sS -X POST -H X-Databricks-Org-Id: 999 -d ping http://127.0.0.1:[LOCAL_PORT]/api/items?page=2\nhello from the sandbox app\n\n=== The workspace receives the CLI's routing header in place of the caller's\n\n>>> print_requests.py //sandbox-proxy\n{\n  \"headers\": {\n    \"X-Databricks-Org-Id\": [\n      \"[WORKSPACE_ID]\"\n    ]\n  },\n  \"method\": \"POST\",\n  \"path\": \"/sandbox-proxy/sandboxes/happy-panda-1234/ports/10080/api/items\",\n  \"q\": {\n    \"page\": \"2\"\n  },\n  \"raw_body\": \"ping\"\n}\n"
        	            	actual  : "\n=== The command reports the forward once it is listening\n\n>>> retry --until Press Ctrl-C to stop. cat LOG.forward\n  ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\nForwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080\nPress Ctrl-C to stop.\n\n=== A local request reaches the sandbox app through the forward route\n\n>>> curl -sS -X POST -H X-Databricks-Org-Id: 999 -d ping http://127.0.0.1:[LOCAL_PORT]/api/items?page=2\nhello from the sandbox app\n\n=== The workspace receives the CLI's routing header in place of the caller's\n\n>>> print_requests.py //sandbox-proxy\n{\n  \"headers\": {\n    \"X-Databricks-Org-Id\": [\n      \"[WORKSPACE_ID]\"\n    ]\n  },\n  \"method\": \"POST\",\n  \"path\": \"/sandbox-proxy/sandboxes/happy-panda-1234/ports/10080/api/items\",\n  \"q\": {\n    \"page\": \"2\"\n  },\n  \"raw_body\": \"ping\"\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -4,2 +4,3 @@
        	            	 >>> retry --until Press Ctrl-C to stop. cat LOG.forward
        	            	+  ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 Forwarding http://127.0.0.1:[LOCAL_PORT] -> happy-panda-1234:10080
        	Test:       	TestAccept/cmd/sandbox/forward/forward
        	Messages:   	cmd/sandbox/forward/forward/output.txt vs /tmp/TestAcceptcmdsandboxforwardforward37292106/002/output.txt
    acceptance_test.go:1180: 
        LOG.forward:   ! Could not resolve sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        LOG.forward: Forwarding http://127.0.0.1:55957 -> happy-panda-1234:10080
        LOG.forward: Press Ctrl-C to stop.
TestAccept/cmd/sandbox/forward/not-found: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/no-such-box
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: no sandbox named \"no-such-box\" — `databricks sandbox list` shows available IDs\n"
        	            	actual  : "  ! Could not resolve sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box\nForwarding http://127.0.0.1:44223 -> no-such-box:10080\nPress Ctrl-C to stop.\n\nError: Test script killed due to a timeout (2m0s)\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,6 @@
        	            	-Error: no sandbox named "no-such-box" — `databricks sandbox list` shows available IDs
        	            	+  ! Could not resolve sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box
        	            	+Forwarding http://127.0.0.1:44223 -> no-such-box:10080
        	            	+Press Ctrl-C to stop.
        	            	 
        	            	+Error: Test script killed due to a timeout (2m0s)
        	            	+
        	Test:       	TestAccept/cmd/sandbox/forward/not-found
        	Messages:   	cmd/sandbox/forward/not-found/output.txt vs /tmp/TestAcceptcmdsandboxforwardnot-found444284349/002/output.txt
FAIL

latest (v1.28.0):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/no-such-box
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: no sandbox named \"no-such-box\" — `databricks sandbox list` shows available IDs\n"
        	            	actual  : "  ! Could not resolve sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box\nForwarding http://127.0.0.1:41899 -> no-such-box:10080\nPress Ctrl-C to stop.\n\nError: Test script killed due to a timeout (2m0s)\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,6 @@
        	            	-Error: no sandbox named "no-such-box" — `databricks sandbox list` shows available IDs
        	            	+  ! Could not resolve sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box
        	            	+Forwarding http://127.0.0.1:41899 -> no-such-box:10080
        	            	+Press Ctrl-C to stop.
        	            	 
        	            	+Error: Test script killed due to a timeout (2m0s)
        	            	+
        	Test:       	TestAccept/cmd/sandbox/forward/not-found
        	Messages:   	cmd/sandbox/forward/not-found/output.txt vs /tmp/TestAcceptcmdsandboxforwardnot-found3087942817/002/output.txt
FAIL
TestAccept/cmd/sandbox/list/empty: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes?page_size=100
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "  No sandboxes found.\n"
        	            	actual  : "Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,4 @@
        	            	-  No sandboxes found.
        	            	+Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/list/empty
        	Messages:   	cmd/sandbox/list/empty/output.txt vs /tmp/TestAcceptcmdsandboxlistempty3594680023/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/list/json: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes?page_size=100
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "[\n  {\n    \"sandboxId\": \"happy-panda-1234\",\n    \"status\": \"Running\",\n    \"name\": \"my-project\",\n    \"idleTimeout\": \"900s\",\n    \"noAutostop\": false\n  }\n]\n"
        	            	actual  : "Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,10 +1,4 @@
        	            	-[
        	            	-  {
        	            	-    "sandboxId": "happy-panda-1234",
        	            	-    "status": "Running",
        	            	-    "name": "my-project",
        	            	-    "idleTimeout": "900s",
        	            	-    "noAutostop": false
        	            	-  }
        	            	-]
        	            	+Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/list/json
        	Messages:   	cmd/sandbox/list/json/output.txt vs /tmp/TestAcceptcmdsandboxlistjson2907385343/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/list/region-unavailable: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes?page_size=100
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: failed to list sandboxes: the Databricks Sandbox feature is not available in your region. See https://docs.databricks.com/compute/serverless/sandbox\n\nExit code: 1\n"
        	            	actual  : "Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-Error: failed to list sandboxes: the Databricks Sandbox feature is not available in your region. See https://docs.databricks.com/compute/serverless/sandbox
        	            	+Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes
        	            	 
        	Test:       	TestAccept/cmd/sandbox/list/region-unavailable
        	Messages:   	cmd/sandbox/list/region-unavailable/output.txt vs /tmp/TestAcceptcmdsandboxlistregion-unavailable1865517210/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/list/with-entries: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes?page_size=100
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n  ID                    NAME          STATUS      AUTOSTOP    DEFAULT\n  ───────────────────────────────────────────────────────────────────\n  happy-panda-1234      my-project    running     15m         \n  sad-otter-5678        -             stopped     10m         \n  creating-newt-9999    -             creating…   never       \n\n"
        	            	actual  : "Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,8 +1,4 @@
        	            	+Error: failed to list sandboxes: No stub found for pattern: GET /api/2.0/lakebox/sandboxes
        	            	 
        	            	-  ID                    NAME          STATUS      AUTOSTOP    DEFAULT
        	            	-  ───────────────────────────────────────────────────────────────────
        	            	-  happy-panda-1234      my-project    running     15m         
        	            	-  sad-otter-5678        -             stopped     10m         
        	            	-  creating-newt-9999    -             creating…   never       
        	            	+Exit code: 1
        	            	 
        	            	-
        	Test:       	TestAccept/cmd/sandbox/list/with-entries
        	Messages:   	cmd/sandbox/list/with-entries/output.txt vs /tmp/TestAcceptcmdsandboxlistwith-entries4060011700/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/start/already-running: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234/start
        Body: [33 bytes] {"sandbox_id":"happy-panda-1234"}
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "POST /api/2.0/lakebox/sandboxes/happy-panda-1234/start"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "  ✓ Already running happy-panda-1234\n"
        	            	actual  : "  ✗ Failed to start happy-panda-1234\nError: failed to start sandbox happy-panda-1234: No stub found for pattern: POST /api/2.0/lakebox/sandboxes/happy-panda-1234/start\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,5 @@
        	            	-  ✓ Already running happy-panda-1234
        	            	+  ✗ Failed to start happy-panda-1234
        	            	+Error: failed to start sandbox happy-panda-1234: No stub found for pattern: POST /api/2.0/lakebox/sandboxes/happy-panda-1234/start
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/start/already-running
        	Messages:   	cmd/sandbox/start/already-running/output.txt vs /tmp/TestAcceptcmdsandboxstartalready-running2098448297/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/status/json: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "{\n  \"sandboxId\": \"happy-panda-1234\",\n  \"status\": \"Running\",\n  \"name\": \"my-project\",\n  \"idleTimeout\": \"1800s\",\n  \"noAutostop\": false\n}\n"
        	            	actual  : "Error: failed to get sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,8 +1,4 @@
        	            	-{
        	            	-  "sandboxId": "happy-panda-1234",
        	            	-  "status": "Running",
        	            	-  "name": "my-project",
        	            	-  "idleTimeout": "1800s",
        	            	-  "noAutostop": false
        	            	-}
        	            	+Error: failed to get sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/status/json
        	Messages:   	cmd/sandbox/status/json/output.txt vs /tmp/TestAcceptcmdsandboxstatusjson1020322219/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/status/not-found: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/no-such-box
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/no-such-box"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "Error: no sandbox named \"no-such-box\" — `databricks sandbox list` shows available IDs\n"
        	            	actual  : "Error: failed to get sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	-Error: no sandbox named "no-such-box" — `databricks sandbox list` shows available IDs
        	            	+Error: failed to get sandbox no-such-box: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/no-such-box
        	            	 
        	Test:       	TestAccept/cmd/sandbox/status/not-found
        	Messages:   	cmd/sandbox/status/not-found/output.txt vs /tmp/TestAcceptcmdsandboxstatusnot-found2190278278/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/status/running: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234
        Body: [0 bytes] 
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.0/lakebox/sandboxes/happy-panda-1234"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "\n  id         happy-panda-1234\n  name       my-project\n  status     running\n  autostop   30m\n\n"
        	            	actual  : "Error: failed to get sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,7 +1,4 @@
        	            	+Error: failed to get sandbox happy-panda-1234: No stub found for pattern: GET /api/2.0/lakebox/sandboxes/happy-panda-1234
        	            	 
        	            	-  id         happy-panda-1234
        	            	-  name       my-project
        	            	-  status     running
        	            	-  autostop   30m
        	            	+Exit code: 1
        	            	 
        	            	-
        	Test:       	TestAccept/cmd/sandbox/status/running
        	Messages:   	cmd/sandbox/status/running/output.txt vs /tmp/TestAcceptcmdsandboxstatusrunning4294104957/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

TestAccept/cmd/sandbox/stop/success: branch ✅ | main (5b9a0b6) ❌ | latest (v1.28.0) ❌

main (5b9a0b6):

server.go:281: No handler for URL: /api/2.0/lakebox/sandboxes/happy-panda-1234/stop
        Body: [33 bytes] {"sandbox_id":"happy-panda-1234"}
        
        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "POST /api/2.0/lakebox/sandboxes/happy-panda-1234/stop"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1143
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:686
        	Error:      	Not equal: 
        	            	expected: "  ✓ Stopped happy-panda-1234\n"
        	            	actual  : "  ✗ Failed to stop happy-panda-1234\nError: failed to stop sandbox happy-panda-1234: No stub found for pattern: POST /api/2.0/lakebox/sandboxes/happy-panda-1234/stop\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,5 @@
        	            	-  ✓ Stopped happy-panda-1234
        	            	+  ✗ Failed to stop happy-panda-1234
        	            	+Error: failed to stop sandbox happy-panda-1234: No stub found for pattern: POST /api/2.0/lakebox/sandboxes/happy-panda-1234/stop
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/cmd/sandbox/stop/success
        	Messages:   	cmd/sandbox/stop/success/output.txt vs /tmp/TestAcceptcmdsandboxstopsuccess2669239178/002/output.txt

latest (v1.28.0): same output as main (5b9a0b6)

@HsingTang
HsingTang marked this pull request as ready for review November 26, 2026 02:22
@HsingTang
HsingTang requested review from a team as code owners November 26, 2026 02:22

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 2b5d1b2. Each finding was verified against the code.

Not ready yet: 1 blocking issue(s), tagged [blocking].

This PR moves the sandbox lifecycle commands (create, list, status, config, start, stop, delete) from the legacy gateway endpoints to the SDK's public Sandbox API, and adds a readiness wait to create. The transport swap looks sound and is well covered by HTTP contract tests. The way CLI flags and outputs map onto the public resource changes behavior in ways the description doesn't mention. The main one: --no-autostop=false now overwrites a user's configured idle timeout with 10m. Smaller ones: conflicting auto-stop flags are resolved silently, unnamed sandboxes report their ID as name, and any unmapped state becomes "Unknown", which the wait loops never treat as terminal.

Questions

  1. create now generates sandbox-<uuid> IDs (44 characters), where the server used to issue short ones like happy-panda-1234. Users type these IDs into ssh, start, stop and config, and every help example still uses the short form. Is this format intended? Could the request omit SandboxId so the server picks it, or use a shorter random suffix if the goal is only to know the ID after a timed-out create? (non-blocking)
  2. --idle-timeout 0 used to be documented as "clear and revert to the manager's default (10m)". It now sends 0s to the public API, which disables idle auto-stop, and only the help text changed. Scripts that pass 0 to reset would leave compute running. Should 0 map to defaultAutoStopSecs, leaving --no-autostop as the only way to disable, or should the new meaning stay and be called out in the changelog? (non-blocking)
  3. Lifecycle responses no longer carry a gateway host. That makes createResponse.GatewayHost, sandboxEntry.GatewayHost, the setGatewayHost calls in create/start/config/status/list, and the related comments in list.go and state.go dead code. removeSandbox still deletes the profile's GatewayHosts entry, and now only register writes it back. Should this PR remove that plumbing, or should it go in a follow-up? (non-blocking)

Comment thread cmd/sandbox/api.go Resolved
Comment thread cmd/sandbox/api.go Resolved
Comment thread cmd/sandbox/api.go Resolved
Comment thread cmd/sandbox/api.go Resolved
Comment thread cmd/sandbox/api.go Resolved
Comment thread cmd/sandbox/create.go Resolved
Comment thread cmd/sandbox/create.go Resolved
@HsingTang

HsingTang commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the verified review feedback in 33229a8. The create path records accepted IDs once and labels its readiness wait as provisioning; the release note now calls out the actual output/ID changes. Added HTTP regressions for existing name/state/auto-stop mappings. Formatting, checks, full lint, sandbox unit/acceptance tests and affected race tests pass.

On the general questions:

  1. The pinned public CreateSandboxRequest uses a client-supplied sandbox_id with lowercase/hyphen/63-character constraints. sandbox- satisfies that contract, retains an inspectable ID for uncertain outcomes, and avoids a new naming dependency. Existing short IDs remain accepted by lifecycle and SSH commands.
  2. The old endpoint already translates an explicit zero timeout to disabled auto-stop and no_autostop=false without a timeout to 600s. The old help did not describe that translation correctly. This migration preserves the service behavior; the wire tests and help state it explicitly.
  3. Gateway key registration and cached compatibility plumbing are kept outside this lifecycle transport change. Current sandbox SSH uses workspace-authenticated port forwarding and does not require a gateway response field.

The eight inline comments have individual dispositions; this does not substitute for owner approval.

Public regression coverage: timeout/reset and flag precedence, name/state/auto-stop read compatibility, provisioning and cancellation, and generated ID with typed errors.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant