Make bundle.engine setting higher priority than DATABRICKS_BUNDLE_ENGINE#4782
Merged
Make bundle.engine setting higher priority than DATABRICKS_BUNDLE_ENGINE#4782
Conversation
Add a new environment variable DATABRICKS_BUNDLE_ENGINE_DEFAULT that sets the default deployment engine. Priority order: state > DATABRICKS_BUNDLE_ENGINE > config > DATABRICKS_BUNDLE_ENGINE_DEFAULT
…tting Remove the two-phase design where SettingFromEnv read env vars before bundle load and ResolveEngineSetting merged them later. ResolveEngineSetting now takes ctx and reads env vars directly, eliminating SettingFromEnv, defaultFromEnv, and the DefaultType field from EngineSetting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The single-directory test was broken: the first deploy (terraform) created remote state on the mock server, which persisted after `rm -fr .databricks`. The second deploy found that remote state and the state-priority logic overrode DATABRICKS_BUNDLE_ENGINE_DEFAULT=direct, causing it to use terraform. Split into two subdirectories (direct/ and terraform/), each running a single first deploy with no prior state. Each gets a fresh mock server. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rity Remove the DATABRICKS_BUNDLE_ENGINE_DEFAULT env var entirely. Change engine resolution priority to: bundle.engine config > DATABRICKS_BUNDLE_ENGINE env var > built-in default (terraform). This means an explicit bundle config always wins, and the env var acts as a fallback when no config is present. A side-effect of the new priority: an invalid DATABRICKS_BUNDLE_ENGINE is silently ignored when bundle.engine is set in config. Remove the engine_default acceptance tests (tested the removed env var). Update engine_mismatch to drop cases that tested env-var-overrides-config (no longer possible) and add a case showing the invalid env var is ignored when config is set. Remove bundle validate from bad_env since ResolveEngineSetting is not called during validate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Commit: 709267d
18 interesting tests: 9 SKIP, 7 RECOVERED, 2 flaky
Top 20 slowest tests (at least 2 minutes):
|
pietern
approved these changes
Mar 18, 2026
1 task
pietern
added a commit
that referenced
this pull request
Mar 18, 2026
## Summary * Add missing changelog entries for CLI and Bundles changes since v0.294.0 * Fix `bundle.engine` priority description (config takes precedence over env var per #4782) * Add docs link for direct deployment engine ## Test plan - [ ] Review changelog entries for accuracy This pull request was AI-assisted by Isaac.
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))
3 tasks
Collaborator
|
Commit: 0ea2dd3
75 interesting tests: 33 MISS, 13 flaky, 12 RECOVERED, 9 KNOWN, 6 FAIL, 1 PANIC, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
## Why The CLI's CODEOWNERS catch-all assigns 6 people to every PR outside a few narrow paths. This creates review noise and diffuses responsibility. We want targeted reviewer suggestions based on who actually worked on the changed code recently. ## Changes Before: Every PR touching core code auto-assigns all 6 CODEOWNERS. No signal about who is best suited to review. Now: A new GitHub Action analyzes git history of the changed files and posts a PR comment with two sections: - **Suggested reviewers** (1-3 people best suited based on recency-weighted git history) - **Eligible reviewers** (everyone from CODEOWNERS who could review, minus the suggested ones) This is additive only. CODEOWNERS and auto-assign stay unchanged. How it works: - Triggers on PR open, synchronize, and ready-for-review (skips drafts and fork PRs) - Classifies changed files by type (source=1.0, tests=0.3, acceptance=0.2, generated=0.0) - Scores contributors using recency-weighted commit history (half-life 150 days) - Resolves git author names to GitHub logins via the GitHub API (no hardcoded alias table to maintain) - Parses `.github/CODEOWNERS` to find eligible reviewers for the changed paths - Updates the comment in-place on re-runs (no notification churn) Implementation: a single Python script (`tools/suggest_reviewers.py`, 281 lines) and a minimal workflow YAML. ## Test plan - [x] Action ran on this PR itself and posted a comment successfully - [x] Verified script parses cleanly, passed `make checks`, passed `ruff format` - [x] Dry-run tested against 4 recent merged PRs with different characteristics: **PR #4784** (66 files, by pietern, big DABs rename): ``` ## Suggested reviewers - @denik -- recent work in `./`, `bundle/`, `cmd/bundle/generate/` Confidence: high ## Eligible reviewers @andrewnester, @anton-107, @lennartkats-db, @shreyas-goenka, @simonfaltum ``` Correctly identifies Denis as the clear top reviewer (2x second place score). All 6 CODEOWNERS shown as eligible. **PR #4782** (13 files, by denik, bundle engine priority): ``` ## Suggested reviewers - @andrewnester -- recent work in `bundle/schema/`, `bundle/internal/schema/`, `cmd/bundle/generate/` - @pietern -- recent work in `bundle/schema/`, `cmd/bundle/generate/`, `bundle/internal/schema/` - @shreyas-goenka -- recent work in `bundle/schema/`, `bundle/internal/schema/`, `cmd/bundle/` Confidence: medium ## Eligible reviewers @anton-107, @simonfaltum ``` Suggests 3 reviewers when scores are close. Remaining CODEOWNERS shown as eligible. **PR #4785** (2 files, by MarioCadenas, apps bug fix): ``` ## Suggested reviewers - @arsenyinfo -- recent work in `cmd/apps/` - @pietern -- recent work in `cmd/apps/` - @pkosiec -- recent work in `cmd/apps/` Confidence: low ## Eligible reviewers @databricks/eng-apps-devex ``` Correctly suggests apps-area contributors (not the catch-all CODEOWNERS). Shows the apps team as eligible. Low confidence since only 2 files. **PR #4774** (28 files, by denik, direct engine grants): ``` ## Suggested reviewers - @andrewnester -- recent work in `bundle/direct/dresources/`, `acceptance/bundle/invariant/` - @shreyas-goenka -- recent work in `bundle/direct/dresources/` Confidence: high ## Eligible reviewers @anton-107, @pietern, @simonfaltum ``` Correctly identifies the two main bundle/direct contributors. High confidence with clear score separation.
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
Why
This makes it possible to use env var as a default but let users opt our per-bundle or per-target level via config setting.