Repository navigation
fix(assisted-query): Treat empty list as all accessible projects for issues RPCs - #126806
Merged
Merged
Conversation
The Seer issues RPCs forwarded an empty project_ids list to the organization endpoints unchanged. An omitted project filter scopes those endpoints to the caller's team memberships, and these calls authenticate with an org API key that has none, so the endpoints rejected the request with a 400 instead of searching the whole org. Send the all-access sentinel when no projects are requested, and teach the release-value helper to recognize it. The helper now also skips releases whose only project is pending deletion.
aliu39
marked this pull request as ready for review
October 7, 2026 23:18
Removed comments explaining project filter logic.
isaacwang-sentry
approved these changes
Oct 8, 2026
| params: dict[str, Any] = { | ||
| "query": query, | ||
| "project": project_ids, | ||
| "project": project_ids or [ALL_ACCESS_PROJECT_ID], |
Member
There was a problem hiding this comment.
Does this bypass caller permissions?
Member
Author
There was a problem hiding this comment.
yes but this is an existing problem for all rpcs / non codemode 😅
its only possible to scope when you have an api request context / using codemode
GemTails
pushed a commit
to GemLunaMarine/sentry
that referenced
this pull request
Oct 8, 2026
…issues RPCs (getsentry#126806) ## Problem When Seer asked Sentry for issue data without naming any specific projects, the request failed outright. Four of the issue-related Seer tools were affected: searching issues, fetching issue stats, and the two that populate search filter suggestions. The intent of an empty project list is "search everywhere I can see." Sentry instead read it as "no filter specified" and fell back to the caller's personal project memberships — of which Seer, as a service, has none. The result was a hard error rather than an org-wide search. ## Fix These calls now explicitly ask for all accessible projects when none are specified, so Seer gets results across the organization as intended. Two related cleanups to the release-name suggestions: - They now understand the same "all projects" request, instead of silently returning nothing. - They **no longer suggest releases that belong only to a project being deleted.** ## Impact Behavior only changes where the request previously failed or returned nothing. Calls that name specific projects are unaffected. The same four tools are shared with the public organization-scoped Seer endpoint, so both benefit. ## Testing Nine tests added covering each affected path. Each was confirmed to fail without the fix. Full file passes: 67 tests. relates to https://github.com/getsentry/seer/pull/8727 (merged)
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Seer asked Sentry for issue data without naming any specific projects, the request failed outright. Four of the issue-related Seer tools were affected: searching issues, fetching issue stats, and the two that populate search filter suggestions.
The intent of an empty project list is "search everywhere I can see." Sentry instead read it as "no filter specified" and fell back to the caller's personal project memberships — of which Seer, as a service, has none. The result was a hard error rather than an org-wide search.
Fix
These calls now explicitly ask for all accessible projects when none are specified, so Seer gets results across the organization as intended.
Two related cleanups to the release-name suggestions:
Impact
Behavior only changes where the request previously failed or returned nothing. Calls that name specific projects are unaffected. The same four tools are shared with the public organization-scoped Seer endpoint, so both benefit.
Testing
Nine tests added covering each affected path. Each was confirmed to fail without the fix. Full file passes: 67 tests.
relates to https://github.com/getsentry/seer/pull/8727 (merged)