Skip to content

fix(teams): return query errors for unsupported searches - #13566

Merged
HarshMN2345 merged 1 commit into
mainfrom
codex/sentry-team-query
Sep 9, 2026
Merged

HarshMN2345 merged 1 commit into
mainfrom
codex/sentry-team-query

Conversation

@HarshMN2345

@HarshMN2345 HarshMN2345 commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Searching teams with Query::search('name', ...) returns HTTP 500 because name has no fulltext index. Map the database query exception to HTTP 400 with general_query_invalid, following the existing Functions, Variables, and Proxy list handlers from #13208.

The regression extends TeamsBase::testListTeams for both total settings. Existing cases continue to cover the supported search parameter, name equality filters, and cursor pagination.

Validation: the regression failed with HTTP 500 before the fix. Afterward, the three console/client/server list tests pass with 196 assertions. Targeted Pint, PHPStan, Rector, and git diff --check pass.

Fixes CLOUD-3QX9.

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with focused behavioral coverage for the corrected error response.

Summary

  • Maps database QueryException failures from team listing and counting to general_query_invalid.
  • Adds regression coverage for requests with and without total counting.
  • Preserves the existing special handling for cursor-ordering failures.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → codex/sentry-team-query (after).

Metric Before After Change
🚀 Requests/sec 155.58 154.56 ⚪ -0.7%
⏱️ Latency P50 110.68 ms 109.45 ms ⚪ -1.1%
⏱️ Latency P95 262.73 ms 270.19 ms ⚪ +2.8%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 109.45 270.19 9,975 154.56 +7.47
Account 228.23 430.55 525 8.7 +51.08
TablesDB 104.47 199.08 5,425 86.89 +2.85
Storage 102.02 217.4 2,625 43.57 -12.27
Functions 168.14 341.59 1,400 23.71 +22.92

Top API waits (after)

API request Max wait (ms)
functions.variables.update 836.77
account.name.update 662.74
functions.variables.delete 615.48
functions.create 592.98
functions.delete 554.81

@HarshMN2345
HarshMN2345 merged commit d773cce into main Sep 9, 2026
46 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Sep 10, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants