AlexStocks commented on code in PR #1158:
URL: https://github.com/apache/dubbo-go-samples/pull/1158#discussion_r4562012826
##########
go.mod:
##########
@@ -2,23 +2,26 @@ module github.com/apache/dubbo-go-samples
go 1.25.0
+// Temporary pin for apache/dubbo-go#3791; replace with the upstream version
after merge.
+replace dubbo.apache.org/dubbo-go/v3 => github.com/dodjdnh/dubbo-go/v3
v3.0.0-20261112014637-221c96e2271e
+
require (
dubbo.apache.org/dubbo-go/v3 v3.3.3-0.20261027084029-a1aa788a3007
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/alibaba/sentinel-golang v1.0.4
github.com/apache/dubbo-go-extensions v0.0.0-20260312085545-de428af0b99e
github.com/apache/dubbo-go-hessian2 v1.13.2
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5
- github.com/dubbogo/gost v1.14.5
+ github.com/dubbogo/gost v1.15.0
github.com/gin-contrib/sessions v1.0.2
github.com/gin-gonic/gin v1.10.0
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
github.com/joho/godotenv v1.3.0
- github.com/nacos-group/nacos-sdk-go/v2 v2.2.5
+ github.com/nacos-group/nacos-sdk-go/v2 v2.3.5
github.com/ollama/ollama v0.10.0
github.com/pkg/errors v0.9.1
- github.com/prometheus/client_golang v1.19.1
+ github.com/prometheus/client_golang v1.21.1
Review Comment:
[P2] prometheus 客户端整族升级与本 PR 目标无关,且非依赖解析所需
当前 go.mod 在引入 fork pin 的同时把 `github.com/prometheus/client_golang` 从 1.19.1
提到 1.21.1,并连带 `client_model` 0.5.0→0.6.2、`common` 0.48.0→0.63.0、`procfs`
0.12.0→0.16.0,以及新增 `klauspost/compress`。这一族升级不是 MVS 解析的结果,而是手工指定 1.21.1 带出来的。
证据:
- 被 replace 的 fork `dodjdnh/dubbo-go@221c96e2` 的 go.mod 要求 `client_golang
v1.19.1`;`dubbogo/gost v1.15.0` 与 `nacos-group/nacos-sdk-go/v2 v2.3.5` 均只要求
`v1.12.2`。三者取最大值仍是 1.19.1,即只升 gost / nacos 不会把 prometheus 顶到 1.21.1。
- base 的 prometheus 族版本(client_model 0.5.0 / common 0.48.0 / procfs 0.12.0)与
`client_golang v1.19.1` 自身 go.mod 的要求逐项一致;head 的 0.6.2 / 0.63.0 / 0.16.0 与
`v1.21.1` 的要求(0.6.1 / 0.62.0 / 0.15.1)同向,并同步出现 1.21.1 才引入的 `klauspost/compress`。
影响:本仓库根模块只有一个 go.mod,`observability/prometheus_grafana` 的 client / server
也直接 import 该库(用到 `NewGauge` / `GaugeOpts` / `MustRegister`,1.21.1
下仍兼容,故不是破坏性变更);实际代价是整个根模块的指标客户端版本被动漂移,go.sum 因此增加到 407 行而放大审查面;并且上方 replace
注释写明"合入上游后替换",届时 `go mod tidy` 不会降级仍被 require 的模块,该版本会长期保留。
建议:把 prometheus 族回退到 1.19.1,只保留 gost 1.15.0 与 nacos 2.3.5 这两项 MVS
必需升级;若某处确实依赖 1.21.1 的新 API,请在 PR 正文说明具体用法,或拆成独立 PR 单独评审。
--
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]