AlexStocks commented on code in PR #995:
URL: https://github.com/apache/dubbo-go-pixiu/pull/995#discussion_r3563657984
##########
admin/core/server.go:
##########
@@ -48,9 +48,13 @@ type server interface {
}
// RunServer start server
-func RunServer() {
+func RunServer() error {
// load config
- global.VP = Viper()
+ vp, err := Viper()
Review Comment:
[P1] CLI 的 `--config/-c` 写入 `cmd/admin.configPath`,但新的错误传播链仍然调用无参数
`Viper()`,没有把该路径传入;`Viper()` 会继续走自己的默认/stdlib flag 逻辑。结果是用户显式指定的 Admin
配置文件仍可能被忽略。请把 `configPath` 通过 `Start(configPath) → RunServer(configPath) →
Viper(configPath)` 明确传递,并增加非默认路径测试。
##########
admin/core/server.go:
##########
@@ -83,4 +87,5 @@ func RunServer() {
})
wg.Wait()
+ return nil
Review Comment:
[P0] 新增的 `error` 返回实际上无法传播 HTTP/xDS 启动失败:两个 worker 在 `ListenAndServe` 或
`StartxDsServer` 出错时都只记录日志并正常返回,`wg.Wait()` 结束后这里固定返回 `nil`。因此端口占用、xDS snapshot
初始化失败等场景下,`cmd/admin` 的 `errCh` 仍会报告成功或继续等待,进程形成假健康状态。worker
必须把首个非预期错误发送到协调通道并触发其余服务关闭,`RunServer` 再将该错误返回 CLI;同时补充端口绑定失败和 xDS 初始化失败测试。
--
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]