find_referenced_groups: Fixes-keyword ID list spans newlines, linking wrong issues as fixed
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
src/sentry/utils/groupreference.py の _fixes_re から始め、Commit.find_referenced_groups() と PullRequest.find_referenced_groups() を追って、抽出された ID がどのように解決済みの参照になるかを理解します。改行が続く fixes キーワードのカバレッジを追加し、「Fixes A-1, B-2」のような同一行のリストが引き続き機能することを確認します。また、説明文中の ID が修正済みとして扱われないことも確認します。
索引モデルが issue の本文から書いたものです。
説明
_fixes_re in src/sentry/utils/groupreference.py:
_fixes_re = re.compile(
rf"\b{_fix_keywords}:?\s+([A-Za-z0-9_\-\s\,]+)\b",
re.I,
)
The \s inside the ID-list character class also matches newlines, so the match swallows every line after the keyword, and _short_id_re then pulls short-ID-shaped tokens out of narrative prose. For example:
Fixes SENTRY-1
Backported from OTHER-456 for the release branch
The IDs treated as fixed come out as ['SENTRY-1', 'OTHER-456'], when only SENTRY-1 was meant.
This matters because Commit.find_referenced_groups() and PullRequest.find_referenced_groups() feed the resolved_in_commit / resolved_in_pull_request receivers, which create GroupLink(relationship=resolves) records. A phantom ID that happens to resolve to a real group in the org can then get auto-resolved by a release containing that commit. The \s was clearly intended for same-line separators like Fixes A-1, B-2, not newlines.
(find_fix_statements, used by the Seer RPC path, works per-line and is not affected.)
Observed on master at bb47162e (2026-09-25).
- 主要言語
- Python
- スター
- 45.7k
- フォーク
- 5k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 651
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry のほかの issue
-
Repeated integration DELETE runs uninstall() again and can remove a shared install from another org対応中かも @sentry-junior が 1 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
getsentry/sentry#129229 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry#129182 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Cocoa replays hide Logs tab on supported SDK versions対応中かも @Brian-An が 20 日前に担当しました。 オープンBug Cocoa Replays
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
getsentry/sentry#124217 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Product Area: Settings - Auth Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
getsentry/sentry#122437 · コメント 6 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Incorrect Russian translation in django.po対応中かも @nightcityblade が 16 日前に担当しました。 オープンBug Good First Issue Product Area: Settings - Integrations
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
getsentry/sentry#120651 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pytest-dev/pytest-html#1085 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
pollen-robotics/reachy_mini#1527 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
A seed and its negative give the same run, so realizations of a negative seed repeat each otherオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信