CoderWorkspacePool: a dashboard page view marks an unclaimed member Used

Aberta
#444 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go, kubernetes
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Go
Estrelas
5
Forks
3
Merge médio
1h 50min
PRs com merge (30d)
160

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de coder/coder-k8s

Todas as issues de coder/coder-k8s

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.