zbchi opened a new pull request, #3185:
URL: https://github.com/apache/dubbo-go/pull/3185
### Description
Fixes #3181
Polaris 路由失效,原因是通过 context 传递的 attachments 没有被正确读取到 invocation 中。
在调用链中:
1. 用户通过 context.WithValue() 设置路由所需的元数据
2. 从 context 中提取这些 attachments发生在路由选择之后
### Solution
修改 generateInvocation 函数签名,增加 ctx context.Context 参数
在生成invocation时从 ctx.Value(constant.AttachmentKey) 提取用户设置的 attachments
### Checklist
- [x] I confirm the target branch is `develop`
- [x] Code has passed local testing
- [x] I have added tests that prove my fix is effective or that my feature
works
--
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]