Skip to content

Add monitoring-sql-warehouse asset#11

Merged
vmariiechko merged 1 commit into
mainfrom
feature/monitoring-sql-warehouse-asset
May 30, 2026
Merged

Add monitoring-sql-warehouse asset#11
vmariiechko merged 1 commit into
mainfrom
feature/monitoring-sql-warehouse-asset

Conversation

@vmariiechko

@vmariiechko vmariiechko commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the third asset in the library: monitoring-sql-warehouse. A drop-in DABs SQL warehouse resource tuned for scheduled Databricks Alerts and monitoring queries (2X-Small serverless PRO with auto_stop_mins: 1). Keeps cost proportional to actual query time instead of warm-up dwell, which is what happens when sub-second Alert queries run on a general-purpose warehouse with a long auto-stop window.

The auto_stop_mins: 1 value was verified end-to-end against a real workspace (Databricks SQL channel v2026.10): the UI shows "After 1 minute of inactivity" after deploy. Sub-minute values are not supported (the field is integer-only; 0.5 triggers a CLI integer-coercion warning and the workspace silently reverts to the platform default of 120 min). 0 disables auto-stop entirely.

Changes

  • New asset assets/monitoring-sql-warehouse/ with schema, top-level README, in-bundle usage doc (docs/monitoring-sql-warehouse/README.md), and the warehouse YAML template
  • Asset ships with channel pinned to CHANNEL_NAME_CURRENT so Databricks SQL Preview-channel rollouts cannot drift query behavior, plus two cost-attribution tags (workload=monitoring-alerts, created_by=dabs-asset/monitoring-sql-warehouse)
  • Five prompts (target_dir, warehouse_resource_key, warehouse_name, cluster_size, auto_stop_mins) with safe defaults; pattern-validated against the nine official cluster sizes (2X-Small through 5X-Large) and integer-only auto-stop values
  • In-bundle README cites the Create Warehouse and Edit Warehouse API references for the auto_stop_mins contract, with a worked curl example for editing existing warehouses outside DABs
  • Asset-specific tests at tests/assets/test_monitoring_sql_warehouse.py (9 tests): exact installed file set, YAML parse, proven serverless-PRO config (warehouse_type=PRO, enable_serverless_compute=true, integer-serialized auto_stop_mins, channel pin), both cost-attribution tags, and that custom warehouse_resource_key / target_dir / auto_stop_mins values flow into both the filename and the rendered YAML
  • Test config at tests/configs/assets/monitoring_sql_warehouse.json
  • ASSETS.md catalog row added
  • CHANGELOG.md cut as v1.8.0
  • ROADMAP.md "Shipped" list updated to include both dbx-ro-query (was missing) and monitoring-sql-warehouse

Change Area

  • Core template (template/, schema, helpers)
  • Asset Library (assets/<name>/)
  • Both
  • Docs / tests / infrastructure only

Configuration Axes Affected

  • Environment setup (full/minimal, dev environment)
  • Compute type (classic/serverless/both)
  • Permissions / RBAC
  • CI/CD pipelines (Azure DevOps, GitHub Actions, GitLab)
  • Cloud provider (Azure/AWS/GCP)
  • Unity Catalog / schemas
  • Template schema (databricks_template_schema.json)
  • Template helpers (library/helpers.tmpl)
  • Asset Library (new asset, asset schema, or framework changes)
  • None of the above (docs, tests, infrastructure only)

Testing

  • All tests pass (pytest tests/ -V) — 2333 passed, 163 skipped (+9 new asset tests, +4 framework parametrizations from the new asset auto-discovery)
  • Manual template generation tested (databricks bundle init ./assets/monitoring-sql-warehouse --output-dir /tmp/... --config-file tests/configs/assets/monitoring_sql_warehouse.json)
  • New tests added for new functionality

Asset Changes

  • Asset installs standalone via databricks bundle init . --template-dir assets/monitoring-sql-warehouse --output-dir <dir>
  • Asset is self-contained (no references to library/helpers.tmpl or other assets)
  • tests/configs/assets/monitoring_sql_warehouse.json added
  • Asset appears in ASSETS.md catalog

Checklist

  • Go template syntax is valid (no unclosed {{ }} blocks)
  • No .tmpl files appear in generated output (asserted by test_no_tmpl_leftovers)
  • Generated YAML files are valid (asserted by test_warehouse_yaml_parses)
  • Documentation updated

Drop-in DABs SQL warehouse tuned for scheduled Databricks Alerts and
monitoring queries: 2X-Small serverless PRO with auto_stop_mins=1, the
serverless minimum verified end-to-end via DABs deploy. Keeps cost
proportional to actual query time instead of warm-up dwell.

The asset installs one resource YAML under <target_dir>/<key>.sql_warehouse.yml
(default resources/, picked up by the conventional resources/*.yml glob
without any databricks.yml change) and an in-bundle usage doc at
docs/monitoring-sql-warehouse/README.md covering the serverless 1-minute
nuance, cross-resource reference pattern, and CLI/API paths for editing
warehouses created outside DABs (with citations to the Create / Edit
Warehouse API references and a worked curl example).

Five prompts with safe defaults (target_dir, warehouse_resource_key,
warehouse_name, cluster_size, auto_stop_mins); pattern-validated against
the official cluster sizes (2X-Small through 5X-Large) and integer-only
auto-stop values.

Resource ships with channel pinned to CHANNEL_NAME_CURRENT so Databricks
SQL Preview-channel rollouts cannot drift query behavior, and two
cost-attribution tags (workload=monitoring-alerts,
created_by=dabs-asset/monitoring-sql-warehouse) for traceability in
usage reports.

Asset-specific tests assert the exact installed file set, YAML parse,
the proven serverless-PRO config (warehouse_type=PRO,
enable_serverless_compute=true, auto_stop_mins integer-serialized,
channel pinned to CHANNEL_NAME_CURRENT), both cost-attribution tags,
and that custom warehouse_resource_key / target_dir / auto_stop_mins
values flow into both the filename and the rendered YAML.

Tagged for release as v1.8.0 in CHANGELOG.md.
@vmariiechko vmariiechko merged commit ada7a5a into main May 30, 2026
1 check passed
@vmariiechko vmariiechko deleted the feature/monitoring-sql-warehouse-asset branch May 30, 2026 13:52
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.

1 participant