CoderWorkspacePool: a dashboard page view marks an unclaimed member Used

Abierto
#444 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kubernetes
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
5
Forks
3
Merge medio
1 h 50 min
PR fusionados (30 d)
160

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/coder-k8s

Todos los issues de coder/coder-k8s

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.