Skip to content

Treat non terminated cluster start as a no op - #6917

Open
Hashim1999164 wants to merge 1 commit into
databricks:mainfrom
Hashim1999164:fix/clusters-start-idempotent
Open

Hashim1999164 wants to merge 1 commit into
databricks:mainfrom
Hashim1999164:fix/clusters-start-idempotent

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Oct 3, 2026 •

Copy link
Copy Markdown

Fixes #1372

databricks clusters start help says that if the cluster is not TERMINATED, nothing will happen. The Clusters API instead returns INVALID_STATE when the cluster is already RUNNING (or otherwise not terminated), so scripts that retry start fail even though the docs describe a no op.

This wraps the generated start RunE in the existing clusters override hook and treats apierr.ErrInvalidState as success. Other errors still surface.

Test plan

  • go test ./cmd/workspace/clusters/
  • Against a RUNNING cluster: databricks clusters start CLUSTER_ID exits 0
  • Against a TERMINATED cluster: start still brings it to RUNNING
  • Unrelated start failures still return an error

clusters start help says nothing happens when the cluster is not TERMINATED, but the API returns INVALID_STATE. Swallow that error in the start override so scripts match the documented behavior.
@Hashim1999164
Hashim1999164 requested a review from a team as a code owner October 3, 2026 21:15
@github-actions

github-actions Bot commented Oct 3, 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: 6917
  • Commit SHA: 6a209769f0d63c1bca3b0aa2dfd1f1c54000bd96

Checks will be approved automatically on success.

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.

databricks clusters start fails if cluster is already running, despite documentation to the contrary

1 participant