🤖 bug: a rolled-back Coder creation leaves its provisioning session (and a retry can reuse an expired token)
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
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Trace the rollback path from WorkspaceService.abortUnsanitizedCreation and compare it with CoderSSHRuntime.finalizeConfig, postCreateSetup, and the existing validateBeforePersist disposal. Confirm how provisioningSessions are keyed and aged, then verify that a rollback disposes the session and that a later retry cannot reuse an expired token.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
A new-mode Coder creation (coder.existingWorkspace unset) creates a provisioning session in CoderSSHRuntime.finalizeConfig (coderService.ensureProvisioningSession(workspaceName), which runs coder tokens create --lifetime 5m). The session is consumed only by postCreateSetup (takeProvisioningSession), which runs in init after registration. When the creation rolls back before init (for example, the registration write rejects, #4745), nothing disposes it:
- The session stays in
CoderService.provisioningSessionsfor the process lifetime, and the token stays on the Coder deployment until it expires (5 min). - A retry with the same Coder workspace name gets the stale session back:
ensureProvisioningSessionreturns an existing entry without checking its age, so a retry more than 5 minutes later may hand an expired token tocoderService.createWorkspace.
validateBeforePersist already disposes the session when it refuses (disposeProvisioningSession); the registration rollback in WorkspaceService.abortUnsanitizedCreation does not.
Proposal
Dispose the provisioning session when a new-mode Coder creation rolls back before init (a runtime hook the rollback can call), and/or have ensureProvisioningSession replace a session older than its token lifetime.
Found while closing #4775 item 2 (SSH, Docker and Coder creations otherwise provision nothing before init). Pre-existing.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.1k
- Forks
- 139
- Merge medio
- 3 h 35 min
- PR fusionados (30 d)
- 950
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de coder/xum
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
coder/xum#7733 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Open-Earth-Foundation/CityCatalyst#3399 ·
Los mantenedores suelen responder en 2 días
-
userReport
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
nkprasad12/morcus-net#631 ·
Los mantenedores suelen responder en 1 día
-
fix(app): fail closed if GetGeneralSetting fails during initializationPosiblemente ocupada @kalavt la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
nekko-labs/nekko-agent#1756 ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días