Repository navigation
fix(cli): Flatten release list results for session-based sorts - #1543
Merged
Merged
Conversation
The releases endpoint rejects the sessions, users, and crash-free sorts with a 400 unless flatten=1 is set, so release list --sort sessions/users/cfs/cfu always failed. Send flatten=1 for those sorts.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Oct 19, 2026
This branch was previously deployed
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.
sentry release list --sort sessions(alsousers,crash_free_sessions/cfs,crash_free_users/cfu) always fails with:Reproduced with the released 0.47.0 CLI against sentry.io.
Root cause: Sentry's organization releases endpoint only allows the session-based sorts (
SESSION_SORTSinOrganizationReleasesEndpoint.get) whenflatten=1is set, and returns 400 otherwise.listReleasesPaginatedforwardedsortbut never sentflatten, so every sort the CLI offers exceptdatewas rejected.Change:
listReleasesPaginatedsendsflatten=1whensortissessions,users,crash_free_sessions, orcrash_free_users. Date-sorted requests are unchanged. Withflatten=1, Sentry returns one row per release/project pair, which is what these sorts rank by.Validation:
test/lib/api/releases.test.tscheck that each session sort sendsflatten=1and thatdatedoes not. They failed before the fix and pass after it.flatten=1and 200 with it.pnpm run tsc,pnpm run lint, andpnpm --filter sentry run lintpass.pnpm --filter sentry run testpasses except for 6 permission-based tests (completions, telemetry, upgrade, code-scanner, file-changes), which fail the same way on unmodifiedmainin the sandbox I used.via Junior system actor
scheduler.--
View Junior Session [Sentry]