Duplicate labels cannot be detected with confidence

Aperta
#1,126 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by reproducing the intermittent duplicate-label warning in the standalone Sphinx sandbox described in the issue, then inspect Sphinx's parallel document chunking and merge_domaindata behavior. The issue does not name repository files or tests, so first locate the docs build configuration and its invocation. Done means duplicate labels are detected consistently across worker chunks and the docs build reports the duplicate reliably.

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

Descrizione

The docs build reads pages in parallel (Sphinx 9.1.1, one worker per CPU). In the Sphinx source I checked:

  • Documents are split into contiguous chunks; chunk size depends on the total document count and the CPU count (make_chunks).
  • The “duplicate label” warning is only raised when a worker already has the other label in memory.
  • When chunks are merged back (merge_domaindata), duplicates are silently overwritten. The code even says # XXX duplicates?.
  • Workers are forked lazily as earlier ones finish, so whether one sees a label from another chunk depends on chunk boundaries and timing.

The above leads to random detection of duplicated labels, exmaple here:
https://github.com/eclipse-score/reference_integration/actions/runs/46622533310/job/142555715545?pr=534

The change did not change the failing modules, which was merged green before, but now it catches an error. The issue can be easily reproduced in the sandbox small standalone Sphinx project with AI agent help

Lingua principale
Python
Stelle
11
Fork
39
Merge medio
1g 13h
PR unite (30g)
65

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 eclipse-score/docs-as-code

Tutte le issue di eclipse-score/docs-as-code

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.