fix(hybrid-cloud): Mark DiscordInteractionsEndpoint as an all silo endpoint#60938
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #60938 +/- ##
==========================================
+ Coverage 80.94% 80.96% +0.01%
==========================================
Files 5182 5182
Lines 227131 227021 -110
Branches 38175 38152 -23
==========================================
- Hits 183853 183802 -51
+ Misses 37665 37606 -59
Partials 5613 5613
|
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
There was a problem hiding this comment.
| if not self.group_id: | |
| return self.send_message(INVALID_GROUP_ID) | |
| if not self.group: | |
| return self.send_message(INVALID_GROUP_ID) | |
| if not self.group_id or not self.group: | |
| return self.send_message(INVALID_GROUP_ID) |
you could combine these conditions 🏌️
There was a problem hiding this comment.
Should we have separate test case for the interactions that are handled on control silo?
There was a problem hiding this comment.
DiscordMessageComponent relies on guild_id (integration id) and the group id, and needs to run in the region silo. That's why I marked the entire test suite as a region silo test.
We don't anticipate DiscordMessageComponent to ever run in the control silo.
ce78fbd to
183eb00
Compare
183eb00 to
668e273
Compare
The
DiscordInteractionsEndpointendpoint needs to be marked as@all_silo_endpoint, as it contains code paths that needs to be handled at the control silo. An example would be responding to/helpcommands; as this interaction doesn't depend on the Organization nor the Integration.The Discord request parser relies on a valid
guild_id(Discord server's id) to fetch theIntegrationobject. If theguild_idis valid, then we route requests to the appropriate region silo. Otherwise they route to the control silo.I've updated tests to ensure
DiscordInteractionsEndpointis resilient for invalid values ofguild_id.I've also updated
DiscordInteractionsEndpointto be resilient for invalid values of group ids.