Skip to content

Decoding protobufs when a new field comes in breaks #303

Open
@bobbytables

Description

@bobbytables

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions