Improve logs, handling and parsing of Helm install erros
评估
调研方向
从 helm-wrapper/src/main/java/io/github/inseefrlab/helmwrapper/utils/Command.java 的第 27 行开始,跟踪 helm install 的 stderr 是如何处理的,以及失败是如何到达 API logger 的。完成的标准是:真实的 Helm 错误会在正常的结构化日志流程中被捕获,而不是直接重定向到 System.err,同时通用异常输出不再是唯一有用的诊断信息。
由索引模型根据 Issue 内容生成。
描述
Currently, if the helm install fails for some reason (e.g syntax errors on generated manifests) then Onyxia-API logs a "generic" error with the Java stacktrace that contains almost no real info :
[onyxia-api-8b8497478-wdm5l] {"@timestamp":"2024-12-12T13:41:13.583714227Z","@version":"1","message":"Servlet.service() for servlet [dispatcherServlet] in context with path [\/api] threw exception","logger_name":"org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[\/api].[dispatcherServlet]","thread_name":"http-nio-8080-exec-3","level":"ERROR","level_value":40000,"stack_trace":"com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATIONdisabled); line: 1]\n\tat com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:5008)\n\tat ...
[TRIMMED FOR CLARITY]"}
and in a separate message the real helm error as emitted by the helm process :
[onyxia-api-8b8497478-wdm5l] Error: YAML parse error on argo-workflows/templates/networkpolicy-ingress.yaml: error converting YAML to JSON: yaml: line 10: did not find expected '-' indicator
This one is much more relevant and is currently redirected directly to System.err (see https://github.com/InseeFrLab/onyxia-api/blob/715cda25520e83a6e79308c0cefe837e1b1d8698/helm-wrapper/src/main/java/io/github/inseefrlab/helmwrapper/utils/Command.java#L27)
which is not properly integrated with the rest of logging system (e.g it does not use json structuring)
We should catch the real error instead of redirecting it to System.err
- 主要语言
- Java
- 星标
- 34
- 派生
- 34
- 平均合并
- 9 分钟
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
InseeFrLab/onyxia-api 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 43/100
InseeFrLab/onyxia-api#689 ·
-
Security : run helm installs / upgrades / uninstalls as a service account local to the target namespace可能已有人在做 @olevitt 于 10 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
InseeFrLab/onyxia-api#688 ·
-
难度 3/5 1-2 天 新手友好度 74/100
InseeFrLab/onyxia-api#669 ·
-
helmwrapper issue with rootless env : try to create /.cache可能重新可做 @olevitt 于 344 天前认领,目前没有进行中的 PR。 未关闭
InseeFrLab/onyxia-api#638 · 5 条评论 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 38/100
InseeFrLab/onyxia-api#612 · 3 条评论 ·
查看 InseeFrLab/onyxia-api 的全部 Issue
相似的 Issue
-
难度 2/5 1 小时以内 新手友好度 70/100
Vakore/ZappierGames#248 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
thelastpickle/cassandra-reaper#1748 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hook未关闭follow-up
难度 2/5 1-3 小时 新手友好度 62/100
Sanne/incus-spawn#1953 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
OneBusAway/maglev#1917 · 1 条评论 ·
维护者通常 3 天内回复