Skip to content

Conversation

@markstory
Copy link
Member

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

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
@linear
Copy link

linear bot commented Dec 8, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 8, 2025
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

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.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🚨 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 #discuss-dev-infra channel.

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",
Copy link
Member Author

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 🫠

markstory added a commit that referenced this pull request Dec 10, 2025
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
markstory added a commit that referenced this pull request Dec 10, 2025
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
@getsantry
Copy link
Contributor

getsantry bot commented Jan 1, 2026

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 Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jan 1, 2026
@markstory markstory marked this pull request as ready for review January 6, 2026 21:52
if isinstance(func, functools.partial):
func = func.func
if hasattr(func, "view_class"):
elif hasattr(func, "view_class"):
Copy link
Contributor

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.

Fix in Cursor Fix in Web

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"
Copy link
Contributor

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.

Fix in Cursor Fix in Web

@getsantry getsantry bot removed the Stale label Jan 7, 2026
@markstory markstory merged commit 503b698 into master Jan 7, 2026
68 checks passed
@markstory markstory deleted the chore-reactpage-silo branch January 7, 2026 16:54
@markstory markstory added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Jan 7, 2026
@getsentry-bot
Copy link
Contributor

PR reverted: 24fcc64

getsentry-bot added a commit that referenced this pull request Jan 7, 2026
@markstory
Copy link
Member Author

Reverted because the changes to control silo URL mappings broke the wizard.

markstory added a commit that referenced this pull request Jan 8, 2026
markstory added a commit that referenced this pull request Jan 8, 2026
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
markstory added a commit that referenced this pull request Jan 8, 2026
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
markstory added a commit that referenced this pull request Jan 9, 2026
…#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components Trigger: Revert Add to a merged PR to revert it (skips CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants