Skip to content

Improve missing cluster ID guidance - #1545

Open
TangoEnSkai wants to merge 1 commit into
databricks:mainfrom
TangoEnSkai:fix/dbutils-missing-cluster-guidance
Open

Improve missing cluster ID guidance#1545
TangoEnSkai wants to merge 1 commit into
databricks:mainfrom
TangoEnSkai:fix/dbutils-missing-cluster-guidance

Conversation

@TangoEnSkai

Copy link
Copy Markdown

Summary

Improves the error shown when a remote DBUtils operation requires a cluster but no cluster ID is configured.

Fixes #51.

Why

The existing error says that cluster_id is required, but it does not tell users how to provide it. Users can otherwise miss the supported configuration argument and environment variable even though both are documented elsewhere.

What changed

Interface changes

None.

Behavioral changes

  • The missing-cluster error now points users to Config(cluster_id="...") and DATABRICKS_CLUSTER_ID.

Internal changes

  • Updated the existing DBUtils regression test to assert the actionable guidance.

How is this tested?

  • uv run pytest tests/test_dbutils.py -q (19 passed)
  • uv run ruff format --check databricks/sdk/dbutils.py tests/test_dbutils.py
  • git diff --check

Signed-off-by: TangoEnSkai <21152231+TangoEnSkai@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1545
  • Commit SHA: 4ee33b4bb77da521e2ab4f2b546d715f82ee2605

Checks will be approved automatically on success.

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.

Make error handling more user friendly for common accidental mistakes by showing resolution steps

1 participant