CoderWorkspacePool: a dashboard page view marks an unclaimed member Used

オープン
#444 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes
領域
backend

調査の方向性

Check the coder-k8s Go controller that maps workspace last_used_at to pool member Used. Trace Coder's workspace agent stats to find a use signal excluding coderd's own connections (e.g. via GET /api/v2/workspaceagents/<id>/containers). Run the pool on Kind with Coder v2.37.2 and verify a dashboard visit no longer marks an unclaimed member Used.

索引モデルが issue の本文から書いたものです。

説明

Problem

An admin who opens an unclaimed pool member's workspace page in the Coder dashboard marks that member Used=True. The pool then releases the member and builds a replacement. The released workspace keeps running outside the pool until a person deletes the member.

Measured on Kind with Coder v2.37.2 while building #153 plan PR 13 (risk R1 in the plan):

  1. A dashboard visit to /@<owner>/kwp-... moved last_used_at at the next usage flush, and the member became Used about 15 s later.
  2. A member that nobody visited kept its create value for 2.5 minutes. The filtered workspaces list page did not move it.
  3. Without a browser, one GET /api/v2/workspaceagents/<id>/containers with the operator token moved last_used_at of a fresh member at the next flush.

Likely mechanism (not verified in Coder source): coderd connects to the agent to list containers, the agent reports that connection in its stats, and the legacy stats path counts any connection as use.

Impact

No data loss. Each false Used costs one running workspace until an admin deletes the member. CI is not affected.

Options

  1. Find a Coder use signal that ignores agent connections made by coderd itself (for example connection type or source in workspace agent stats), and use it for Used.
  2. Ask upstream for such a signal if none exists.

PR 13 documents the behavior in the pool how-to. Refs #153.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要言語
Go
スター
5
フォーク
3
平均マージ
1時間 50分
マージ済み PR(30日)
160

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/coder-k8s のほかの issue

coder/coder-k8s の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。