CoderWorkspacePoolMember: recognize a template-wide last_used_at write in a one-member pool
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 5
- フォーク
- 3
- 平均マージ
- 3時間
- マージ済み PR(30日)
- 192
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/coder-k8s のほかの issue
-
CoderWorkspacePoolMember checkCreate: trust only Coder's own 404 on the name lookup (before PR 12)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
CoderMCPServer Kind E2E follow-ups対応中かも @ThomasK33 が 8 日前に担当しました。 オープン
coder/coder-k8s#390 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CoderMCPServer delete and RBAC test follow-ups対応中かも @ThomasK33 が 8 日前に担当しました。 オープン
coder/coder-k8s#378 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Ownership proof for Coder IDs recorded in controller status (D11 B)対応中かも @ThomasK33 が 8 日前に担当しました。 オープン
coder/coder-k8s#372 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
coder/coder-k8s の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
praetorianer777/Dynamo#53 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
kind/engineering pulumi/pulumi-terraform Task Workflow Failure
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
pulumi/pulumi-terraform#1261 ·
メンテナーはふだん 1 日以内に返信
-
Controllers integration tests fail when port 8080 is in use対応中かも @noahnut が今日担当しました。 オープンarea/cluster-autoscaler kind/bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kubernetes-sigs/cluster-autoscaler#236 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信