Tsukikage7 opened a new pull request, #1130: URL: https://github.com/apache/dubbo-go-samples/pull/1130
## 变更说明 修复 `observability/integration` 集成测试中 Prometheus target 偶发检查失败的问题。 ## 问题原因 集成测试原先先等待客户端进程结束,再执行 Prometheus、Jaeger 和 Grafana 语义检查。客户端退出后,客户端的 Prometheus 指标端点 `9098` 也会消失,因此 Prometheus target 状态取决于首次抓取与客户端退出之间的时序,可能偶发出现 target 不健康。 ## 修复方案 - 让可观测性集成客户端持续运行,直到语义检查完成。 - 在客户端仍存活期间轮询并验证 Prometheus target、Prometheus 指标、Jaeger 跨服务 Trace 以及 Grafana 配置。 - 所有断言通过后再停止客户端,避免检查与客户端退出发生竞态。 - 使用临时编译二进制运行客户端,确保停止时可以准确回收实际客户端进程,避免 `go run` 子进程残留。 - 客户端异常退出时立即终止验证并返回失败。 - 测试结束时清理临时二进制和相关资源。 ## 验证 - 连续执行 `observability/integration` 集成测试 5 次,全部通过。 - 每次均通过 Prometheus target、Prometheus 指标、Jaeger 和 Grafana 四项检查。 - 每次测试结束后确认 `9098`、`9099`、`20000` 无残留监听进程。 - `bash -n integrate_test.sh` 通过。 - `git diff --check` 通过。 Fixes #1129 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
