Repository navigation
ref(cli): Bump @sentry/api to 1.55.0 and read token scopes with retrieveApiIndex - #2118
Merged
Merged
Conversation
…eveApiIndex 1.55.0 publishes `GET /api/0/` (getsentry/sentry#130369) as the `retrieveApiIndex` operation. Scope recovery now reads the token's scopes through it instead of the raw `apiRequestToRegion` helper. It still targets the control silo, still returns null when `auth` is null, and a 401 still surfaces as an ApiError with that status. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 9, 2026
This branch was successfully 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.
Bumps
@sentry/apifrom 1.53.0 to 1.55.0 and moves the CLI'sGET /api/0/call onto the generatedretrieveApiIndexoperation. getsentry/sentry#130369 published that endpoint, and 1.55.0 ships it.Change
getCurrentAuthScopes(packages/cli/src/lib/api/auth.ts) feeds scope recovery. It used to call the rawapiRequestToRegion(getControlSiloUrl(), "")helper. It now callsretrieveApiIndexwithgetSdkClientConfig(getControlSiloUrl()), thenunwrapValidatedResultwith the same valibot schema. This is the same pattern asorg-auth-tokens.ts.Behavior is unchanged:
auth: nullstill returnsnull. Sentry sends that for anonymous requests, session requests and requests with no token, and scope recovery treats it asinvalid.ApiErrorwithstatus: 401. That's the casescope-recovery.tschecks. CLI errors thrown by the fetch layer, such asAuthError, still pass throughunwrapResultunchanged.With this change, the API discovery step in
typecheckno longer reportsauth.tsas "not in the public catalog".Bump
pnpm-workspace.yaml: the catalog andminimumReleaseAgeExcludeboth move to@sentry/api@1.55.0.pnpm-lock.yaml: the@sentry/apientries move to 1.55.0 and its integrity. 1.55.0 has the same dependencies and peer dependencies as 1.53.0.pnpm install --no-frozen-lockfilewouldn't rewrite these entries. pnpm's lockfile age check rejected the old 1.53.0 entry before it resolved anything, even with 1.53.0 temporarily excluded, so I edited the entries by hand.pnpm install --frozen-lockfilepasses on the result, age policy check included.Still waiting on sentry
/auth/→GET /users/me/, falling back to/auth/on a 403 from older self-hosted servers: feat(apidocs): Publish user details GET with token access sentry#130368traces.ts, logs): feat(apidocs): Publish trace item details endpoint sentry#130373Gate (local sandbox)
pnpm run tsc: passes.pnpm run lint: passes.@sentry/cli3to4can't run here, because itscodemodbinary needs GLIBC 2.35.test/lib/api/auth.test.tsnow mocksretrieveApiIndexand covers scopes,auth: null, and the 401.No UI change, so no screenshots.
Part of the
@sentry/apimigration that started in #2073 (tracking issue: getsentry/sentry#130351).via @BYK.
--
View Session [Sentry]