Skip to content

ref(cli): Bump @sentry/api to 1.55.0 and read token scopes with retrieveApiIndex - #2118

Merged
BYK merged 1 commit into
mainfrom
ref/cli-sentry-api-1.55
Nov 9, 2026
Merged

BYK merged 1 commit into
mainfrom
ref/cli-sentry-api-1.55

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Bumps @sentry/api from 1.53.0 to 1.55.0 and moves the CLI's GET /api/0/ call onto the generated retrieveApiIndex operation. 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 raw apiRequestToRegion(getControlSiloUrl(), "") helper. It now calls retrieveApiIndex with getSdkClientConfig(getControlSiloUrl()), then unwrapValidatedResult with the same valibot schema. This is the same pattern as org-auth-tokens.ts.

Behavior is unchanged:

  • It still goes to the control silo URL. That's the configured server URL on self-hosted, so self-hosted works as before.
  • auth: null still returns null. Sentry sends that for anonymous requests, session requests and requests with no token, and scope recovery treats it as invalid.
  • A 401 still comes back as an ApiError with status: 401. That's the case scope-recovery.ts checks. CLI errors thrown by the fetch layer, such as AuthError, still pass through unwrapResult unchanged.

With this change, the API discovery step in typecheck no longer reports auth.ts as "not in the public catalog".

Bump

  • pnpm-workspace.yaml: the catalog and minimumReleaseAgeExclude both move to @sentry/api@1.55.0.
  • pnpm-lock.yaml: the @sentry/api entries 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-lockfile wouldn'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-lockfile passes on the result, age policy check included.
  • 1.54.0 and 1.55.0 cause no other type errors. Neither the CLI docs nor the skill references changed when regenerated.

Still waiting on sentry

Gate (local sandbox)

  • pnpm run tsc: passes.
  • pnpm run lint: passes.
  • Tests:
    • These all pass: mcp-core, mcp-cloudflare, mcp-test-client, toolkit-core, logger, apps/local, apps/docs-mcp, apps/games-api and apps/cli-docs.
    • CLI: 12952 pass and 5 fail. All 5 are the known sandbox-only permission cases: completions ×2, upgrade lock, resilient DB and the code-scanner unreadable-file test.
    • @sentry/cli3to4 can't run here, because its codemod binary needs GLIBC 2.35.
  • test/lib/api/auth.test.ts now mocks retrieveApiIndex and covers scopes, auth: null, and the 401.

No UI change, so no screenshots.

Part of the @sentry/api migration that started in #2073 (tracking issue: getsentry/sentry#130351).

via @BYK.

--

View Session [Sentry]

…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>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 9, 2026 6:18pm UTC

Request Review

@BYK
BYK enabled auto-merge (squash) November 9, 2026 18:27
@BYK
BYK merged commit 854c670 into main Nov 9, 2026
54 checks passed
@BYK
BYK deleted the ref/cli-sentry-api-1.55 branch November 9, 2026 18:39

This branch was successfully deployed

1 active deployment
Preview — c0618e70 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant