WPB-28421 add an opt in policy for dropping unsupported federated notifications - #5501
Open
battermann wants to merge 2 commits into
Conversation
battermann
marked this pull request as ready for review
September 1, 2026 10:20
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an opt-in per-message policy for how the background worker should handle federated backend-notification bundles when there is no common federation API version with the target backend. It extends the RabbitMQ payload format in a backward-compatible way (defaulting to the safe “keep queued” behavior) while enabling producers to explicitly request dropping unsupported notifications.
Changes:
- Add
UnsupportedVersionPolicyand extendPayloadBundlewith an optionalunsupportedVersionPolicyfield (defaults toKeepQueuedon decode). - Update the background worker pusher to either keep the message queued (and mark the queue as stuck) or ack+count-drop based on the policy.
- Add Prometheus metric
wire_backend_notifications_dropped_unsupported_versionand extend tests to cover default/combination behavior and drop-vs-keep behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| services/background-worker/test/Test/Wire/BackendNotificationPusherSpec.hs | Adds coverage for payload bundle defaulting/semigroup behavior and pushNotification behavior for unsupported versions under both policies. |
| services/background-worker/src/Wire/BackgroundWorker/Env.hs | Adds a new Prometheus counter for dropped-unsupported-version notifications. |
| services/background-worker/src/Wire/BackendNotificationPusher.hs | Implements policy-driven behavior when no compatible API version exists (keep queued vs drop+ack), and updates metrics/gauge accordingly. |
| libs/wire-api-federation/src/Wire/API/Federation/BackendNotifications.hs | Introduces UnsupportedVersionPolicy, extends PayloadBundle schema with a backward-compatible optional field, and defines safe Semigroup behavior. |
| changelog.d/6-federation/WPB-28421 | Changelog entry for the new opt-in drop policy. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
battermann
force-pushed
the
WPB-28421-backend-add-an-opt-in-policy-for-dropping-unsupported-federated-notifications
branch
from
September 1, 2026 13:18
8263832 to
95c63ed
Compare
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.
https://wearezeta.atlassian.net/browse/WPB-28421
Checklist
changelog.d