release create sends no project unless --project is set

未关闭
#2,534 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
63/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
cli

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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]

主要语言
TypeScript
星标
975
派生
189
平均合并
19 小时 57 分钟
30 天内合并 PR
542

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。