Version parsing not supporting semver pre-release tag for suspend/resume system
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
Línea de trabajo
Comienza en MyLabController.suspendOrResume(), donde se analiza el campo chart de helm list, e inspecciona HelmInstallService.installChart() para comprobar la validación de SemVer. Sigue cómo se obtienen el nombre y la versión del chart y, después, verifica que suspend y resume pasen la versión pre-release completa, como 0.1.0-abc1234, al comando de actualización de Helm.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Scope
https://github.com/InseeFrLab/onyxia-api
Describe the bug
Suspend/Resume on a user service fails with IllegalArgumentException: Invalid release version ... must be a SemVer 2 string when the Helm chart version contains a hyphen (e.g. a SemVer pre-release tag).
To Reproduce
- Install a service whose chart version contains a hyphen, e.g.
0.1.0-abc1234. - Call
POST /my-lab/app/suspendor/my-lab/app/resumewith the service ID. - API returns 500 with
Invalid release version abc1234, must be a SemVer 2 string.
Root cause
MyLabController.suspendOrResume() extracts the chart version by splitting the chart field from helm list on lastIndexOf('-'):
String chart = userService.getChart(); // "chartname-1.2.3-prerelease"
int split = chart.lastIndexOf('-');
String chartName = chart.substring(0, split); // "chartname-1.2.3" ← wrong
String version = chart.substring(split + 1); // "prerelease" ← wrong
If the version itself contains a hyphen (valid SemVer 2.0 pre-release), the split grabs only the part after the last hyphen, which lacks MAJOR.MINOR.PATCH and fails the strict SemVer regex in HelmInstallService.installChart().
Expected behavior
The full SemVer version (pre-release tag included) should be passed to the Helm upgrade command. A workaround on the client side is to never use hyphens in chart versions, but the API should handle this correctly.
Suggested fix
Replace lastIndexOf('-') with a more robust parsing approach. The chart name is known from the catalog metadata or the Onyxia secret — it shouldn't need to be re-extracted from the helm list chart field. Alternatively, use indexOf('-') and validate against known chart names.
Environment
- onyxia-api v4.11.0
- Charts with versions using SemVer pre-release tags (e.g.
MAJOR.MINOR.PATCH-prerelease)
This comment was generated by pi-agent.
- Lenguaje dominante
- Java
- Estrellas
- 34
- Forks
- 34
- Merge medio
- 9 min
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 InseeFrLab/onyxia-api
-
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
InseeFrLab/onyxia-api#689 ·
-
Security : run helm installs / upgrades / uninstalls as a service account local to the target namespacePosiblemente ocupada @olevitt la tomó hace 10 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
InseeFrLab/onyxia-api#688 ·
-
helmwrapper issue with rootless env : try to create /.cacheQuizá libre de nuevo @olevitt la tomó hace 344 días y no hay ningún pull request abierto. Abierto
InseeFrLab/onyxia-api#638 · 5 comentarios · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
InseeFrLab/onyxia-api#612 · 3 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
InseeFrLab/onyxia-api#586 · 1 comentario ·
Todos los issues de InseeFrLab/onyxia-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hookAbiertofollow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Sanne/incus-spawn#1953 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Shweit/EtherealPortals#30 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
checkstyle/checkstyle#22398 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Typo in jakartaee-bom 12.0.0-SNAPSHOT with cdiPosiblemente ocupada @ElectLive la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
jakartaee/jakartaee-api#205 · 1 comentario ·