Hello,
I have deployed a Databricks SQL Alert using Databricks Asset Bundles (DABs), and I’ve also deployed a Job to execute this alert through the same bundle.
Below is a snippet of the task configuration I used:
```
- task_key: "alerts_error"
sql_task:
alert:
alert_id: ${resources.alerts.MY_ALERT_NAME.id}
warehouse_id: ${resources.sql_warehouses.SERVERLESS_WH.id}
```
The deployment itself was successful. However, the task fails with the error: "The SQL entity could not be found." When I check the task configuration in the Databricks UI, the SQL alert is displayed as "unknown alert with ID: {my alert id}".
Furthermore, when I click the "Open alert" link in the SQL Alert section of the task execution page, it redirects to {HOST}/sql/alerts/{id}?o={workspace_id} and returns a "the request was invalid" error.
Interestingly, when I access the alert directly from the Alert console, the URL is {HOST}/sql/alerts-v2/{id}?o={workspace_id}. The difference seems to be the path: /alerts/ vs /alerts-v2/. It appears that the task is unable to locate the alert resource due to this path discrepancy.
Has anyone encountered a similar issue or found a solution for this?