Flaky e2e: gateway-fleet reads a worker's capacity before the worker has left starting
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- distributed-systems, testing
Direzione di ricerca
Start in e2e/gateway-fleet.test.ts at waitForWorkers and iosLimit, then read src/gateway/worker-link.ts (#rebuildView, #refreshStarting) and the changesCapacityOrLeases filter to see why daemon.started never triggers a refresh. Triage must settle the product question (refresh on leaving starting) before the test fix, and an open PR (#421) already claims the work; done means waitForWorkers waits for capacity/catalog presence and CI passes under the CPU-load conditions described.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What fails
e2e/gateway-fleet.test.ts > "gateway fleet > two workers join, status aggregates them, a kill disconnects one, drain flags the other" fails with AssertionError: expected 0 to be greater than 0 at expect(iosLimit(joined[0])).toBeGreaterThan(0). Seen once in CI on PR #409 (run 37477061691).
Cause: a race on main, not in a PR
The test waits only for both workers to be connected, then reads capacity from that first view. A worker that dials the gateway while its daemon is still starting answers status.get with health and host only (#398), so the gateway builds its view without capacity (worker-link.ts #rebuildView -> #refreshStarting). The view stays without capacity until the next refresh, and none is triggered when the worker becomes running: daemon.started is not a lease./device./install event (changesCapacityOrLeases), so the next read is a device or lease event or the 30s periodic tick. The test's iosLimit falls back to 0.
Evidence
- On
origin/main(37188b5), unmodified: 6 of 6 runs of the file pass under CPU load (16 busy loops on 12 cores), 5 of 5 unloaded. - On
origin/mainwithawait new Promise((r) => setTimeout(r, 1500))as the first line ofconvergeStartupinsrc/daemon/main.ts(a slower startup): 3 of 3 runs fail with this exact assertion (2 tests failed each time). - The window is the worker's startup time, so anything that lengthens startup (PR #409 adds a serial read, doctor pass and lease reconcile) makes it likelier. It is not specific to that PR.
Two things to decide in triage
- Product: should the gateway refresh a worker's view as soon as it leaves
starting? Today a freshly joined worker takes no routed work for up to 30s after its startup ends if no device or lease event happens first (checkFleetCoordinator/routing on a view with no catalog). - Test:
waitForWorkersin the file should wait forcapacity(and catalog) to be present before the test reads it.
- Lingua principale
- TypeScript
- Stelle
- 15
- Fork
- 1
- Merge medio
- 8h 23m
- PR unite (30g)
- 136
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/simlock
-
bug:new
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/simlock#424 ·
I maintainer di solito rispondono entro 1 giorno
-
bug:new
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
callstackincubator/simlock#422 ·
I maintainer di solito rispondono entro 1 giorno
-
bug:new
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
callstackincubator/simlock#420 ·
I maintainer di solito rispondono entro 1 giorno
-
bug:new
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
callstackincubator/simlock#350 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature:spec
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
callstackincubator/simlock#412 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di callstackincubator/simlock
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
siyuan-note/siyuan#20313 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
alunduil/projects-v2-sync#14 ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
DevTools page styles leak into the host app in developmentForse già presa @onmax l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nuxt-modules/better-auth#567 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno