-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Limit organization projects to max results #104436
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
base: master
Are you sure you want to change the base?
Limit organization projects to max results #104436
Conversation
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: david <david@sentry.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104436 +/- ##
=========================================
Coverage 80.51% 80.51%
=========================================
Files 9348 9346 -2
Lines 399919 399817 -102
Branches 25651 25638 -13
=========================================
- Hits 322005 321930 -75
+ Misses 77466 77439 -27
Partials 448 448 |
Co-authored-by: david <david@sentry.io>
|
🚨 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 |
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
Co-authored-by: david <david@sentry.io>
…-claude-4.5-sonnet-thinking-3559
|
@cursor there are some tests that look at headers which are now failing, review the codebase for those tests and adjust them to include the new cors header... Heres an example: =================================== FAILURES ===================================
|
|
Perfect! I've fixed all the failing CORS header tests. Changes MadeUpdated 5 test methods in
Each test now includes assert response["Access-Control-Expose-Headers"] == (
"X-Sentry-Error, X-Sentry-Direct-Hit, X-Sentry-Warning, X-Hits, X-Max-Hits, "
"Endpoint, Retry-After, Link"
)This matches the updated CORS headers in Complete Summary of All Changes in This PRBackend:
Frontend:
Learn more about Cursor Agents |
Co-authored-by: david <david@sentry.io>
|
From prod: we're seeing some timeouts on this endpoint, but its not common. That is, primarily its happening to one customer, and we think its because of cache busting happening frequently. This is still an issue, but it means this is less critical. Some of our larger customers still have this endpoint taking 5s+ (with 0.5mb of JSON returned) BUT it looks like a lot of frontend code assumes this is in memory and may crash if its not. This could be minor hallucination, but here's the pattern: There's a bunch of forced type assertions as well that should just be reconciled. Either the API is returning a project, or its truly optional and can be undefined and needs handled. Its a distributed system after all so data can be returned in a variety of states. This would not be that hard to address, so we should just do it. e.g.: This looks like a real issue that would probably happen immediately so we're gonna hold on landing this: |
|
|
I have an agent running through and fixing the bulk of the useProjects issues to use the dynamic loading technique. |
|
thanks for jumping on this, david! i just ran a script to delete all our old/stale projects and are disabling sentry projects for our infra previews |
Limits the number of projects returned by the organization project index endpoint (
/organizations/{organization_slug}/projects/) to a maximum whenall_projectsis requested. This prevents potential performance issues and timeouts for organizations with a very large number of projects.Instead of a hard error, a "soft error" approach is implemented:
X-Sentry-Warningheader is added to the response, informing the client that the results are incomplete.