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 đang làm issue này rồi.
Từ ngày 22/9/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
- 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.
- Ngôn ngữ chính
- Python
- Star
- 576
- Fork
- 29
- Merge trung bình
- 51 phút
- Pull request đã merge (30 ngày)
- 14
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/openserverless
-
help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
apache/openserverless#252 ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
apache/openserverless#215 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
apache/openserverless#214 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 72/100
apache/openserverless#213 ·
-
Add Keycloak as a SSO service Đang mởhelp wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
apache/openserverless#195 ·
Tất cả issue của apache/openserverless
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·