Code-backed and app-managed alerts
This feature is only available in Dagster+.
Alert policies can be created in the Dagster+ UI or synced from a YAML file. Both can exist in the same deployment at the same time, so one team can keep its alerts in version control while another manages theirs in the UI. For more information on both approaches, see Creating alert policies.
Every alert policy has a source:
- Code-backed — the alert policy configuration is maintained in a YAML file, and synced using the
dgordagster-cloudCLI. - App-managed — the alert policy configuration is maintained in the Dagster+ UI.
The alerts list labels each policy with its source. Policies that have not been updated since this feature was introduced are unlabeled until their next update.
What a sync changes
A sync applies every alert policy in the YAML file, and deletes code-backed policies that the file no longer contains. It leaves everything else alone:
| Policy | Not in the synced file |
|---|---|
| Code-backed | Deleted |
| App-managed | Kept |
| Unlabeled | Kept |
Dagster+ records that a policy came from a sync, but not which file it came from, so keep all of your code-backed alert policies in the file you sync. Syncing a second file would delete the policies defined in the first.
Before August 2026, a sync replaced all alert policies in the deployment, which deleted any alert policy created in the UI the next time a sync ran. Dagster+ applies the current behavior server-side, so you do not need to update your CLI to get it.
Move an app-managed alert policy into code
- On the alerts page, open the menu next to Create alert policy and select Export policies, then Download as YAML. The downloaded
alerts.yamlcontains every alert policy in the deployment. - Copy the alert policy you want into the YAML file you sync, keeping its existing name.
- Sync the file.
Keeping the same name marks the existing alert policy as code-backed rather than creating a new one. The existing alert policy keeps its history, and its notifications are uninterrupted.
If the config in your YAML file differs from the config set in the UI, the code version becomes the source of truth. Dagster+ shows a warning on that alert policy with the configuration it replaced, so you can fold in anything you meant to keep. Dismiss the warning once you've reconciled the alert policy config.
Move a code-backed alert policy into the UI
- Copy the alert policy out of your YAML file.
- Remove it from the file and sync. The sync deletes the alert policy.
- Recreate it in the UI, either with Create alert policy or by pasting the config into the YAML editor under Edit policies.
The alert policy will not fire between the sync that deleted it and when you recreate it in the UI.
Working with a code-backed alert policy in the UI
Your YAML file is the source of truth for a code-backed alert policy. The UI disables changes that the next sync would override:
| Action | Code-backed alert policy |
|---|---|
| Mute | Allowed |
| Send sample notification | Allowed |
| Edit configuration | Edit the YAML file and sync |
| Delete | Remove from the YAML file and sync |
| Enable or disable | Edit the YAML file and sync |
Default alert policies
New organizations start with two alert policies, [Dagster Plus] Credit Limit Exceeded and [Dagster Plus] Run Exceeds 24 Hours. These alert policies are app-managed.