release create sends no project unless --project is set

Đang mở
#2,534 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
63/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
cli

Hướng nghiên cứu

Start in packages/cli/src/commands/release/create.ts near the body.projects assignment and read how ReleaseTarget resolves the organization and version. Compare project resolution with lib/resolve-target.ts and the sourcemap upload and issue list commands. Reproduce a plain release create using configured project settings, then verify the request includes the resolved project and that --project still works.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

sentry release create <version> only sends projects when --project is passed. It never falls back to the project the CLI resolves for other commands (SENTRY_PROJECT, .sentryclirc [defaults], DSN detection), so a plain release create most likely gets a 400 from Sentry.

  • packages/cli/src/commands/release/create.ts (~L177) sets body.projects only from flags.project. Its ReleaseTarget resolves only the org and version.
  • No command under packages/cli/src/commands/release/ uses lib/resolve-target.ts, the shared org/project auto-detection that sourcemap upload (resolveOrgAndProject) and issue list use.
  • Sentry's release POST requires projects: ReleaseSerializerWithProjects.projects in getsentry/sentry src/sentry/api/endpoints/organization_releases.py has no required=False.
  • --project is documented as optional, so v3 CI jobs that relied on SENTRY_PROJECT with sentry-cli releases new break after migrating. This also affects the sentry wizard Wrangler deploy script in getsentry/toolkit#2529.
  • Found by reading the code; not yet reproduced against a server.

@BYK: the original intent was likely to auto-detect the project like issue list does.

via @BYK.

--

View Session [Sentry]

Ngôn ngữ chính
TypeScript
Star
975
Fork
189
Merge trung bình
19 giờ 57 phút
Pull request đã merge (30 ngày)
542

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/toolkit

Tất cả issue của getsentry/toolkit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.