Task-util-config: it should be possible to set a default value for a parameter that depends on one or more parameters different from current value
@giusdp ci sta già lavorando.
Dal 22/9/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
- Kind of request: RFC of a feature request
Problem
Currently the wizard doesn't allow the developer to specify the default value for a single item based on values of other parameters.
Example 1
The minimum amount of RAM to allocate depends on the chosen services.
- If the final user wants to install only PostgreSQL, then the wizard should suggest a minimum amount of RAM (let's say 16 GB).
- If the final user wants to install only PostgreSQL and MinIO, then the wizard should suggest a different minimum amount of RAM (let's say 22 GB).
Example 2
A string might need to be the concatenation of names previously input.
- If a variable ORGNAME name is specified as "ACME", and another variable CLUSTERNAME is specified as "FINANCE", then the suggested value for a variable NODEPREFIX is "ACME-FINANCE".
The implementation of this feature should affect all the types:
- string
- int
- float
- bool
Impact
100% of users that will install the ops would find much easier to install Open Serverless.
Priority
low
Suggested solution for the example 1:
"POSTGRESENABLED": {
"type": "bool"
},
"MINIOENABLED": {
"type": "bool"
},
"MINRAM": {
"type": "",
"default-function": "calcMinRam"
}
and somewhere else (I show some pseudocode, it might be Typescript):
calcMinRam() {
if (POSTGRESENABLED == True and MINIOENABLED == False {
return 16;
} else if (POSTGRESENABLED == True and MINIOENABLED == True {
return 24;
}
If the function specified in "default-function" doesn't return a suitable value (e.g. NaN), a default value can be considered (see https://github.com/apache/openserverless/issues/61)
With
POSTGRESENABLED not enabled
and
MINIOENABLED not enabled the calcMinRam function wouldn't return a suitable value so the value 14 should be considered (see example below):
"MINRAM": {
"type": "",
"default": "14",
"default-function": "calcMinRam"
}
Alternative solution
The implementation of this feature request might be overly complex.
Alternative solution: an explanation in the label might be enough.
- Lingua principale
- Python
- Stelle
- 576
- Fork
- 29
- Merge medio
- 51m
- PR unite (30g)
- 14
Guida per i contributori
Apri 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 apache/openserverless
-
help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
apache/openserverless#252 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/openserverless#215 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
apache/openserverless#214 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 72/100
apache/openserverless#213 ·
-
help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
apache/openserverless#195 ·
Tutte le issue di apache/openserverless
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·