-
Notifications
You must be signed in to change notification settings - Fork 125
Add support for .dbalert.json files
#3602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Commit: 383c218
22 interesting tests: 14 KNOWN, 4 RECOVERED, 3 flaky, 1 SKIP
Top 22 slowest tests (at least 2 minutes):
|
|
This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled. |
.dbalert.json files
pietern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Please also include a round-trip acceptance tests that runs workspace export on the alert file and confirms that there is no drift between the original input and the workspace-observed output. This should run against a real workspace. This will confirm not just that we're doing the right thing locally, but also that the remote serialization code for alerts doesn't drift.
acceptance/bundle/resources/alerts/with_file_not_allowed_field_error/output.txt
Outdated
Show resolved
Hide resolved
acceptance/bundle/resources/alerts/with_file_variable_interpolation_error/output.txt
Outdated
Show resolved
Hide resolved
|
Updated alerts/with_file to include exporting the alert and asserting that it's content did not change. |
| warehouse_id: "0123456789012345" | ||
| display_name: "My alert" | ||
| file_path: ./alert.dbalert.json | ||
| # This field is not allowed when file_path is specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future: We should allow override of the query text even when using a file_path, unless there will be another way to accept parameters like {catalog} and {schema} in the alert file.
|
Commit: 32295be
26 interesting tests: 18 KNOWN, 4 flaky, 3 FAIL, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
## Changes Adds support for `databricks bundle generate alert` command to generate bundle configuration from existing SQL alerts. ## Why This allows users to import existing alerts into bundles ## Usage ### Generate configuration from existing alert ```bash databricks bundle generate alert --existing-id <alert-id> ``` This creates: - `resources/<alert-name>.alert.yml` - Bundle configuration with alert settings - `src/<alert-name>.dbalert.json` - Complete alert definition ### Update existing bundle resource ```bash databricks bundle generate alert --resource my_alert --force ``` ## Tests - Added acceptance tests for successful generation and error cases Note: It should be merged after: #3602
- Remove #4135 (already released in v0.281.0) - Update #4081 reference to #4101 (use PR instead of issue) - Add #4108 (bundle generate alert command) - Add #3602 (.dbalert.json files support) - Add #4169 (SYSTEM_TEAMFOUNDATIONCOLLECTIONURI for Azure DevOps OIDC) - Move domain_friendly_name entry from CLI to Bundles section - Normalize formatting (backticks, verb tense, wording consistency) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
## Changes - Remove #4135 (already released in v0.281.0) - Update #4081 reference to #4101 (use PR instead of issue) - Add #4108 (bundle generate alert command) - Add #3602 (.dbalert.json files support) - Add #4169 (SYSTEM_TEAMFOUNDATIONCOLLECTIONURI for Azure DevOps OIDC) - Move domain_friendly_name entry from CLI to Bundles section - Normalize formatting (backticks, verb tense, wording consistency) Co-authored-by: Claude Sonnet 4.5 <[email protected]>
## Release v0.282.0 ### Notable Changes * engine/direct: New plan format (v2) ([#4201](#4201)) ### CLI * Skip non-exportable objects (e.g., `MLFLOW_EXPERIMENT`) during `workspace export-dir` instead of failing ([#4101](#4101)) ### Bundles * Allow `domain_friendly_name` to be used in `name_prefix` in development mode ([#4173](#4173)) * Add missing schema grants privileges ([#4139](#4139)) * Add support for `bundle generate alert` command ([#4108](#4108)) * Add support for `.dbalert.json` files ([#3602](#3602)) * Pass `SYSTEM_TEAMFOUNDATIONCOLLECTIONURI` from env to the Terraform provider for Azure DevOps OIDC auth ([#4169](#4169)) * Add `ipykernel` to the `default` template to enable Databricks Connect notebooks in Cursor/VS Code ([#4164](#4164)) * Add interactive SQL warehouse picker to `default-sql` and `dbt-sql` bundle templates ([#4170](#4170)) * Add `name`, `target` and `mode` fields to the deployment metadata file ([#4180](#4180)) * engine/direct: Fix app deployment failure when app is in `DELETING` state ([#4176](#4176)) * engine/direct: Changes in config that match remote changes no longer trigger an update ([#4201](#4201))
Changes
Adds support for
.dbalert.jsonfiles to define alert configurations separately fromdatabricks.yml.Key additions:
file_pathfield for alerts in bundle configLoadDBAlertFilesmutator to read and merge.dbalert.jsonfilesquery_linesandcustom_description_linesfields in .dbalert.json files.warehouse_id,display_name, andfile_pathcan be set in YAML when using a file.dbalert.jsonfilesTests
LoadDBAlertFilesmutatorterraformanddirectdeployment engines