Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

find_referenced_groups: Fixes-keyword ID list spans newlines, linking wrong issues as fixed

Aperta Adatta ai principianti
#125,575 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@CodeAlex52 ci sta già lavorando.

Dal 30/9/2026.

  • #126044 di @CodeAlex52 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia in src/sentry/utils/groupreference.py con _fixes_re, quindi segui Commit.find_referenced_groups() e PullRequest.find_referenced_groups() per capire come gli ID estratti diventano riferimenti risolti. Aggiungi la copertura per una parola chiave fixes seguita da un a capo e verifica che gli elenchi sulla stessa riga, come “Fixes A-1, B-2”, continuino a funzionare, senza che gli ID nel testo descrittivo vengano trattati come corretti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Product Area: Releases Waiting for: Product Owner

_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).

Lingua principale
Python
Stelle
45.6k
Fork
4.9k
Merge medio
1g 1h
PR unite (30g)
665

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry

Tutte le issue di getsentry/sentry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.