You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flaky: gateway-smoke #253 test gets 409 on the second lease request after a release #898
e2e/gateway-smoke.test.ts › "returns workerId and worker on a gateway-granted lease, in POST /v1/lease-requests' 201 and in GET /v1/lease-requests/{id} (#253)" fails with expected 409 to be 201 at the second submit(), after the first lease was released and /v1/status showed 0 leases and a ready device. main is green; it is a race, worse on a loaded runner.
Diagnosis: the 409 is REQUESTER_ALREADY_LEASED (src/gateway/fleet-coordinator.ts, #refuseIfAlreadyLeased). release() forgets the lease in the gateway's lease index. A worker view refresh that started before the release and lands after it still lists the lease, and FleetLeaseIndex#addReported (src/gateway/lease-index.ts) adds it back. The next fresh view only marks it missing; it is forgotten one view later. Until then the requester is refused.
Fix: a lease the worker confirmed released through the gateway is not re-added by a later snapshot.
Activity
fix(gateway): mark a release as answered even when its relayed event …