coder / coder/internal

Chosen preset ID is not retained beyond initial workspace build

Abierto
#398 0 comentarios 0 reacciones 0 asignados Ver en GitHub
project/prebuilds
Lenguaje dominante
Sin datos de lenguaje
Estrellas
3
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

In each `workspace_build` entry that is added when a user creates a workspace, their chosen preset ID (if any) is set in the `template_version_preset_id` column.

For all subsequent transitions of that workspace (stop, start, etc), that `template_version_preset_id` column will be `null` because we don't set it explicitly.

Now, this is technically _the truth™ _ because the preset wasn't volitionally chosen by the user, and the parameters are still maintained, so it's fine™. BUT, when we want to show the selected preset for a workspace after one of these transitions (say a workspace is stopped and then started again), we will have no record of which preset ID was chosen last.

An idea would be to add a virtual column on the `workspaces` table which finds the latest workspace build with a non-null `template_version_preset_id` value. This would even work once we allow a user to change their preset after the fact when editing a workspace, since that would be another `workspace_builds` entry with a non-null `template_version_preset_id` field.

This is not a problem right now because preset selection is kind of _fire and forget_ (i.e. it configures the defined params and a user can never see which preset they chose). Once we need to show which preset was chosen and allow it to be changed, such as pre-selected it in the drop-down list of available presets, then we'd need this information.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

No se nombran archivos, pruebas ni puntos de entrada. Primero confirma si ahora es necesario persistir la selección del preset y, después, revisa las transiciones de workspace_build y el esquema de workspaces; se consideraría terminado cuando el último preset seleccionado por el usuario siga disponible después de detener/iniciar y de cambios posteriores.

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

Evaluación

Área
database
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.