ProtobufJsonPayloadConverter does not work correctly with shaded artifact
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 temporal-sdk/src/main/java/io/temporal/common/converter/ProtobufJsonPayloadConverter.java 中 issue 所述的 MessageOrBuilder 检查开始。使用 StringValue.of("hello") 运行 shaded-artifact 复现,并验证 converter 的 payload 结果。当客户端代码中的 protobuf 值能够被识别,且复现报告 shaded-artifact 中存在 payload 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Expected Behavior
The ProtobufJsonPayloadConverter does not work correctly when using the shaded Temporal artifact, which is sometimes necessary to avoid gRPC version conflicts.
Here, MessageOrBuilder is rewritten in the byte-code to be io.temporal.shaded.com.google.protobuf.MessageOrBuilder, and so passing in a non-shaded value (as certainly client code will be using) fails, and the converter fails to convert the value.
The converter, whether it is shaded or not, should correctly recognize protobuf values coming from client code.
Actual Behavior
Protobuf values coming from client code are ignored, and serialization fails.
Steps to Reproduce the Problem
Using the shaded temporal artifact, run this code:
import com.google.protobuf.StringValue;
import io.temporal.common.converter.ProtobufJsonPayloadConverter;
class Test {
public static void main(String[] args) {
var converter = new ProtobufJsonPayloadConverter();
var msg = StringValue.of("hello");
var payloadOpt = converter.toData(msg);
System.out.println(payloadOpt.isPresent());
}
}
We can see that the payload is not present.
Specifications
- Version: 1.32.1
- Platform: N/A
- 主要语言
- Java
- 星标
- 434
- 派生
- 252
- 平均合并
- 2 天 19 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
temporalio/sdk-java#2676 · 8 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
temporalio/sdk-java#1825 ·
维护者通常 1 天内回复
-
test server
难度 4/5 3-5 天 新手友好度 42/100
temporalio/sdk-java#3088 · 2 条评论 ·
维护者通常 1 天内回复
-
Warn if the SDK tried to send a payload above a specific size - Java可能已有人在做 @jmaeagle99 于 20 天前认领。 未关闭
temporalio/sdk-java#3059 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Allow configurable prefix for MDC keys可能已有人在做 @maciejdudko 于 21 天前认领。 未关闭enhancement
temporalio/sdk-java#3058 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Content
难度 2/5 1-3 小时 新手友好度 68/100
RunestoneInteractive/rs#1559 · 1 条评论 ·
维护者通常 2 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 86/100
inu-appcenter/memorIN-backend#298 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
opendataloader-project/opendataloader-pdf#757 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
redhat-developer/intellij-quarkus#1626 ·