feat(nimbus): Handle emojis added reaction#14927
Merged
yashikakhurana merged 2 commits intomainfrom Mar 17, 2026
Merged
Conversation
jaredlockhart
previously requested changes
Mar 16, 2026
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.
Because
In production, the enrollment ending notification was failing with a Slack API error already has that reaction.
The root cause is that
send_threaded_success_message()is being called multiple times for the same enrollment ending request - either due to Kinto syncs running multiple times, task retries, or periodic checks. Each time it's called, it attempts to add the white_check_mark reaction to the original message. On subsequent calls, the reaction already exists, causing the API to reject the request withalready_reacted.Previously, any Slack API error (including
already_reacted) was treated as a fatal failure, logging the error and returning False. This caused the entire notification flow to fail, even though the actual desired state (the message exists and the reaction is on it) was already achieved.This commit
Adds graceful error handling for the
already_reactedSlack error. Whenreactions_addfails withalready_reacted, the error is caught and ignored since the desired end state is already met - the reaction exists on the message. Other Slack API errors are still re-raised and properly logged as failures.Additionally, this commit adds the underlying support for enrollment ending and experiment ending request notifications with dedicated alert types (
END_ENROLLMENT_REQUESTandEND_EXPERIMENT_REQUEST), consolidates duplicate Slack notification logic, and adds comprehensive tests to verify the fix works correctly.Fixes #14921