Repository navigation
Conversation
…overy runner Signed-off-by: Kevin <yaojiaangyao@gmail.com>
…ndler Signed-off-by: Kevin <yaojiaangyao@gmail.com>
Signed-off-by: Kevin <yaojiaangyao@gmail.com>
Signed-off-by: Kevin <yaojiaangyao@gmail.com>
…fixture Signed-off-by: Kevin <yaojiaangyao@gmail.com>
| if os.Getenv("RUN_DUBBO_GO_E2E") != "1" { | ||
| t.Skip("set RUN_DUBBO_GO_E2E=1 and start go-v330 Provider") | ||
| } | ||
| // This test intentionally runs sequentially: observation counts require an isolated Provider. |
There was a problem hiding this comment.
[P2] 启用后这套 E2E 在当前依赖上必然失败,文档却写成已验证
go-v330 固定 dubbo-go v3.3.0;PR 描述已实测 Triple $invoke 返回 404,且 delay(1000) 在 timeoutMs=100 时意外成功。本文件仍对 tri 和 timeout 都断言成功(line 51、line 208 起),而 docs/generic-invoke.md 第 16 行写成 “Both layers assert ... Triple ... timeout”。
请对已知不支持的 Triple 和已知失败的 timeout 显式 t.Skip / expected-failure,或等产品修复后再合入;否则 RUN_DUBBO_GO_E2E=1 go test ... 只能红。
| docker rm -f $id | ||
| ``` | ||
|
|
||
| Shell cleanup: stop your Provider process, then `bash testdata/generic-invoke/go-v330/zookeeper.sh stop`. Scripts never start Docker from `go test`. See [the invocation guide](../../../../docs/generic-invoke.md) for L2/L3, authentication and cleanup. |
There was a problem hiding this comment.
[P2] 相对链接多了一层 ..
从 testdata/generic-invoke/go-v330/README.md 出发,../../../../docs/generic-invoke.md 会解析到仓库根之外;正确目标是 ../../../docs/generic-invoke.md。请修正。
…cks by default and fix README link Signed-off-by: Kevin <yaojiaangyao@gmail.com>
|
@AlexStocks Thanks for the review! Both
|
robocanic
left a comment
There was a problem hiding this comment.
总体评价
优点
- 隔离的
go-v330模块固定dubbo-go v3.3.0,不改动生产代码和根go.mod/go.sum,E2E 默认通过RUN_DUBBO_GO_E2E=1跳过,不会影响常规go test。 - 测试覆盖 L2(真实 RPC 传输)与 L3(认证发现)两层,错误 signature 在 RPC 前被拦截并用
/count验证;ZooKeeper 脚本使用容器 ID receipt + label 校验,清理逻辑谨慎。 - PR 描述对 Timeout / Triple / L3 的失败与阻塞如实说明,没有放宽断言伪造通过。
问题
Important(建议修复)
-
Dockerfile 无法构建
- 文件:
testdata/generic-invoke/go-v330/Dockerfile:18 - 问题:
WORKDIR /src后直接执行RUN go mod download,但此前没有COPY go.mod go.sum ./,会报go.mod file not found;COPY main.go ./又在其后,go build -mod=readonly同样缺少go.mod/go.sum。 - 修复:在
go mod download之前先COPY go.mod go.sum ./,再COPY main.go ./。PR 验证中也没有docker build这一项,建议补充验证。
- 文件:
-
discovery.py默认完整流程的 timeout 断言与 PR 自述的已知缺陷冲突,且与 L2 的处理不一致- 文件:
testdata/generic-invoke/go-v330/discovery.py:119-122(delay(1000)+timeoutMs=100后无条件断言InternalError);docs/generic-invoke.md("a 100 ms timeout must fail") - 问题:PR 描述指出
timeoutMs尚未透传,Dubbo 调用在默认 3s 超时内会成功,即 L3 默认流程在 discovery 打通后仍会以timeout observation failed失败。L2 通过RUN_DUBBO_GO_E2E_TIMEOUT默认跳过,L3 却无条件执行,行为不一致;另外仅检查InternalError+ 耗时 < 3s,不能证明请求确实到达 Provider(任何InternalError如连接失败都会通过),与 L2 中 "transport failure cannot pass as timeout" 的严格断言矛盾。 - 修复:为 L3 的 timeout 增加与 L2 相同的开关(如
RUN_DUBBO_GO_E2E_TIMEOUT=1),默认跳过;启用时同样通过/count验证请求到达 Provider。
- 文件:
-
L3 真实发现链路未被验证(BLOCKED),L3 脚本整体处于未经验证状态
- 文件:
testdata/generic-invoke/run-discovery-e2e.sh、testdata/generic-invoke/go-v330/discovery.py:70-77 - 问题:PR 描述中 L3 的
/provider-instances与/methods返回 0,后续所有 L3 断言(含echoNested整数断言、负向用例bad-signature/bad-args/unreachable)从未真实跑通;同时run-discovery-e2e.sh内生成的 Admin 配置字段(discovery/engine/console.auth等)也未得到验证。此外轮询阶段使用success(),一旦发现尚未就绪时接口返回非Success的 code 或 HTTP 错误,会直接抛异常而不是继续重试,与 "polls for up to 90 seconds" 的文档描述不符。 - 修复:先定位并解决发现为 0 的根因(Provider 注册的元数据/应用级实例与 Admin ZooKeeper discovery 期望是否匹配),或在文档与 PR 中明确标注 L3 为未验证/实验性;轮询循环中对
RuntimeError、urllib.error.HTTPError做重试处理。
- 文件:
Critical
- 未发现。
总体结论
可合并?:修复后可合并(With fixes)
测试脚手架思路清晰、对生产代码零侵入,但 Dockerfile 无法构建、L3 脚本的 timeout 断言与已知产品缺陷冲突且 L3 未真正跑通,建议先修复以上 Important 项,避免合入后默认流程即失败。
…iscovery poll retries Signed-off-by: Kevin <yaojiaangyao@gmail.com>
|
|
@robocanic 感谢 review!逐条核对并已在
|



Please provide a description of this PR:
Problem
当前泛化调用缺少针对正式发布版
dubbo-go v3.3.0Provider 的隔离端到端验证脚手架,尚未覆盖独立进程真实 RPC(L2)、带认证的真实注册中心发现(L3)以及可重放的 HTTP 使用指南。Changes
dubbo-go v3.3.0的隔离go-v330Provider 模块(暴露 Dubbo 与 Triple unary 协议的example.GoEchoService,通过反射填充ServiceInfo.Methods,提供字符串/整数/嵌套整数/无参/数组回显、traceId/traceid附件回显、可控延迟与/count请求计数观测端点)及可选的本地 ZooKeeper 启停脚本。RUN_DUBBO_GO_E2E=1控制的service与handler层 L2 Go Provider 测试,复用现有内存测试上下文与路由,覆盖双协议回显、附件透传、错误 signature 在 RPC 前拦截及超时观测;普通go test默认跳过且不启动容器。42)负向自检。go.mod/go.sum,大整数溢出与细粒度业务异常分类以TODO占位,未放宽断言。Verification
2171b21f(upstream/develop)→ Head8aaaab828aaaab82):go vet -mod=readonly ./pkg/console/service ./pkg/console/handler:PASS(退出码0)go test -mod=readonly ./pkg/console/service ./pkg/console/handler:PASS(退出码0,Go E2E 默认跳过)go build -mod=readonly ./...(testdata/generic-invoke/go-v330):PASS(退出码0)bash -n testdata/generic-invoke/run-discovery-e2e.sh/zookeeper.sh:PASS9d2d04e;8aaaab82仅在go-v330/main.go补充ServiceInfo.Methods反射填充,未重跑集群):RUN_DUBBO_GO_E2E=1,service&handler):PASS—echo、echoInt、noArgs、echoArray、attachments、echoNested6 项回显全部通过;错误 signature 在 RPC 前拦截且 Provider/count未增加。delay(1000)+timeoutMs=100):FAIL— 意外返回成功。源码定位:pkg/console/service/service_generic_invoke.go未将req.TimeoutMs透传给 Dubbo Client(URL 始终为默认timeout=3s)。按 [#3792][Task D] 建立隔离的 Go v3.3.0 Provider 真实调用与发现验证 harness 及 HTTP 使用指南 #1633 权限约束不改动生产代码,保留失败并记录为产品缺陷。FAIL(版本不支持)— 返回unimplemented: HTTP status 404 Not Found。源码核实:dubbo-go v3.3.0的protocol/triple/server.go尚未实现$invoke泛化服务端 handler(该能力后续由apache/dubbo-go#3154引入)。BLOCKED— 登录(POST /api/v1/auth/login)返回Success,admin-unreachable负向自检退出码42(PASS),但真实发现/provider-instances与/methods返回0,阻塞后续调用断言;未通过注入资源或放宽断言伪造通过。Related Issues
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.