coinbase / coinbase/temporal-ruby
Decoding protobufs when a new field comes in breaks
- Dominant language
- Ruby
- Stars
- 287
- Forks
- 113
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 1
Description
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: https://github.com/coinbase/temporal-ruby/blob/3fbc675fbe24bce236fba2376910fd5dc9a9ff5f/lib/temporal/connection/converter/payload/proto_json.rb#L18
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.
Contributor guide
Assessment
This issue has not been assessed yet.