We were updating temporal version SDK from 0.27 to 0.29 but had issues with arguments passed to activities. Seems that passing pointers of proto messages with enums is not able to encode / decode.
We’ve created a Converter to use protojson and seems to be working for now. Couldn’t find any issues on github about this. If protojson support will be added, please inform the ticket so we can revert to the default DataConvert again.
Hi Pedro.
First of all, we don’t use github.com/golang/protobuf/jsonpb and if you follow “go to declaration” links in Go SDK you will see that github.com/gogo/protobuf/jsonpb is actually used as all our go wrappers for proto are generated using gogo. I did some performance comparison and according to it and overall convenience that gogo provides we don’t plan to switch to google version of protobuf in near future.
I also added unit test to test how enums are serialized inside proto objects. They are passed and enums seems to work fine.
My guess would be that you use google/progobuf library to generate your go proto objects and they can’t be serialized with our gogo based serializer. Can you confirm this?
I have some update on this. After exploring different approaches I came up with solution which supports both gogo and standard google serializer. This PR adds support for the structs generated with standard google plugin v1.4.0 and above (including new APIv2). It should be supported for both JSON and proto serialization without any configurations on user side.
Why not use latest? But I think it is not related. What are the values of package.Status? This error comes from protojson.Unmarshal and it means that JSON can’t be deserialized back to struct.