Suggest bundle.engine config alternative in direct-only resource error#5295
Merged
Conversation
Co-authored-by: Isaac
Co-authored-by: Isaac
Co-authored-by: Isaac
denik
approved these changes
May 21, 2026
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._
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:Why
The previous wording only pointed users at the env var.
bundle.engineis the equivalent (and usually more durable) configuration knob, so mentioning it makes the error actionable for users who prefer to declare engine choice indatabricks.ymlinstead 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.