Uh oh!
There was an error while loading. Please reload this page.
Add scripts to DABs - #2813
Merged
Merged
Conversation
shreyas-goenka
requested review from
andrewnester, anton-107, denik and pietern
as code ownersMay 5, 2025 12:44
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 5, 2025 12:44 — with
GitHub Actions
Inactive
shreyas-goenka
marked this pull request as draft
May 5, 2025 12:44
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 8, 2025 16:55 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 09:43 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 09:44 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 09:45 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 11:43 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 12:28 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 15:27 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 15:49 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 15:57 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
May 9, 2025 15:59 — with
GitHub Actions
Inactive
pietern
reviewed
Jul 3, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 3, 2025 10:48 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 3, 2025 10:49 — with
GitHub Actions
Inactive
andrewnester
approved these changes
Jul 8, 2025
Uh oh!
There was an error while loading. Please reload this page.
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 8, 2025 14:58 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 8, 2025 15:13 — with
GitHub Actions
Inactive
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 9, 2025 09:30 — with
GitHub Actions
Inactive
shreyas-goenka
enabled auto-merge
July 9, 2025 15:57
shreyas-goenka
disabled auto-merge
July 9, 2025 15:57
shreyas-goenkatemporarily deployed
to
test-trigger-is
July 9, 2025 15:58 — with
GitHub Actions
Inactive
Uh oh!
There was an error while loading. Please reload this page.
deco-sdk-taggingBot
added a commit
that referenced
this pull request
Jul 10, 2025
## Release v0.259.0 ### Notable Changes * Add support for arbitrary scripts in DABs. Users can now define scripts in their bundle configuration. These scripts automatically inherit the bundle's credentials for authentication. They can be invoked with the `bundle run` command. ([#2813](#2813)) * Error when the absolute path to `databricks.yml` contains a glob character. These are: `*`, `?`, `[`, `]` and `^`. If the path to the `databricks.yml` file on your local filesystem contains one of these characters, that could lead to incorrect computation of glob patterns for the `includes` block and might cause resources to be deleted. After this patch users will not be at risk for unexpected deletions due to this issue. ([#3096](#3096)) * Diagnostics messages are no longer buffered to be printed at the end of command, flushed after every mutator ([#3175](#3175)) * Diagnostics are now always rendered with forward slashes in file paths, even on Windows ([#3175](#3175)) * "bundle summary" now prints diagnostics to stderr instead of stdout in text output mode ([#3175](#3175)) * "bundle summary" no longer prints recommendations, it will only prints warnings and errors ([#3175](#3175)) ### Bundles * Fix default search location for whl artifacts ([#3184](#3184)). This was a regression introduced in 0.255.0. * The job tasks are now sorted by task key in "bundle validate/summary" output ([#3212](#3212))
denik pushed a commit
that referenced
this pull request
May 20, 2026
## Changes ShellExecv is a variant of the Execv method that also configures a shell to be used before running the command. ## Why We need it for the scripts section in DABs: #2813. Why: 1. We'll need to perform lexical analysis to figure out where the boundaries for args in the script are. It's better to defer that to a shell. 2. Direct calls to execv do not perform any environment variable interpolation, so we need to go through a shell. This is neat because it provides customers a way to configure inputs to their scripts. 3. Multiline scripts require a shell since, without them, we cannot parse where a command ends. Note: This uses the same priority order for shells as the `artifacts.build` field, that is bash > sh > powershell. ## Tests Unit test. Also acceptance tests in #2813
denik pushed a commit
that referenced
this pull request
May 20, 2026
## Changes Scripts can be defined in a bundle YAML file as: ``` scripts: my_script: content: | echo "one" echo "two" ``` They can then be run by calling `databricks bundle run my_script` ## Why There are four primary benefits of having the scripts section in DABs: 1. Customers can scripts (like integration testing scripts) live and be versioned with their bundle. Since integration tests based on spark connect require authentication, scripts run via this mechanism will automatically have the appropriate authentication configured. 2. Simplifies setup for users who might not have their own build tools configured. 3. Allows us to stardarize documentation to always refer to the scripts section. 4. Make DABs in the workspace integration possible. Since DABs in the workspace cannot read arbitrary build file formats like Makefile. ### Why do we have an additional level of indentation with the `content` field? Why not inline it? The two main reasons are: 1. This mirrors what the artifacts block looks like. Users in the artifact block are able to specify which shell they want to run their build command in. We should offer the same functionality in the scripts section. 5. Leaves the room open for us to provide users with additional modifiers they might like to apply to their scripts. ## Tests Acceptance tests. --------- Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
denik pushed a commit
that referenced
this pull request
May 20, 2026
## Release v0.259.0 ### Notable Changes * Add support for arbitrary scripts in DABs. Users can now define scripts in their bundle configuration. These scripts automatically inherit the bundle's credentials for authentication. They can be invoked with the `bundle run` command. ([#2813](#2813)) * Error when the absolute path to `databricks.yml` contains a glob character. These are: `*`, `?`, `[`, `]` and `^`. If the path to the `databricks.yml` file on your local filesystem contains one of these characters, that could lead to incorrect computation of glob patterns for the `includes` block and might cause resources to be deleted. After this patch users will not be at risk for unexpected deletions due to this issue. ([#3096](#3096)) * Diagnostics messages are no longer buffered to be printed at the end of command, flushed after every mutator ([#3175](#3175)) * Diagnostics are now always rendered with forward slashes in file paths, even on Windows ([#3175](#3175)) * "bundle summary" now prints diagnostics to stderr instead of stdout in text output mode ([#3175](#3175)) * "bundle summary" no longer prints recommendations, it will only prints warnings and errors ([#3175](#3175)) ### Bundles * Fix default search location for whl artifacts ([#3184](#3184)). This was a regression introduced in 0.255.0. * The job tasks are now sorted by task key in "bundle validate/summary" output ([#3212](#3212))
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 freeto 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
Scripts can be defined in a bundle YAML file as:
They can then be run by calling
databricks bundle run my_scriptWhy
There are four primary benefits of having the scripts section in DABs:
Why do we have an additional level of indentation with the
contentfield? Why not inline it?The two main reasons are:
Tests
Acceptance tests.