You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: widen alert type annotations to AlertModel base class
Widens the hard-coded three-way Union[TestAlertModel, ModelAlertModel,
SourceFreshnessAlertModel] to the common AlertModel base across alert
group, message builder, and integration APIs, and widens
PendingAlertSchema.data to BaseAlertDataSchema. Enables downstream
packages to extend the alert hierarchy (e.g. pipeline alerts) without
needing type: ignore workarounds.
No behavioral changes — type-level only. mypy passes and unit tests
are unaffected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: keep smart_union = True on PendingAlertSchema Config
Removed by mistake in the previous commit. It's a class-level setting
that still affects other Union/Optional fields on the schema, so
keeping it preserves the pre-existing parsing behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: make asset_type and concise_name part of the AlertModel contract
- AlertModel.asset_type: new mandatory @Property (NotImplementedError on base)
- AlertModel.concise_name: now raises NotImplementedError on base (was "Alert")
- TestAlertModel.asset_type -> "test"
- ModelAlertModel.asset_type -> "snapshot" | "model" (based on materialization)
- ModelAlertModel.concise_name -> self.alias (was "dbt {type} alert - {alias}")
- SourceFreshnessAlertModel.asset_type -> "source"
- SourceFreshnessAlertModel.concise_name -> "{source_name}.{identifier}"
(was "source freshness alert - {source_name}.{identifier}")
- AlertMessageBuilder._get_run_alert_subtitle_blocks now consumes
alert.asset_type / alert.concise_name instead of an isinstance chain,
so downstream subclasses (e.g. pipeline alerts) work without edits here.
- Widened _get_run_alert_subtitle_block's `type` param from Literal to str.
- Added unit tests for asset_type/concise_name on every concrete subclass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments