xxs588 commented on PR #3400:
URL: https://github.com/apache/dubbo-go/pull/3400#issuecomment-4681224618
对不起喵,刚刚是我这边的问题,我重新试了几次
在 PR #3400 分支上验证,tag routing 端到端可用。
### 测试环境
- dubbo-go: PR #3400 (fix/tag-metadata-propagation)
- dubbo-go-samples: 最新 main + sample 代码修复(CheckItem 语义 + v2 灰度标签)
- 注册中心: Zookeeper v3.9.4
- 协议: Triple
### 关键条件
所有服务(包括 v1)必须使用 PR #3400 的代码构建,否则 `application.tag → dubbo.tag` 传播链路不完整。
### 测试结果
| 场景 | 预期 | 实际(5次) | 状态 |
|---|---|---|---|
| `/login`(不带 gray tag) | 只命中 v1 | 全部 `detail v1` | ✅ |
| `/grayLogin`(带 `dubbo.tag=gray` + `force=true`) | 只命中 v2 | 全部 `detail
v2` | ✅ |
| `/timeoutLogin` | 超时提示 | 200 | ✅ |
| `/order` | 下单成功 | 200 | ✅ |
| `/userinfo` | 用户信息 | 200 | ✅ |
### 验证的传播链路
Provider: dubbo.WithTag("gray") → application.tag=gray →
MetadataInfo.Tag=gray → ZK storage
Consumer: ZK read → instance.Tag=gray → ToURLs() → dubbo.tag=gray → Tag
Router 匹配成功
PR #3400 修复了:
- `MetadataInfo.Tag` 添加 json/hessian 序列化 tag
- `AddService()` fallback 读取 `application.tag`
- `convertMetadataInfoV2()` 映射 Tag 字段
- `MetadataServiceV2.GetMetadataInfo()` 返回 Tag
--
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]