Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding protobufs when a new field comes in breaks #303

Open
bobbytables opened this issue Jun 20, 2024 · 0 comments
Open

Decoding protobufs when a new field comes in breaks #303

bobbytables opened this issue Jun 20, 2024 · 0 comments

Comments

@bobbytables
Copy link

There's a bug when an upstream service adds a new protocol buffer field and sends it along to a Ruby temporal worker. For example, we have a service written in Go that has an update protocol buffer message that is being serialized. The activity that executes with the message as an input is written in Ruby. The error is:

Google::Protobuf::ParseError: Error occurred during parsing: Error parsing JSON @1:845: No such field: newField

The offending line is here:

descriptor.msgclass.decode_json(payload.data)

Honestly, I don't know if this is the responsibility of this library or from Google protobufs. In Go, you can explicitly say ignore unknown fields, however Ruby does not seem to have this behavior. So I'm not sure what to do or if anyone has any exceptions. Protobufs should be compatible with deserializing into messages it doesn't know about new fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant