feat(supergroups): Allow frontend to control RCA source via query param#112708
feat(supergroups): Allow frontend to control RCA source via query param#112708
Conversation
|
🚨 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 |
Accept rca_source query param on both supergroup endpoints so the frontend can explicitly request LIGHTWEIGHT or EXPLORER source. Falls back to the supergroups-lightweight-rca-clustering-read feature flag when the param is not provided or invalid. The frontend now reads the -read flag and passes the corresponding rca_source param. Since the flag is now api_expose=True, it can be toggled via the Sentry toolbar for testing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6045f39 to
73c8cff
Compare
| def test_rca_source_invalid_param_falls_back_to_flag(self, mock_seer): | ||
| mock_seer.return_value = mock_seer_response({"id": 1, "title": "test"}) | ||
|
|
||
| with self.feature("organizations:top-issues-ui"): |
There was a problem hiding this comment.
up to you but worth adding a test for invalid param with organizations:supergroups-lightweight-rca-clustering-read enabled?
| try: | ||
| rca_source = RCASource(rca_source_param) if rca_source_param else None | ||
| except ValueError: | ||
| rca_source = None |
There was a problem hiding this comment.
i'm wondering if we need to have a frontend toggle at all honestly, it's pretty trivial to switch internally for testing using the feature flag override
Summary
rca_sourcequery param (LIGHTWEIGHTorEXPLORER) on both supergroup endpoints, falling back to the-readfeature flag when not providedsupergroups-lightweight-rca-clustering-readfeature flag and passes the correspondingrca_sourceparam-readflag toapi_expose=Trueso it's visible to the frontend and toggleable via the Sentry toolbarTest plan
-readflag via toolbar → verify supergroups switch between sources