Validate mirth.properties at startup and refuse to run on any invalid value
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
Start from Mirth.run() and how mirth.properties (plus conf/mirth.properties.d drop-ins from #405) is loaded and read ad-hoc (getInt, Boolean.parseBoolean, testPort). There is no central key/type/constraint registry yet; that schema and a fail-closed startup pass (plus a -t-style check mode) are the work. Done means any invalid value names the property and reason and the process never starts. This is design, not a first-timer patch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
mirth.properties values are read ad-hoc across the codebase with inline defaults, and validation is inconsistent: some settings fail fast, some crash, some silently coerce. On adjacent lines of Mirth.run(), http.port = banana throws an uncaught ConversionException via isUsingHttp()'s default-less getInt and the server thread dies with a stack trace, while https.port = banana right next to it refuses to start cleanly with "port is invalid" (testPort). Booleans coerce to false (Boolean.parseBoolean), https.*.protocols passes through unvalidated, while a few settings do have ad-hoc guards (the DH key-size clamp, password requirements). Same class of mistake, different outcomes.
Target the model nginx (nginx -t), Apache (configtest), haproxy (-c), and sshd (-t) use: one validation pass over the whole merged config (base + conf/mirth.properties.d drop-ins, #405) at startup, refuse to run on any invalid value, with a clear message naming the property and the reason. Never start on a config that doesn't fully parse.
Why this is architectural, not a patch:
- No config schema exists. nginx validates everything because its parser is the schema; every directive has a known type and constraints.
mirth.propertieshas no central registry of valid key -> type -> constraints -> required. Step one is building that registry. - Validate the merged config against the registry at startup; fail closed with a per-property message on any type/range/enum violation.
- Mistyped keys can't be caught the way nginx catches an unknown directive:
htp.port = 8080silently leaveshttp.portat its default. The registry would need to flag unknown keys (warn or fail) - a design call. - Offer a check mode (
-t-style "validate and exit") so operators can test before a restart.
Context: came up during #405, which added fail-closed handling for unreadable/malformed drop-in files. This covers invalid values in readable files.
- Ngôn ngữ chính
- Java
- Star
- 227
- Fork
- 81
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc 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 OpenIntegrationEngine/engine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenIntegrationEngine/engine#485 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
OpenIntegrationEngine/engine#478 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenIntegrationEngine/engine#355 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenIntegrationEngine/engine#347 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Fix call-home in test runĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
OpenIntegrationEngine/engine#313 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của OpenIntegrationEngine/engine
Issue tương tự
-
status: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
spring-projects/spring-ai#7206 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area/cli
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
quarkusio/quarkus#57623 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jhipster/prettier-java#1113 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug follow-up lane:backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Sanne/incus-spawn#1576 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pasting code into a comment adds imports for the pasted codeCó thể đã có người làm @ravnskjaer đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
eclipse-jdt/eclipse.jdt.ui#3275 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày