Flaky e2e: gateway-fleet reads a worker's capacity before the worker has left starting
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- distributed-systems, testing
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 15
- Fork
- 1
- Merge trung bình
- 8 giờ 23 phút
- Pull request đã merge (30 ngày)
- 136
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/simlock
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/simlock#424 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
callstackincubator/simlock#422 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
callstackincubator/simlock#420 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
callstackincubator/simlock#350 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature:spec
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
callstackincubator/simlock#412 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/simlock
Issue tương tự
-
ble-needs-fable-review bug mobile priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ColeMurray/background-agents#2305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
esengine/DeepSeek-Reasonix#12355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
oblien/openship#1086 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày