Mute poll failure alerts#43
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to mute poll failure alerts for specific services. Previously, mutes only targeted individual dependency instances (
dependency_id) or all instances of a dependency type (canonical_name). Poll failure events (poll_error) are service-level and don't carry adependencyId, so they bypassed the existing mute system entirely. This addsservice_idas a third mutually-exclusive mute scope — service mutes only suppresspoll_erroralerts and do not affectstatus_changealerts for dependencies within that service.Changes
Database
032_add_service_mutes— recreatesalert_muteswithservice_id TEXTcolumn (FK →services), updated CHECK constraint enforcing exactly one of three targets, and unique index on(team_id, service_id)migrate.tsServer
AlertMute/CreateAlertMuteInputtypes updated withservice_idfieldIAlertMuteStore+AlertMuteStore: newisServiceMuted()method,create()now includesservice_idAlertService.processEvent(): service mute check added before dependency mute check forpoll_errorevents — records history asmutedand returns earlyvalidateMuteCreate(): acceptsservice_idas third scope, validates exactly one target providedcreateverifies service ownership,list/adminenrichservice_name,deleteincludesservice_idin audit logClient
AlertMute/CreateAlertMuteInputtypes updatedAlertMutes.tsx: new "Service (poll failures)" scope option, service ID input field, table shows "Service" type and service name for service mutesDocs
02-data-model.md: updated schema, indexes, and migration history04-api-reference.md: added alert mute endpoint documentationTesting
npm test)npm run lint)New server tests:
AlertService: poll_error suppressed when service muted, poll_error dispatched when not muted, status_change not suppressed by service muteNew client tests:
Results: 2987 server tests passed, 1442 client tests passed
Checklist