Add bundle.engine config setting for deployment engine selection#4749
Merged
Add bundle.engine config setting for deployment engine selection#4749
bundle.engine config setting for deployment engine selection#4749Conversation
Collaborator
|
Commit: 485496a
18 interesting tests: 9 SKIP, 7 KNOWN, 1 flaky, 1 RECOVERED
Top 20 slowest tests (at least 2 minutes):
|
6d4cadb to
bd5d33e
Compare
denik
added a commit
that referenced
this pull request
Mar 16, 2026
## Changes - Remove `SkipEngineEnvVar` field from `ProcessOptions` in `process.go` - In `migrate.go`, clear `DATABRICKS_BUNDLE_ENGINE` in the context via `env.Set(ctx, engine.EnvVar, "")` before calling `ProcessBundleRet`, achieving the same effect ## Why Simplify env var handling for #4749 ## Test plan Existing tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Add `engine` field to the `Deployment` struct, allowing users to configure
the deployment engine ("terraform" or "direct") in their bundle config at
the bundle or target level. The env var DATABRICKS_BUNDLE_ENGINE takes
priority over the config setting.
When state exists with a different engine than configured, a warning is
issued (instead of an error) pointing to the source of the mismatch, and
the existing state's engine is used.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add ValidateEngine to FastValidate checks - Add enum constraint (terraform/direct) to JSON schema - Update annotations with description for engine field - Update migrate command and --plan error messages to mention config Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Engine mismatch between env var and state now produces a warning instead of an error. Update test scripts to remove musterr expectations and adjust titles accordingly. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Revert acceptance test outputs that were regenerated by make test-update but are unrelated to the engine config feature. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-authored-by: Isaac
Co-authored-by: Isaac
Co-authored-by: Isaac
- Rename EngineRequest to EngineSetting across the codebase - Rename RequestFromEnv to SettingFromEnv - Inline engine.Resolve logic into ResolveEngineSetting - Remove the standalone Resolve function from engine package - Rename ResolveEngineRequest to ResolveEngineSetting Co-authored-by: Isaac
Co-authored-by: Isaac
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Rename acceptance/bundle/validate/engine-config to invalid-engine-bundle for clarity, and add a new invalid-engine-target test that validates engine config errors when set at the target level. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
When the deployment engine setting from DATABRICKS_BUNDLE_ENGINE mismatches the existing state engine, log at info level (hidden by default) instead of warning. Config-based mismatches still warn. Adds acceptance test covering both behaviors and invalid env var error. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replace IsEnvVar bool with ConfigType EngineType in EngineSetting so the caller can distinguish whether the config agrees with the state independently of the effective (env var) setting. Warning logic: warn only when both the effective engine and the config engine disagree with the state. If the env var overrides a config that matches the state, log at info level to avoid noise. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Migration only makes sense when moving from terraform to direct. If the config explicitly sets engine: terraform, the migrated state would immediately be overridden on the next deploy. Fail early with a message directing the user to change the setting to "engine: direct" first. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
e29caf1 to
1022af2
Compare
ilyakuz-db
approved these changes
Mar 16, 2026
Ensures forward slashes on Windows in the source path shown in the engine/state mismatch warning. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
rauchy
pushed a commit
that referenced
this pull request
Mar 17, 2026
## Changes - Remove `SkipEngineEnvVar` field from `ProcessOptions` in `process.go` - In `migrate.go`, clear `DATABRICKS_BUNDLE_ENGINE` in the context via `env.Set(ctx, engine.EnvVar, "")` before calling `ProcessBundleRet`, achieving the same effect ## Why Simplify env var handling for #4749 ## Test plan Existing tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
rauchy
pushed a commit
that referenced
this pull request
Mar 17, 2026
…4749) ## Summary Add a new `engine` field at the bundle/target level that allows users to configure the deployment engine (`"terraform"` or `"direct"`) in their bundle config. ### Behavior - New bundles (no existing state): uses the configured engine, or defaults to `terraform` - Existing bundles (state present): if the configured engine doesn't match state, a **warning** is issued pointing to the config source, and the existing state's engine is used. Note, this is different from current behaviour, where databricks CLI refuses to proceed with config/state mismatch. - Priority: state > `DATABRICKS_BUNDLE_ENGINE` env var > `bundle.engine` config > default ### Example ```yaml bundle: name: my-bundle engine: direct targets: production: bundle: engine: terraform ``` ## Test plan Unit tests and acceptance tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
deco-sdk-tagging bot
added a commit
that referenced
this pull request
Mar 18, 2026
## Release v0.295.0 ### Notable Changes * Databricks Asset Bundles have been renamed to Declarative Automation Bundles (DABs). This is a non-breaking change; no code or configuration modifications are required. See the [FAQ](https://docs.databricks.com/aws/en/dev-tools/bundles/faqs#why-was-databricks-asset-bundles-renamed-to-declarative-automation-bundles). * Add `bundle.engine` config setting to select the deployment engine (`terraform` or [`direct`](https://docs.databricks.com/aws/en/dev-tools/bundles/direct)). The `bundle.engine` setting takes precedence over the `DATABRICKS_BUNDLE_ENGINE` environment variable. When the configured engine doesn't match existing deployment state, a warning is issued and the existing engine is used ([#4749](#4749), [#4782](#4782)) ### CLI * Add `databricks auth switch` command for setting the default profile ([#4651](#4651)) * Add positional argument support to `auth logout` ([#4744](#4744)) * Strip trailing slash from host in `auth login`, `auth token`, and `configure` commands ([#4633](#4633)) ### Bundles * Standardize `personal_schemas` enum across bundle templates ([#4401](#4401)) * engine/direct: Fix permanent drift on experiment name field ([#4627](#4627)) * engine/direct: Fix permissions state path to match input config schema ([#4703](#4703)) * Add default project name and success message to default-scala template ([#4661](#4661)) * Skip enum validation for unresolved variable references ([#4752](#4752)) * engine/direct: Support references to/from grants ([#4774](#4774))
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.
Summary
Add a new
enginefield at the bundle/target level that allows users to configure the deployment engine ("terraform"or"direct") in their bundle config.Behavior
terraformDATABRICKS_BUNDLE_ENGINEenv var >bundle.engineconfig > defaultExample
Test plan
Unit tests and acceptance tests.
🤖 Generated with Claude Code