fix: persist Slack thread_ts across controller restarts#461
Open
Ofir408 wants to merge 1 commit into
Open
Conversation
22669b9 to
6d1db53
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #461 +/- ##
==========================================
+ Coverage 55.41% 57.60% +2.18%
==========================================
Files 46 49 +3
Lines 4125 3840 -285
==========================================
- Hits 2286 2212 -74
+ Misses 1511 1263 -248
- Partials 328 365 +37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0346831 to
bde11fb
Compare
Slack thread continuity (groupingKey -> thread_ts) previously lived only in an in-memory map, so a controller restart or leader-election failover reset it and grouped notifications started a new top-level thread instead of replying to the existing one. Adds AnnotatingNotificationService, an optional NotificationService extension that returns annotations the caller should persist onto the target resource. The Slack service implements it, seeding/exporting its thread state via Destination.Annotations instead of a package-global in-memory map. The controller wires the resource's annotations in before sending and merges the returned annotations back in when persisting state, the same way NotificationsState already does for delivery dedup. Fixes argoproj/argo-rollouts#4809 Signed-off-by: Ofir Ben Shoham <ofir_benshoham@intuit.com>
bde11fb to
e92a2e7
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.
Slack thread continuity (groupingKey -> thread_ts) previously lived only in an in-memory map, so a controller restart or leader-election failover reset it and grouped notifications started a new top-level thread instead of replying to the existing one.
Adds AnnotatingNotificationService, an optional NotificationService extension that returns annotations the caller should persist onto the target resource. The Slack service implements it, seeding/exporting its thread state via Destination.Annotations instead of a package-global in-memory map. The controller wires the resource's annotations in before sending and merges the returned annotations back in when persisting state, the same way NotificationsState already does for delivery dedup.
Fixes argoproj/argo-rollouts#4809