Skip to content

ref(cli): Bump @sentry/api to 1.46.0 and move unblocked call sites - #2078

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

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

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Next step after #2073 and #2075, which moved the CLI onto the generated @sentry/api operations. @sentry/api 1.46.0 includes the API docs fixes from getsentry/sentry#130348, #130349 and #130350, so six more call sites now match their generated operation. This PR bumps the package and moves them.

Moved onto generated operations

Command(s) Call Operation Unblocked by
issue resolve/unresolve/archive, feedback resolve/spam/… (org-scoped) updateIssueStatus updateOrganizationIssue sentry#130348 (body fields no longer all required)
issue merge mergeIssues updateOrganizationIssues with numeric ids and {merge: true} sentry#130348
dashboard view chart widgets queryWidgetTimeseries listOrganizationEventsTimeseries sentry#130349 (yAxis array, interval int or duration)
explore time series queryEventsTimeSeries listOrganizationEventsTimeseries sentry#130349
agent-conversation list listConversations listOrganizationAiConversations with sort sentry#130350
trace view, span view, log view getDetailedTrace getOrganizationTrace with timestamp sentry#130349

Trace meta already used getOrganizationTraceMeta and doesn't send timestamp, so nothing changes there.

Behavior notes

  • Responses are validated exactly as before: EventsTimeseriesResponseSchema for widgets and ConversationListItemSchema for conversations. The explore time series and trace detail responses were not validated before and still aren't.
  • issue merge still turns a 204 (no matching issues) into the same friendly error, and still clears each affected issue's cross-origin cache.
  • agent-conversation list --sort is now typed with the endpoint's sort enum. The command's sort values are a subset of it.
  • Errors on the moved calls use the SDK wording, as in ref(cli): Move API calls with generated operations onto @sentry/api #2073 and fix(cli): Send the API params the endpoints accept #2075, e.g. Failed to update issue: 403 Forbidden. Status codes and the 401/403 enrichment are unchanged.
  • The 1.46.0 regen also changes uniqueValues/key/name descriptions in the generated issue skill reference, which is committed here. Typecheck is otherwise unaffected.

Remaining apiRequest* call sites and raw fetches

Details for each are in getsentry/sentry#130351.

Not in the public schema (needs a getsentry/sentry API docs decision):

  • organizations.ts:66, projects.ts:576/591: region lookups
  • users.ts:21: current user
  • trials.ts:30/70: trials list/start
  • org-auth-tokens.ts:77: delete org auth token
  • dashboards.ts:201/235: dashboard revisions/restore
  • issues.ts:329: unscoped GET /issues/{id}/
  • issues.ts:632: legacy unscoped PUT /issues/{id}/
  • logs.ts:486: logs query
  • traces.ts:225: trace-items detail (experimental)
  • releases.ts:425: release set-commits
  • preprod-artifacts.ts:283/449: build/snapshot upload
  • Raw fetches: getSharedIssue (issues.ts) and openSnapshotArchive (preprod-artifacts.ts)

Dynamic request identity / transport:

  • auth.ts:17
  • org-auth-tokens.ts:37/59
  • preprod-artifacts.ts:508/526: snapshot downloads

Kept on purpose:

The Oxlint rule that bans the helpers comes last, after these are resolved.

Verification

  • pnpm install --frozen-lockfile passes with the committed lockfile.
  • pnpm run tsc and pnpm run lint pass.
  • CLI tests: 12919 pass and 5 fail. All 5 are the sandbox-only permission tests that also fail on main (completions ×2, upgrade acquireLock, db/resilient readonly, dsn/code-scanner).
  • The dashboard time series tests now mock listOrganizationEventsTimeseries. I added an org-scoped updateIssueStatus test. The conversation, explore and trace tests run at the fetch layer and pass unchanged.
  • API discovery no longer lists the moved call sites.

via @BYK.

--

View Session [Sentry]

@sentry/api 1.46.0 carries getsentry/sentry#130348, #130349 and #130350,
so these calls now match their generated operations:

- issue status update: updateOrganizationIssue
- issue merge: updateOrganizationIssues with numeric ids and merge: true
- dashboard widget and explore time series: listOrganizationEventsTimeseries
- agent conversations list with sort: listOrganizationAiConversations
- trace detail with timestamp: getOrganizationTrace

Responses are still checked with the CLI's own schemas where they were
before. The regenerated issue skill reference picks up new field docs.
@vercel

vercel Bot commented Nov 7, 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 7, 2026 2:27am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 7, 2026
@BYK
BYK enabled auto-merge (squash) November 7, 2026 02:30
@BYK
BYK merged commit bab147c into main Nov 7, 2026
43 checks passed
@BYK
BYK deleted the ref/cli-sentry-api-1.46 branch November 7, 2026 02:36
BYK added a commit that referenced this pull request Nov 7, 2026
`main` fails `Repository quality`, `sentry` and `test` on three oxlint
errors ("Unexpected `await` of a non-Promise value"):

- `packages/cli/src/lib/api/explore.ts:105`
- `packages/cli/src/lib/api/issues.ts:625` and `:672`

#1979 made `getOrgSdkConfig()` synchronous and argument-free. #2078,
which merged just before it, added these three call sites in the old
`await getOrgSdkConfig(orgSlug)` form. Each PR passed on its own. This
changes them to `getOrgSdkConfig()`, like the other call sites.

The org slug those calls passed was already unused. #1979 routes
org-scoped requests through `resolveBaseUrl`, which reads the org from
the request path.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A87622ce3671938950bc6e630 -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A87622ce3671938950bc6e630/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 277f9e00 Deployed Nov 7, 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