`sentry release set-commits --local` sends commits without `patch_set` and with only their subject line
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- git, node.js, typescript
- 領域
- cli
調査の方向性
Start with getCommitLog in packages/cli/src/lib/git.ts, around line 204, where the git log format string is built, and check how the commit message and patch_set fields are populated before the request is sent. Run the reproducer with the pnpm bundle step to see the two commits go up without patch_set and with only their subject. Done when each commit in the PUT body carries a patch_set listing its changed files and its full message, matching the expected output in the issue.
索引モデルが issue の本文から書いたものです。
説明
Environment
sentrybundled frommainat e72bcc06cafabd9bac550b7aa3b59861e6d0a0f5 with no uncommitted changes (sentry --version:0.52.0-dev.0), and[email protected]from npm, which does the same- node v26.12.1 on win32 x64, git version 2.56.0.windows.4
Steps to Reproduce
- In a git repository with an
originremote, make a commit that addsapp.jswith the messageAdd the app. - Make a second commit that changes
app.js, addsanswer.test.js, and has the messageChange the answer, a blank line andFixes EXAMPLE-APP-1. - Run
sentry release set-commits example-org/1.0.0 --localwithSENTRY_URLpointing at a server that records requests andSENTRY_AUTH_TOKENset to any value. - Read the
commitsin the body of thePUT /api/0/organizations/example-org/releases/1.0.0/request.
Expected Result
Each commit carries a patch_set with the files it added, modified or deleted, and its whole message as message, as sentry-cli releases set-commits --local sends them (generate_patch_set in sentry-cli 3.8.2):
Change the answer:patch_set[{"path":"answer.test.js","type":"A"},{"path":"app.js","type":"M"}],message"Change the answer\n\nFixes EXAMPLE-APP-1\n"Add the app:patch_set[{"path":"app.js","type":"A"}],message"Add the app\n"
The other fields of each commit stay as they are. The reproducer compares each message without its surrounding whitespace.
Actual Result
No commit has a patch_set, and message is the subject line alone, so the Fixes EXAMPLE-APP-1 line never reaches Sentry:
472c60c patch_set=undefined message="Change the answer"
9fda718 patch_set=undefined message="Add the app"
The git log format getCommitLog reads is %H%x00%s%x00%aN%x00%aE%x00%aI (packages/cli/src/lib/git.ts#L204).
Reproducer
https://gist.github.com/YevheniiKotyrlo/8af7332fa8e6abb43e2db17d5bafe2c7
It makes the repository above in a temporary folder, with no global or system git config, checks that it is the one the steps describe, runs the CLI against a local stand-in for the Sentry API that records each request, and exits 1 while a commit goes up without its patch_set or with only its subject, 0 once every commit carries both, 2 when a step fails or the run ends another way. git, npm, pnpm and the CLI get the caller's environment without its GIT_* variables, with TEMP, TMP and TMPDIR made absolute. The run sets the repository's commit dates, its git user, an empty git config, commit.gpgsign=false and core.autocrlf=false, and gives the CLI SENTRY_HOST and SENTRY_URL (the stand-in), a placeholder SENTRY_AUTH_TOKEN, a SENTRY_CONFIG_DIR in its temporary folder, SENTRY_CLI_NO_TELEMETRY and SENTRY_CLI_NO_UPDATE_CHECK. The verdict depends on the repository's messages and files, which it checks first, and on SENTRY_HOST and SENTRY_URL bringing the requests to the stand-in; the dates only fix the SHAs it prints. Its output names the home folder as ~, the temporary folder as <temp>, the run's folder in it as <work> and a toolkit checkout as <toolkit>. It needs git and no Sentry account. The npm form ran on Node 20.20.2 and 26.12.1. A checkout needs pnpm and the Node its package.json names (22.15 or later on main); with an older node on PATH the run ends with 2 and names it.
node repro.mjs # sentry@latest from npm
node repro.mjs <toolkit> # a getsentry/toolkit checkout after `pnpm install`: runs `pnpm run bundle` in packages/cli first
Its output on main:
node v26.12.1 on win32 x64, git version 2.56.0.windows.4
$ # sentry: getsentry/toolkit at e72bcc06cafabd9bac550b7aa3b59861e6d0a0f5, no uncommitted changes
$ pnpm run bundle # in packages/cli
$ git log --name-status --format='%h %B'
472c60c Change the answer
Fixes EXAMPLE-APP-1
A answer.test.js
M app.js
9fda718 Add the app
A app.js
$ sentry --version
0.52.0-dev.0
$ sentry release set-commits example-org/1.0.0 --local
Commits Set: 1.0.0
━━━━━━━━━━━━━━━━━━
╭─────────┬───────╮
│ Version │ 1.0.0 │
│ Commits │ 2 │
╰─────────┴───────╯
Requests the stand-in API received:
GET /api/0/organizations/example-org/ -> 200
PUT /api/0/organizations/example-org/releases/1.0.0/ -> 200
The PUT to /api/0/organizations/example-org/releases/1.0.0/ carried 2 commits:
472c60c patch_set=undefined message="Change the answer"
9fda718 patch_set=undefined message="Add the app"
RESULT (exit 1): defect shows (sentry 0.52.0-dev.0 built from e72bcc06cafa): 2 of 2 commits sent without patch_set, 1 of 1 multi-line messages cut to the subject line
- 主要言語
- TypeScript
- スター
- 975
- フォーク
- 189
- 平均マージ
- 19時間 57分
- マージ済み PR(30日)
- 542
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/toolkit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getsentry/toolkit#2583 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
getsentry/toolkit#2531 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
mcp-feedback-pattern
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
getsentry/toolkit#2458 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/toolkit#2444 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
mcp-feedback-pattern
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
getsentry/toolkit#2362 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/toolkit の issue をすべて見る
似ている issue
-
sumHorizontal, maxHorizontal, minHorizontal, allHorizontal, anyHorizontal, struct and argSortBy treat strings as literals instead of column names対応中かも @tomaionescu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pola-rs/nodejs-polars#486 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jaegertracing/jaeger-ui#4853 ·
メンテナーはふだん 1 日以内に返信
-
area/plugins platform/linux reproduced type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#66970 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
area:tui enhancement platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anthropics/claude-code#112838 ·
-
approved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信