Skip to content

Encourage the use of root_path in production to ensure single deployment - #1712

Merged
lennartkats-db merged 12 commits into
databricks:mainfrom
lennartkats-db:cp-encourage-root-path
Jan 13, 2025
Merged

Encourage the use of root_path in production to ensure single deployment#1712
lennartkats-db merged 12 commits into
databricks:mainfrom
lennartkats-db:cp-encourage-root-path

Conversation

@lennartkats-db

Copy link
Copy Markdown
Contributor

Changes

This updates mode: production to allow root_path to indicate uniqueness. Historically, we required run_as for this, which isn't actually very effective for that purpose. run_as also had the problem that it doesn't work for pipelines.

This is a cherry-pick from #1387

Comment threadbundle/config/mutator/cleanup_targets.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go
Comment threadbundle/config/mutator/process_target_mode.go Outdated
Comment threadbundle/config/mutator/process_target_mode_test.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go
lennartkats-dband others added 2 commits August 29, 2024 16:49
Co-authored-by: Pieter Noordhuis <pcnoordhuis@gmail.com>
Comment threadbundle/config/mutator/cleanup_targets.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go
Comment threadbundle/config/mutator/process_target_mode.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go
Comment threadbundle/config/mutator/select_target.go
@lennartkats-db
lennartkats-dbforce-pushed the cp-encourage-root-path branch 2 times, most recently from 742210c to 3973c50CompareOctober 12, 2024 10:01
@lennartkats-db

Copy link
Copy Markdown
ContributorAuthor

@pietern@andrewnester could you take another look at this PR? The remaining thread should be resolved: #1712 (comment)

Comment threadbundle/config/bundle.go Outdated
Comment threadbundle/config/mutator/process_target_mode.go Outdated
// report an error for them.
return diag.Warningf("target with 'mode: production' should " + advice)
}
return diag.Errorf("target with 'mode: production' must " + advice)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For follow-up: the advice should be a multi-line string in the Detail field to render nicely. As is, it is shown as a single (wrapped) line. The warning case will light up in all cases where mode: production is used and the root path is not specified.

Also, this doc page should be updated https://docs.databricks.com/en/dev-tools/bundles/deployment-modes.html#production-mode as well and linked from the warning to explain why the warning is shown while users haven't changed anything.

Comment threadbundle/config/mutator/process_target_mode.go Outdated
@lennartkats-db
lennartkats-db removed the request for review from andrewnesterJanuary 10, 2025 17:45
@lennartkats-db
lennartkats-db added this pull request to the merge queueJan 11, 2025
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Jan 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1712
  • Commit SHA: 9098320c63350f44d07c86da3c071331c2556bf3

Checks will be approved automatically on success.

