chore(cells) Switch ReactView and GenericReactView to control silo v2#105880
chore(cells) Switch ReactView and GenericReactView to control silo v2#105880
Conversation
Mulligan on #104552 which broke sentry-wizard. We render the bulk of our HTML via ReactPage. Right now that endpoint is marked as all_silo to make integration with tests simpler. Switch these endpoints to control as we're trying to have a minimal number of endpoints marked as all_silo and I want to better understand the scope of test failures from this change. This time around I've limited the excluded views to only subclasses of `ReactPage` as we *do* have HTML views that the UI code uses. Refs INFRENG-238
|
🚨 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 |
| if isinstance(func, functools.partial): | ||
| func = func.func | ||
| if hasattr(func, "view_class"): | ||
| elif hasattr(func, "view_class"): |
There was a problem hiding this comment.
Logic change breaks view_class extraction for partial-wrapped views
Medium Severity
The change from if to elif for the view_class check alters the control flow logic. Previously, if func was a functools.partial, the code would unwrap it and then independently check if the unwrapped function has a view_class attribute. With elif, these checks are now mutually exclusive - if func is a partial, the code unwraps it but never extracts view_class from the unwrapped function. This could cause incorrect module/function name resolution and break the issubclass check for ReactPageView/GenericReactPageView for any partial-wrapped class-based views.
Mulligan on #104552 which broke sentry-wizard.
We render the bulk of our HTML via ReactPage. Right now that endpoint is marked as all_silo to make integration with tests simpler. Switch these endpoints to control as we're trying to have a minimal number of endpoints marked as all_silo and I want to better understand the scope of test failures from this change.
This time around I've limited the excluded views to only subclasses of
ReactPageas we do have HTML views that the UI code uses.Refs INFRENG-238