CoderWorkspacePoolMember: recognize a template-wide last_used_at write in a one-member pool
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
- 30/100
Hướng nghiên cứu
Start from the CoderWorkspacePoolMember logic that compares a workspace's last_used_at with the template's updated_at within a 5 s window, and from the 60 s poll that decides whether a member is Used. Reproduce the case where a template schedule update runs, the template changes again before the next poll, and the pool has one member. Done when that member is no longer marked Used and the single-member and multi-member witness paths are both covered by tests. The suggested fix adds one list call, only when the template time does not match.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A CoderWorkspacePoolMember treats a later last_used_at as use, except for a template-wide write. It recognizes a template-wide write in two ways: the value is within 5 s of the template's updated_at, or another unclaimed member of the pool already moved its baseline to the same value.
When a template schedule update with update_workspace_last_used_at runs, and the template changes again before the next 60 s poll, and no other member of the pool saw the first write (for example a one-member pool), the member marks itself Used. The pool releases it, and one warm workspace leaks.
This is the fail-safe direction: the controller never deletes a workspace that someone may use. But it costs one workspace per affected member.
Possible fix
Also accept as a witness any other workspace of the template in Coder with the same last_used_at (one list call, only when the template time does not match).
Trigger
Before the PR 12 activation docs of #153, or a user report.
Found by Codex on #343 (comment 4268119093).
Refs #153
Found in review of #343 (thread 4268119093); the plan resolves the ambiguity toward Used, which can leak one warm workspace but never deletes possible work.
Refs #153
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium
- Ngôn ngữ chính
- Go
- Star
- 5
- Fork
- 3
- Merge trung bình
- 2 giờ 37 phút
- Pull request đã merge (30 ngày)
- 186
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
-
CoderWorkspacePoolMember checkCreate: trust only Coder's own 404 on the name lookup (before PR 12)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)Đang mở
Độ khó 2/5 1-3 giờ 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
-
CoderMCPServer Kind E2E follow-upsCó thể đã có người làm @ThomasK33 đã nhận 9 ngày trước. Đang mở
coder/coder-k8s#390 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CoderMCPServer delete and RBAC test follow-upsCó thể đã có người làm @ThomasK33 đã nhận 9 ngày trước. Đang mở
coder/coder-k8s#378 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ownership proof for Coder IDs recorded in controller status (D11 B)Có thể đã có người làm @ThomasK33 đã nhận 9 ngày trước. Đang mở
coder/coder-k8s#372 · 1 người được giao ·
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ự
-
compress: block buffers get re-zeroed on every call, and the zeroing is immediately overwrittenĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/ch-go#1218 ·
Maintainer thường phản hồi trong vòng 13 ngày
-
automation models
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Make --data-dir a required flagĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/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 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
podman-container-tools/podman#30031 ·
Maintainer thường phản hồi trong vòng 1 ngày