Skip to content

Fix sandbox startup polling through transient Stopped states - #7010

Open
arkaly24-cloud wants to merge 2 commits into
databricks:mainfrom
arkaly24-cloud:fix/sandbox-transient-stopped
Open

arkaly24-cloud wants to merge 2 commits into
databricks:mainfrom
arkaly24-cloud:fix/sandbox-transient-stopped

Conversation

@arkaly24-cloud

@arkaly24-cloud arkaly24-cloud commented Oct 9, 2026 •

Copy link
Copy Markdown

Changes

  • Keep polling through transient Stopped states during sandbox startup and retry start requests at most once every 15 seconds.
  • Preserve terminal failures, timeout and cancellation handling, and stop-wait behavior.
  • Add deterministic polling-loop tests, update the SSH lifecycle regression test, and add a CLI changelog entry.

Why

An accepted start request can be followed by a transient Stopped status. Treating the first such poll as terminal makes databricks sandbox start and databricks sandbox ssh fail before the sandbox can recover.

Tests

  • GOTOOLCHAIN=go1.26.8 go test ./cmd/sandbox -count=1
  • go test -race ./cmd/sandbox -count=1
  • go vet ./cmd/sandbox
  • GOTOOLCHAIN=go1.26.8 go tool -modfile=tools/go.mod golangci-lint run --allow-parallel-runners -j=4 ./cmd/sandbox/...
  • python3.12 tools/validate_nextchanges.py
  • Regression reproduced before the fix; the new virtual-time tests also pass across 25 consecutive runs.
  • Full root/tools Go unit suites (11,935 passed, 126 skipped), doctests, ./task checks, Go/YAML formatting, and full Go lint passed with Go 1.26.8.

Full acceptance testing stopped at its prerequisite check because this machine has jq 1.6, while the suite requires 1.7 or newer. Python formatting/lint could not run because downloading the pinned Ruff version failed on PyPI DNS resolution. No unrelated code changes were made for these environment limitations.

This PR was written with Codex.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This pull request was opened from a fork.

If you're a member of the Databricks organization, please request access to the cli-contrib team and open your pull request from a branch in this repository instead of a fork — fork PRs don't run integration tests automatically and have reduced CI access.

If you're an external contributor, no action is needed; a maintainer will review your pull request.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 7010
  • Commit SHA: 13989561c4a91d40ee6eabbc023d2c14a8910f2b

Checks will be approved automatically on success.

@arkaly24-cloud
arkaly24-cloud marked this pull request as ready for review October 9, 2026 19:59
@arkaly24-cloud
arkaly24-cloud requested review from a team as code owners October 9, 2026 19:59
@arkaly24-cloud
arkaly24-cloud requested a review from rclarey October 9, 2026 19:59

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