Dashboard order form: a dropdown set to None gets its default option back after a YAML round trip
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
The issue identifies DynamicOptionsWidget, its useRef state, and the order page's formContext; start by tracing how the form switches between YAML and Form tabs and how Retry and tenant changes reset context. Follow the existing default resolution for the storageclass option source. Done when a user-selected empty value survives the round trip and Deploy sends "", while an unresolved server default still selects the cluster default.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
On the application order page with installation defaults (#5107), a dynamic dropdown (x-cozystack-options) set to None is written as "", which should win over the installation default. After switching to the YAML tab and back to the form, the dropdown shows its default option again and Deploy stores that option instead of "". Same happens to "" written in the YAML tab.
Environment
- Cozystack: main (since #5107)
- Dashboard order page in
defaulting="server"mode
To Reproduce
- Set
applicationDefaultswith astorageClassfor an application that uses thestorageclassoption source. - Open its order page, the preview fills
storageClassfrom the defaults. - Pick None in the dropdown, the YAML tab shows
storageClass: ''. - Go back to the Form tab.
Expected behaviour
Dropdown stays empty and Deploy sends storageClass: "".
Actual behaviour
Dropdown shows the option marked default (cluster default StorageClass) and Deploy sends its name.
Additional context
DynamicOptionsWidget keeps "already auto-defaulted" in a useRef, so the remount on editor switch resets it. In server mode it selects the default item for "" on purpose: dry-run returns chart defaults like storageClass: "" and the form should show the cluster default class. The widget can't tell that "" from one the user chose, so the fix needs the order page to remember which fields were already resolved (through formContext, reset on Retry and tenant switch).
Only the storageclass source marks a default item today, and "" resolves to the same class at create time, so the difference is the stored value (local instead of ""), which keeps the application on that class if the cluster default changes later.
- Lingua principale
- Go
- Stelle
- 2.2k
- Fork
- 209
- Merge medio
- 4g 14h
- PR unite (30g)
- 140
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 cozystack/cozystack
-
triage/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cozystack/cozystack#5464 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
test(kubernetes-nodes): stop hand-typing the default Talos version in tests that are not about itApertaarea/testing kind/cleanup triage/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
cozystack/cozystack#5456 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
area/testing kind/cleanup triage/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
cozystack/cozystack#5447 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
area/kubernetes kind/bug triage/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cozystack/cozystack#5445 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
kind/bug triage/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
cozystack/cozystack#5438 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di cozystack/cozystack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Correct local module testing instructions for Go sample contributorsForse già presa @slievrly l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Forse già presa @pacwestnobody l’ha presa oggi. Apertago good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Podiom/Podiom#427 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno