-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore(cells) Switch ReactView and GenericReactView to control silo #104552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. Refs INFRENG-238
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104552 +/- ##
===========================================
+ Coverage 80.52% 80.54% +0.02%
===========================================
Files 9352 9354 +2
Lines 400460 400945 +485
Branches 25696 25696
===========================================
+ Hits 322477 322952 +475
- Misses 77533 77543 +10
Partials 450 450 |
- Change silo mode of UI endpoint tests to be control scoped as ReactPage is now control scoped. - Update a route name to not overlap with the non-customer domain path.
Subclasses of `sentry.web.frontend.base.BaseView` should not be part of the controlsilo URL map because the UI will not make requests to these paths.
|
🚨 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 |
| r"^(?P<organization_slug>[^/]+)/projects/(?P<project_id_or_slug>[^/]+)/events/(?P<client_event_id>[^/]+)/$", | ||
| ProjectEventRedirect.as_view(), | ||
| name="sentry-project-event-redirect", | ||
| name="sentry-organization-project-event-redirect", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had two routes with this name 🫠
In #104552 I want to make `ReactPage` control-only. This change *should* be a no-op for saas, but I want to make sure of that first by validating with real traffic. Refs INFRENG-238
In #104552 I want to make `ReactPage` control-only. This change *should* be a no-op for saas, but I want to make sure of that first by validating with real traffic. Refs INFRENG-238
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elif breaks view_class extraction from partial-wrapped functions
Low Severity
The change from if to elif on line 99 alters the control flow logic. Previously, after unwrapping a functools.partial, the code would also check if the unwrapped function has a view_class attribute (for class-based views). With elif, if func is a partial, it gets unwrapped but then the view_class check is skipped entirely. This means if an as_view() result is wrapped in a partial, the view_class won't be extracted, potentially causing the URL pattern to be incorrectly processed or skipped. While no partials are currently used in URL patterns, this is a semantic change to the logic.
| self.setup_user(is_superuser=True) | ||
| self.get_success_response(self.organization.slug, status_code=200) | ||
| response = self.get_success_response(self.organization.slug, status_code=200) | ||
| assert response.headers["Content-Type"] == "text/html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content-Type assertion may fail due to charset
Low Severity
The assertion response.headers["Content-Type"] == "text/html" uses strict equality, but Django HTML responses typically include charset in the Content-Type header (e.g., text/html; charset=utf-8). This would cause the assertion to fail. Other code in this codebase uses .startswith() when checking Content-Type headers to handle this case.
|
PR reverted: 24fcc64 |
… silo (#104552)" This reverts commit 503b698. Co-authored-by: markstory <[email protected]>
|
Reverted because the changes to control silo URL mappings broke the wizard. |
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
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
…#105880) 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
We render the bulk of our HTML via ReactPage. Right now that endpoint is marked as
all_siloto make integration with tests simpler. Switch these endpoints to control as we're trying to have a minimal number of endpoints marked asall_siloand I want to better understand the scope of test failures from this change.Refs INFRENG-238