Skip to content

Suggest bundle.engine config alternative in direct-only resource error#5295

Merged
janniklasrose merged 3 commits into
mainfrom
janniklasrose/direct-only-text
May 21, 2026
Merged

Suggest bundle.engine config alternative in direct-only resource error#5295
janniklasrose merged 3 commits into
mainfrom
janniklasrose/direct-only-text

Conversation

@janniklasrose
Copy link
Copy Markdown
Contributor

Changes

Update the error emitted by ValidateDirectOnlyResources (raised when a direct-only resource type — catalogs, external locations, vector search endpoints — is declared while running with the terraform engine) to mention both ways of switching to the direct engine:

Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set bundle.engine: direct in your databricks.yml to use ... resources.

Why

The previous wording only pointed users at the env var. bundle.engine is the equivalent (and usually more durable) configuration knob, so mentioning it makes the error actionable for users who prefer to declare engine choice in databricks.yml instead of plumbing an env var through their workflow.

Tests

  • go test ./bundle/config/mutator/ -run TestValidateDirectOnlyResources — unit tests updated to assert the new message.
  • go test ./acceptance -run TestAccept/bundle/validate/catalog_requires_direct_mode — acceptance snapshot updated.
  • ./task fmt, ./task checks, ./task lint — clean.

This PR was written by Claude Code.

@janniklasrose janniklasrose enabled auto-merge May 21, 2026 11:02
@janniklasrose janniklasrose added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 60b7aef May 21, 2026
25 checks passed
@janniklasrose janniklasrose deleted the janniklasrose/direct-only-text branch May 21, 2026 11:41
TanishqDatabricks pushed a commit to TanishqDatabricks/cli that referenced this pull request May 22, 2026
databricks#5295)

## Changes
Update the error emitted by `ValidateDirectOnlyResources` (raised when a
direct-only resource type — catalogs, external locations, vector search
endpoints — is declared while running with the terraform engine) to
mention both ways of switching to the direct engine:

> Please set the `DATABRICKS_BUNDLE_ENGINE` environment variable to
'direct' **or set `bundle.engine: direct` in your databricks.yml** to
use ... resources.

## Why
The previous wording only pointed users at the env var. `bundle.engine`
is the equivalent (and usually more durable) configuration knob, so
mentioning it makes the error actionable for users who prefer to declare
engine choice in `databricks.yml` instead of plumbing an env var through
their workflow.

## Tests
- `go test ./bundle/config/mutator/ -run
TestValidateDirectOnlyResources` — unit tests updated to assert the new
message.
- `go test ./acceptance -run
TestAccept/bundle/validate/catalog_requires_direct_mode` — acceptance
snapshot updated.
- `./task fmt`, `./task checks`, `./task lint` — clean.

_This PR was written by Claude Code._
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.

2 participants