Version parsing not supporting semver pre-release tag for suspend/resume system
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
Direzione di ricerca
Inizia da MyLabController.suspendOrResume(), dove viene analizzato il campo chart di helm list, e ispeziona HelmInstallService.installChart() per la convalida SemVer. Traccia come vengono ottenuti il nome e la versione del chart, quindi verifica che suspend e resume passino la versione pre-release completa, ad esempio 0.1.0-abc1234, al comando di upgrade di Helm.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 34
- Fork
- 34
- Merge medio
- 9m
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InseeFrLab/onyxia-api
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
InseeFrLab/onyxia-api#689 ·
-
Security : run helm installs / upgrades / uninstalls as a service account local to the target namespaceForse già presa @olevitt l’ha presa 10 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
InseeFrLab/onyxia-api#688 ·
-
helmwrapper issue with rootless env : try to create /.cacheForse di nuovo libera @olevitt l’ha presa 344 giorni fa e non c’è nessuna pull request aperta. Aperta
InseeFrLab/onyxia-api#638 · 5 commenti · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
InseeFrLab/onyxia-api#612 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
InseeFrLab/onyxia-api#586 · 1 commento ·
Tutte le issue di InseeFrLab/onyxia-api
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
liberation-data/drivine4j#547 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itForse già presa @AkashB23 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
spring-cloud/spring-cloud-stream#3321 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Forse già presa @fishdry1000 l’ha presa 4 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-fuzzing bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linagora/twake-calendar-side-service#1333 ·
I maintainer di solito rispondono entro 1 giorno