Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Oct 15, 2026
betegon
force-pushed
the
bt/cli-api-sdk-upgrade
branch
from
October 15, 2026 18:49
f597242 to
39e36ff
Compare
betegon
force-pushed
the
bt/cli-sdk-team-pagination
branch
from
October 15, 2026 18:52
8ff70a1 to
b685478
Compare
betegon
changed the base branch from
bt/cli-api-sdk-upgrade
to
bt/cli-api-client-adoption
October 15, 2026 18:52
betegon
added a commit
that referenced
this pull request
Oct 15, 2026
Upgrade the CLI from `@sentry/api@0.337.0` to the published `0.356.0`,
preserving its existing standalone calls and pagination. Adapt the SDK's
new HTTP error envelope once in the shared helper so error details,
permission/scope guidance and exit codes stay unchanged.
```ts
// Existing CLI call sites keep this shape.
const result = await listOrganizations({
...getSdkConfig(baseUrl),
});
return unwrapResult<SentryOrganization[]>(result, "Failed to list organizations");
```
The common helper reads `SentryApiError.body`, handles transport
failures without a `Response`, and detects falsy thrown values. Two
direct status reads are guarded. Schema generation supports the SDK's
optional-argument syntax and reads the schema from the installed
version's tag.
Uses the npm release and normal lockfile: no vendored package or
temporary schema pin. The release-age exception is limited to this
verified first-party version. MCP's SDK dependency stays unchanged.
### Validation
- Frozen install of npm `0.356.0` through the configured registry;
release tarball integrity verified. Schema generation maps all 256
endpoints from tag `0.356.0`.
- 434 focused tests, repository typecheck/lint, CJS/ESM bundles and five
package-export checks pass.
- Eight actual CLI scenarios and 17 local HTTP requests match `main`
exactly: stdout/stderr/exit codes and request method/path/query/body.
Includes cursor navigation, scope guidance and automatic team creation.
- Standalone SDK/CLI probes cover HTTP metadata, error-body adaptation,
failures without a response and pre-aborted requests. Local HTTP and
synthetic credentials only; no production OAuth/deployment validation.
- Full workspace run: non-CLI suites pass; CLI has 10,805 passed and 22
skipped. The baseline macOS installer assertion and missing Xcode
`actool` remain; no new failures.
### Compatibility and order
Targets `main` and can merge independently of
[#1502](https://linear.review/getsentry/toolkit/pull/1502),
[#1506](https://linear.review/getsentry/toolkit/pull/1506) and
[#1508](https://linear.review/getsentry/toolkit/pull/1508).
Adoption order: **this upgrade** → [client reuse and `sentry.*`
#1502](https://linear.review/getsentry/toolkit/pull/1502) → [SDK
pagination #1508](https://linear.review/getsentry/toolkit/pull/1508).
The [CLI cancellation fix
#1506](https://linear.review/getsentry/toolkit/pull/1506) remains
independent; this upgrade does not wire signals into every CLI command
or fix its adapter's in-flight cancellation.
Revert adoption steps in reverse order. Frontend integration remains
separate.
betegon
force-pushed
the
bt/cli-api-client-adoption
branch
2 times, most recently
from
October 15, 2026 20:01
167ac51 to
2a0ede6
Compare
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.
Stacked on client reuse #1502, after SDK upgrade #1507. Replace teams' per-page result unwrapping and Link-header handling with the SDK helper:
One call still fetches one HTTP page and retains its
Response. CLI aggregation, cursor history, JSON output and the other teams operations stay unchanged.The shared error interceptor reuses existing CLI error mapping only for calls with
meta.errorContext. HTTP/network guidance and existing auth/API errors are preserved; decoding and validation failures keep their original errors. Ordinary calls continue through their existing unwrap helpers.Validation
116 focused tests and CLI typecheck pass on published SDK
0.356.0. Covers HTTP/network guidance, preserved auth/API errors, opt-in mapping and unchanged decoding/validation failures. Frozen installation and tag-based schema generation also pass; runtime changes are identical to the previously validated pagination implementation.Eight actual CLI scenarios and 17 local HTTP requests preserve exact stdout/stderr/exit codes and request values. Only the ordering of
cursor/per_pagechanges; the CLI cache already normalizes it. Synthetic credentials only; no production OAuth/deployment validation.Order and rollback
#1507 → #1502 → this pagination step. Cancellation #1506 remains independent.
Uses the published SDK inherited from #1507. Reverting this PR restores CLI page handling while keeping client reuse and the SDK upgrade. Reverse the order when reverting earlier adoption steps.