flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shards

Aperta Adatta ai principianti
#5,309 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Inizia da tests/red_team/http/test_resource_exhaustion.py intorno alla riga 104, dove started.acquire(timeout=5) fa da gate a ciascuna delle 20 voci dispatchate; leggi il worker requests.post patchato sopra per vedere come viene segnalato started. Sostituisci l'attesa fissa di 5 s per voce con qualcosa indipendente dal carico, ad esempio facendo join dei thread restituiti o scalando la scadenza con il numero di voci. Fatto significa che la cella supera 50 esecuzioni ripetute sotto -n 4.

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

Descrizione

status/accepted type/bug

tests/red_team/http/test_resource_exhaustion.py::TestDispatchThreadCap::test_fire_returns_thread_per_http_entry_on_head failed, then passed on a re-run of the same CI run, on 6 head SHAs between 2026-11-12 and 2026-11-20 (Build & Test Shard 1/2, Linux):

created (UTC) run attempt job head
2026-11-12 16:28 43259115918 2 Build & Test Shard 2 (Linux) 829de4ea
2026-11-18 11:00 44290698835 1 Build & Test Shard 2 (Linux) b044e675
2026-11-19 06:18 44471182085 1 Build & Test Shard 1 (Linux) c460163c
2026-11-19 16:38 44568359849 1 Build & Test Shard 1 (Linux) 2df64b73
2026-11-20 03:53 44670763874 1 Build & Test Shard 2 (Linux) a10a67f5
2026-11-20 08:39 44704340181 1 Build & Test Shard 1 (Linux) accb621e

Failure signature (job 136180074435):

>                   assert started.acquire(timeout=5)
E                   assert False
E                    +  where False = acquire(timeout=5)
tests/red_team/http/test_resource_exhaustion.py:104: AssertionError

The test fires 20 HTTP entries and waits up to 5 s for each patched requests.post worker to signal started. On a busy xdist shard, a worker can start later than that, so the wait times out although the behaviour the test pins (one thread per entry) is unchanged.

No failure since 2026-11-20 in the 14-day window, and nothing changed in the test or the dispatcher, so it may still be latent.

Done when: the wait no longer depends on runner load (for example, wait on the returned threads having started, or a deadline that scales with the entry count), and 50 repeated runs of the cell under -n 4 pass.

Found by the 14-day flake scan (failed attempt then a passing re-attempt of the same run).

Lingua principale
Python
Stelle
4.4k
Fork
430
Merge medio
19h 38m
PR unite (30g)
637

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 microsoft/apm

Tutte le issue di microsoft/apm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.