ref(api): upgrade @sentry/api to 0.21.0, remove raw HTTP pagination workarounds#321
Merged
ref(api): upgrade @sentry/api to 0.21.0, remove raw HTTP pagination workarounds#321
Conversation
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Api
Formatters
Other
Internal Changes 🔧Api
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ 2340 passed | Total: 2340 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 79.45%. Project has 3217 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 80.37% 80.39% +0.02%
==========================================
Files 120 120 —
Lines 16426 16402 -24
Branches 0 0 —
==========================================
+ Hits 13201 13185 -16
- Misses 3225 3217 -8
- Partials 0 0 —Generated by Codecov Action |
…ounds The @sentry/api SDK now has cursor support for all paginated endpoints (sentry-api-schema#59, #60 fixed via getsentry/sentry#109642). Migrated 5 functions from raw HTTP (orgScopedRequestPaginated) to SDK: - listProjects: SDK auto-pagination loop - listProjectsPaginated: SDK + unwrapPaginatedResult - listRepositories: SDK + unwrapResult (was apiRequestToRegion) - listRepositoriesPaginated: SDK + unwrapPaginatedResult - listTeamsPaginated: SDK + unwrapPaginatedResult Removed dead infrastructure: - extractOrgSlugFromEndpoint + regex constants - orgScopedRequestPaginated - orgScopedPaginateAll All list functions now consistently use the SDK with our custom unwrapResult/unwrapPaginatedResult for proper error type preservation.
2e3467b to
dfd672a
Compare
5 tasks
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.
Summary
Upgrades
@sentry/apifrom^0.1.0to^0.21.0and removes the raw-HTTP pagination workarounds we had in place for sentry-api-schema#59 and sentry-api-schema#60, both fixed by getsentry/sentry#109642.What changed
5 functions migrated from raw HTTP to SDK calls:
listProjectsorgScopedPaginateAll(raw HTTP loop)listAnOrganization_sProjectslistProjectsPaginatedorgScopedRequestPaginatedunwrapPaginatedResultlistRepositoriesapiRequestToRegionunwrapResultvialistAnOrganization_sRepositorieslistRepositoriesPaginatedorgScopedRequestPaginatedunwrapPaginatedResultlistTeamsPaginatedorgScopedRequestPaginatedunwrapPaginatedResult~105 lines of dead infrastructure removed:
extractOrgSlugFromEndpoint+ regex constantsorgScopedRequestPaginatedorgScopedPaginateAllAll list functions now follow the same consistent pattern: SDK call →
unwrapResult/unwrapPaginatedResult.