-
Notifications
You must be signed in to change notification settings - Fork 36
[BUG] Validation fails on alert resources when deployment target has a run_as other than its deployer #1868
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The Databricks VS Code extension fails to refresh bundle configuration when a target has run_as set to a service principal and the bundle includes alert resources. The CLI (databricks bundle validate and databricks bundle deploy) both succeed without error, and the alert is successfully created in the workspace.
To Reproduce
Steps to reproduce the behavior:
- Create a databricks.yml with a target that has run_as set to a service principal
targets:
dev:
mode: development
default: true
workspace:
host: https://<workspace-url>
run_as:
service_principal_name: <sp-app-id>
- Create an alert resource
resources:
alerts:
my_alert:
display_name: My Alert
query_text: SELECT 1
warehouse_id: <warehouse-id>
evaluation:
comparison_operator: GREATER_THAN
empty_result_state: OK
source:
name: "1"
threshold:
value:
double_value: 0
schedule:
quartz_cron_schedule: "0 0 3 * * ?"
timezone_id: UTC
- Run databricks bundle validate -t dev in the terminal. Succeeds
- Run databricks bundle deploy -t dev in the terminal. Succeeds, alert is created
- Open the project in VS Code with the Databricks extension and select the dev target
- The extension output log shows:
[info] summarize: Error: alerts do not support a setting a run_as user that is different from the owner.
Current identity: <user_email>. Run as identity: <sp-app-id>.
See https://docs.databricks.com/dev-tools/bundles/run-as.html to learn more about the run_as property.
in resources/alerts.yml:3:5
[error] summarize: Failed to refresh bundle configuration.
- Nothing is visible in the Bundle Resource Explorer, and deploy from there is not possible.
System information:
-
Paste the output of the
Help: Aboutcommand (CMD-Shift-P):
Version: 1.112.0 (user setup)
Commit: 07ff9d6178ede9a1bd12ad3399074d726ebe6e43
Date: 2026-03-17T18:09:23Z
Electron: 39.8.0
ElectronBuildId: 13470701
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.22631 -
Databricks Extension Version: 2.10.6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working