@lennartkats-db
lennartkats-db added this pull request to the merge queueJan 13, 2025
Merged via the queue into databricks:main with commit 3e40a0cJan 13, 2025
@lennartkats-db
lennartkats-db deleted the cp-encourage-root-path branch January 13, 2025 12:24
andrewnester added a commit that referenced this pull request Jan 16, 2025
New feature announcement.
You can now manage Databricks Apps using DABs by defining an `app` resource in your bundle configuration.
For more information see Databricks documentation https://docs.databricks.com/en/dev-tools/bundles/resources.html#app
CLI:
* Filter out system clusters in cluster picker ([#2131](#2131)).
* Process all the fields in top level request object even if it contains request body ([#2155](#2155)).
Bundles:
* Added support for Databricks Apps in DABs ([#1928](#1928)).
* Allow artifact path to be located outside the sync root ([#2128](#2128)).
* Retry app deployment if there is an active deployment in progress ([#2153](#2153)).
* Resolve variables in a loop ([#2164](#2164)).
* Improve resolution of complex variables within complex variables ([#2157](#2157)).
* Added output message to warn about slower deployments with apps ([#2161](#2161)).
* Patch references to UC schemas to capture dependencies automatically ([#1989](#1989)).
* Format default-python template ([#2110](#2110)).
* Encourage the use of root_path in production to ensure single deployment ([#1712](#1712)).
* Log warnings to stderr for "bundle validate -o json" ([#2109](#2109)).
Internal:
* Move merge fix-ups after variable resolution ([#2125](#2125)).
* Enable linter 'unconvert' and fix the issues found ([#2136](#2136)).
* Coverage for acceptance tests ([#2123](#2123)).
* Add acceptance tests for builtin templates ([#2135](#2135)).
* Add a unique schema for recreate pipeline test ([#2159](#2159)).
* Migrate resolution tests to acceptance tests ([#2143](#2143)).
* Update runner for the publish-winget job ([#2105](#2105)).
* Add a test for complex variable resolution with 3 levels ([#2163](#2163)).
API Changes:
* Changed `databricks account federation-policy update` command with new required argument order.
* Changed `databricks account service-principal-federation-policy update` command with new required argument order.
OpenAPI commit 779817ed8d63031f5ea761fbd25ee84f38feec0d (2025-01-08)
Dependency updates:
* Upgrade TF provider to 1.63.0 ([#2162](#2162)).
* Bump golangci-lint version to v1.63.4 from v1.63.1 ([#2114](#2114)).
* Bump astral-sh/setup-uv from 4 to 5 ([#2116](#2116)).
* Bump golang.org/x/oauth2 from 0.24.0 to 0.25.0 ([#2080](#2080)).
* Bump github.com/hashicorp/hc-install from 0.9.0 to 0.9.1 ([#2079](#2079)).
* Bump golang.org/x/term from 0.27.0 to 0.28.0 ([#2078](#2078)).
* Bump github.com/databricks/databricks-sdk-go from 0.54.0 to 0.55.0 ([#2126](#2126)).
github-merge-queueBot pushed a commit that referenced this pull request Jan 16, 2025
### New feature announcement
#### Databricks Apps support
You can now manage Databricks Apps using DABs by defining an `app`
resource in your bundle configuration.
For more information see Databricks documentation
https://docs.databricks.com/en/dev-tools/bundles/resources.html#app
#### Referencing complex variables in complex variables
You can now reference complex variables within other complex variables.
For more details see #2157
CLI:
* Filter out system clusters in cluster picker
([#2131](#2131)).
* Add command line flags for fields that are not in the API request body
([#2155](#2155)).
Bundles:
* Added support for Databricks Apps in DABs
([#1928](#1928)).
* Allow artifact path to be located outside the sync root
([#2128](#2128)).
* Retry app deployment if there is an active deployment in progress
([#2153](#2153)).
* Resolve variables in a loop
([#2164](#2164)).
* Improve resolution of complex variables within complex variables
([#2157](#2157)).
* Added output message to warn about slower deployments with apps
([#2161](#2161)).
* Patch references to UC schemas to capture dependencies automatically
([#1989](#1989)).
* Format default-python template
([#2110](#2110)).
* Encourage the use of root_path in production to ensure single
deployment ([#1712](#1712)).
* Log warnings to stderr for "bundle validate -o json"
([#2109](#2109)).
API Changes:
* Changed `databricks account federation-policy update` command with new
required argument order.
* Changed `databricks account service-principal-federation-policy
update` command with new required argument order.
OpenAPI commit 779817ed8d63031f5ea761fbd25ee84f38feec0d (2025-01-08)
Dependency updates:
* Upgrade TF provider to 1.63.0
([#2162](#2162)).
* Bump golangci-lint version to v1.63.4 from v1.63.1
([#2114](#2114)).
* Bump astral-sh/setup-uv from 4 to 5
([#2116](#2116)).
* Bump golang.org/x/oauth2 from 0.24.0 to 0.25.0
([#2080](#2080)).
* Bump github.com/hashicorp/hc-install from 0.9.0 to 0.9.1
([#2079](#2079)).
* Bump golang.org/x/term from 0.27.0 to 0.28.0
([#2078](#2078)).
* Bump github.com/databricks/databricks-sdk-go from 0.54.0 to 0.55.0
([#2126](#2126)).
---------
Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
github-merge-queueBot pushed a commit that referenced this pull request Feb 24, 2025
## Changes
This refines the `mode: production` diagnostic output now that the
`Detail` property is rendered as output. This is a follow-up to
#1712.
github-merge-queueBot pushed a commit that referenced this pull request Feb 24, 2025
## Changes
This removes the `run-as` property from the default templates. It's a
useful property but it still only works for jobs and it makes the
default databricks.yml a bit longer. It seems like users can just learn
about it from the docs and/or vary their deployment identity.
Depends on #1712.
denik pushed a commit that referenced this pull request May 20, 2026
…ent (#1712)
## Changes
This updates `mode: production` to allow `root_path` to indicate
uniqueness. Historically, we required `run_as` for this, which isn't
actually very effective for that purpose. `run_as` also had the problem
that it doesn't work for pipelines.
This is a cherry-pick from #1387
---------
Co-authored-by: Pieter Noordhuis <pcnoordhuis@gmail.com>
denik pushed a commit that referenced this pull request May 20, 2026
### New feature announcement
#### Databricks Apps support
You can now manage Databricks Apps using DABs by defining an `app`
resource in your bundle configuration.
For more information see Databricks documentation
https://docs.databricks.com/en/dev-tools/bundles/resources.html#app
#### Referencing complex variables in complex variables
You can now reference complex variables within other complex variables.
For more details see #2157
CLI:
* Filter out system clusters in cluster picker
([#2131](#2131)).
* Add command line flags for fields that are not in the API request body
([#2155](#2155)).
Bundles:
* Added support for Databricks Apps in DABs
([#1928](#1928)).
* Allow artifact path to be located outside the sync root
([#2128](#2128)).
* Retry app deployment if there is an active deployment in progress
([#2153](#2153)).
* Resolve variables in a loop
([#2164](#2164)).
* Improve resolution of complex variables within complex variables
([#2157](#2157)).
* Added output message to warn about slower deployments with apps
([#2161](#2161)).
* Patch references to UC schemas to capture dependencies automatically
([#1989](#1989)).
* Format default-python template
([#2110](#2110)).
* Encourage the use of root_path in production to ensure single
deployment ([#1712](#1712)).
* Log warnings to stderr for "bundle validate -o json"
([#2109](#2109)).
API Changes:
* Changed `databricks account federation-policy update` command with new
required argument order.
* Changed `databricks account service-principal-federation-policy
update` command with new required argument order.
OpenAPI commit 779817ed8d63031f5ea761fbd25ee84f38feec0d (2025-01-08)
Dependency updates:
* Upgrade TF provider to 1.63.0
([#2162](#2162)).
* Bump golangci-lint version to v1.63.4 from v1.63.1
([#2114](#2114)).
* Bump astral-sh/setup-uv from 4 to 5
([#2116](#2116)).
* Bump golang.org/x/oauth2 from 0.24.0 to 0.25.0
([#2080](#2080)).
* Bump github.com/hashicorp/hc-install from 0.9.0 to 0.9.1
([#2079](#2079)).
* Bump golang.org/x/term from 0.27.0 to 0.28.0
([#2078](#2078)).
* Bump github.com/databricks/databricks-sdk-go from 0.54.0 to 0.55.0
([#2126](#2126)).
---------
Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This removes the `run-as` property from the default templates. It's a
useful property but it still only works for jobs and it makes the
default databricks.yml a bit longer. It seems like users can just learn
about it from the docs and/or vary their deployment identity.
Depends on #1712.
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This refines the `mode: production` diagnostic output now that the
`Detail` property is rendered as output. This is a follow-up to
#1712.
Sign up for freeto 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

@lennartkats-db@pietern