CLI: Avoid repeated failed region discovery during pagination
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- backend-api-design, cli
Hướng nghiên cứu
Read packages/cli/src/lib/api/projects.ts around listProjects() and packages/cli/src/lib/api/infrastructure.ts around resolveOrgBaseUrl(); inspect the corresponding pagination logic in listMonitors(). Reproduce the 403 discovery response followed by two successful project pages using the fixture HTTP responses and temporary SQLite/cache state described in the issue. Done when the operation makes three requests, returns both pages with unchanged cursors, and preserves the listed cache, retry, account, and authentication behaviors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to #1979 (merged November 7). Reproduced on main at 6aa29057e5b307679c33ac885d42895a51868943 with published @sentry/[email protected].
Reproduction
With a stored account and no cached region, call listProjects("example-org"). Return 403 for organization discovery, then two successful project pages connected by a Link cursor:
GET /api/0/organizations/example-org/ -> 403
GET /api/0/organizations/example-org/projects/ -> page 1
GET /api/0/organizations/example-org/ -> 403 (repeated)
GET /api/0/organizations/example-org/projects/?cursor=… -> page 2
Before #1979: 1 discovery + 2 pages = 3 requests. Current main: 2 discoveries + 2 pages = 4 requests, with identical returned projects. For N successful pages under this failure condition, the count changes from N + 1 to 2N.
Cause and scope
listProjects() shares its config, but resolveOrgBaseUrl() now invokes region resolution for every page. Failed discovery returns a non-cacheable fallback, so the next page repeats discovery. Previously this operation resolved once before pagination. listMonitors() has the same structure; not every pagination helper acquired this behavior in #1979.
Acceptance criteria
- Retain the resolved destination/fallback for the logical pagination operation: the reproduction makes 3 requests and returns both pages with unchanged cursors.
- Preserve successful discovery, existing warm caches, explicit host/account selection, and authentication-error behavior.
- A later independent operation can retry failed discovery; isolate decisions by organization, credentials, and deployment.
- Fix in the CLI using the existing resolver/cache infrastructure. Do not persist failed discovery indefinitely or introduce a second SDK locality cache.
Validation used unmodified CLI modules, real temporary SQLite/cache state and fixture HTTP responses; no production traffic or latency measurements. This can ship as an independent CLI fix before SDK metadata-routing adoption.
- Ngôn ngữ chính
- TypeScript
- Star
- 961
- Fork
- 179
- Merge trung bình
- 15 giờ 33 phút
- Pull request đã merge (30 ngày)
- 476
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/toolkit
-
MCP mcp-feedback-pattern
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/toolkit#2276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI enhancement MCP
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
getsentry/toolkit#1908 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
getsentry/toolkit#1471 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
get_sentry_resource gives no guidance for Explore > Errors list URLsCó thể đã có người làm @sentry-junior đã nhận hôm nay. Đang mởMCP mcp-feedback-pattern
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 32/100
getsentry/toolkit#2278 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
getsentry/toolkit#2275 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/toolkit
Issue tương tự
-
Add: BOM CineĐang mởapproved check:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug platform-android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Termix-SSH/Mobile#146 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
devswha/herdr-web-ui#3875 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100