CoderWorkspacePool: use after the last read can still be bound or deleted on a delete retry
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
Hướng nghiên cứu
Read the two threads on PR #404 first, then bindClaims in internal/controller/coderworkspacepool_claim.go and cleanupStep in internal/controller/coderworkspacepoolmember_cleanup.go to see where each check sits relative to the delete/bind boundary. Before writing anything, answer the open question in the issue: does Coder move last_used_at on a failed delete build? A failed-delete test against the member cleanup path is the place to establish that. Done means both paths re-check use at the boundary, existing reconciler tests still pass, and the residual flush-delay window is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Two paths can still hand out or delete a pool workspace that someone used after the member's last read of Coder. Codex found both on #404. Both exist on main and are outside #349, which #404 fixes.
- Bind uses stored status.
bindClaims(internal/controller/coderworkspacepool_claim.go) picks members by their storedReadyandUsedconditions. A member readslast_used_atonce a minute. Use after that read and before the next one is not in status yet, so a new claim can bind the workspace. The resourceVersion precondition cannot see a change in Coder. Thread: https://github.com/coder/coder-k8s/pull/404#discussion_r4424757093 - No use check before a delete retry.
cleanupStep(internal/controller/coderworkspacepoolmember_cleanup.go) runs the last use check only before the first delete build (DeleteBuildID == "" && DeleteAttempts == 0). If that build fails or is canceled and someone uses the workspace during the retry backoff, the retry deletes it. Thread: https://github.com/coder/coder-k8s/pull/404#discussion_r4424757101
Neither path can close the gap fully. Coder records use up to one usage flush (about 60 s) late, and it has no conditional delete or bind. The fixes narrow the window to that flush delay.
Possible fix
- Read the workspace from Coder at the bind boundary and skip a member whose
last_used_atis past itsreadyLastUsedAt. - Run the last use check before every new delete build, not only the first. Check first whether Coder moves
last_used_aton a failed delete build. If it does, every failed delete would release its member (a leak, the fail-safe side).
Trigger
Before #153 PR 12 registers the pool reconcilers.
Owner: maintainer desk.
Refs #153
Refs #404
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh
- Ngôn ngữ chính
- Go
- Star
- 5
- Fork
- 3
- Merge trung bình
- 2 giờ 49 phút
- Pull request đã merge (30 ngày)
- 206
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 coder/coder-k8s
-
CoderWorkspacePool: count bound and used members only when their owner matches the pool's ownerĐang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của coder/coder-k8s
Issue tương tự
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsCó thể đã có người làm @antcybersec đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
projectdiscovery/dsl#372 ·
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 68/100
JuliusBrussee/caveman#1449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openclaw/gogcli#1291 · 1 bình luận · 1 reaction ·
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 72/100
apache/arrow-swift#209 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(instrumentation/kafka-go): producer hook writes trace headers into the caller's messagesCó thể đã có người làm @Aryanbhargava18 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
open-telemetry/opentelemetry-go-compile-instrumentation#1669 ·
Maintainer thường phản hồi trong vòng 2 ngày