Repository navigation
feat(alerts): delivery by target through the channels, content prepared once and health per destination - #33975
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…ed once and health per destination
…, fails the event with its reason
🚦 Removed from the merge queue —
|
Code Review ✅ Approved 3 closed / 3 findings🔴 High risk · Alert dispatch and destination-health tracking are redesigned across notification channels Redesigns alert delivery to send each resolved address as an independent target, with content prepared once per event and health reported per destination. Addresses the prior behavior where a single failing endpoint would drop other recipients for that channel. Resolves lookup failure handling in event failure reasons, TickHealth failure ordering, and health tracking for prepare() failures. ✅ 3 closed✅ Bug: Lookup failures counted as failed recipients in the event failure reason
✅ Bug: TickHealth loses the first failure reason, depending on order
✅ Bug: Failure in prepare() skips health, so the destination can stay ACTIVE
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Fixes #33118
Fixes #34266
What this pull request implements
honourWebhookMethod,awaitEmailOutcomeandtargetSendConcurrency. WithskipUnreachableTargetWithinTickon, an unreachable target is not retried in that tick.What was wrong before
The first failing endpoint of a channel dropped that channel's other recipients for the event, and only one destination per channel recorded a status.
Design
TargetResolverturns one channel's destinations into the targets of one event. Candidates with the same identity are oneTarget, sent with the first destination's configuration.ChannelDeliverysends one event through every destination and returns aDelivery: how many channels delivered it, and which failed, including any that could not try.TickChannelsis the tick's: it sets aside destinations nothing can be sent through, groups the rest by theChannelthat serves them, shares oneEventContentper event and isolates each channel: one that throws fails each of its destinations.ChannelDispatchsends one event through one channel: availability, a missing file, then the targets, each sent in isolation byIsolatedSends.TickHealthsums each destination's targets into aDestinationOutcome, the only writer of health. A failed recipient outranks a channel that failed as a whole, then a failed lookup, then not being attempted, and nothing later in the tick hides a failure. Nobody to send to ranks last: reaching anyone in the tick reads delivered.HealthStreakcounts failures only.AlertLedgerwrites a tick's failed events in one batch, the last row per event.What users notice
mainboth counted as sent (Fixes #24691: Deduplicate recipients across multiple EventSubscription destinations #25312). The destination reads that reason tick after tick, with no failing streak.How it was tested
The alerting unit tests (90 classes, 629 tests), the alert integration tests (15 classes, 98 tests, including
DispatchScenariosITandAlertDeliveryIT) and the existing alert integration tests (566 tests) pass on MySQL and on PostgreSQL.