Skip to content

Add PyDABs support for SQL Alerts - #6335

Draft
Sankalp-Mittal wants to merge 6 commits into
mainfrom
sankalp-mittal/pydabs-support-for-alerts
Draft

Add PyDABs support for SQL Alerts#6335
Sankalp-Mittal wants to merge 6 commits into
mainfrom
sankalp-mittal/pydabs-support-for-alerts

Conversation

@Sankalp-Mittal

@Sankalp-Mittal Sankalp-Mittal commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

WIP

@Sankalp-Mittal Sankalp-Mittal changed the title sankalp mittal/pydabs support for alerts Add PyDABs support for SQL Alerts Aug 20, 2026
@@ -0,0 +1,19 @@
from enum import Enum

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This entire directory _models/ is autogenerated

@@ -0,0 +1,123 @@
__all__ = [

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This file is also auto generated

@@ -12,6 +12,7 @@
"VariableOrDict",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These had to be manually added to add mutators

@@ -69,6 +70,38 @@ def my_job_mutator(bundle: Bundle, job: Job) -> Job:
# was deemed overly implicit and potentially confusing.


Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Again manually added but standard template code

@@ -31,6 +31,7 @@ def all(cls) -> tuple["_ResourceType", ...]:
# intentionally lazily load all resource types to avoid imports from databricks.bundles.core to
# be imported in databricks.bundles.<resource_type>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This file should also be autogenerated we should just have a cli interface where singular and plural can be defined

@@ -249,6 +258,34 @@ def add_volume(

self._volumes[resource_name] = volume

def add_alert(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the only function that I'm not sure on whether to autogenerate or not??

@@ -74,6 +83,40 @@ class TestCase:
),
resource_types[Schema],
),
(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the unit test params that I think need to be manually written

@@ -26,6 +34,7 @@ class TestCase:
dict_example: dict
dataclass_example: Resource
mutator: Callable
article: str = "a" # grammatical article in the duplicate-resource error message

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Default article can be overriden for example in the case of alert

@@ -21,6 +22,8 @@
"pipelines",
"resources",
"catalog",
"sql",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These 2 had to be added manually but I think they can be found out using BFS and potentially stored in a yaml file

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: d3e7d64

Run: 32368662249

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 1 4 274 1162 6:14
💚​ aws windows 1 4 276 1160 3:32
💚​ azure linux 1 4 273 1162 5:38
💚​ azure windows 1 4 275 1160 5:07
💚​ gcp linux 1 4 274 1162 6:36
💚​ gcp windows 1 4 276 1160 3:43
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:58 azure windows TestAccept
3:48 azure linux TestAccept
3:44 aws linux TestAccept
3:42 gcp linux TestAccept
3:05 gcp windows TestAccept
3:03 aws windows TestAccept

Sign up for free to 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