Is your feature request related to a problem? Please describe.
Users using protobuf messages for workflow inputs want to be able to use protobuf messages as inputs to the workflow gate. json/protobuf is supported by things like the temporal cli and ui, and should also be supported by the worker controller.
Describe the solution you'd like
Add an additional optional field called ProtoMessageType to GateWorkflowConfig (and the WorkerDeployment CRD). When this field is populated alongside an input payload, the client should send the payload as a json/protobuf payload, instead of a json/plain payload, like this
var arg interface{}
if len(wf.input) > 0 {
if wf.protoMessageType != "" {
arg = converter.NewRawValue(&commonpb.Payload{
Metadata: map[string][]byte{
converter.MetadataEncoding: []byte(converter.MetadataEncodingProtoJSON),
converter.MetadataMessageType: []byte(wf.protoMessageType),
},
Data: wf.input,
})
} else {
arg = json.RawMessage(wf.input)
}
}
Additional context
We are happy to help contribute this if we can agree on the shape of the change
Is your feature request related to a problem? Please describe.
Users using protobuf messages for workflow inputs want to be able to use protobuf messages as inputs to the workflow gate. json/protobuf is supported by things like the
temporalcli and ui, and should also be supported by the worker controller.Describe the solution you'd like
Add an additional optional field called
ProtoMessageTypetoGateWorkflowConfig(and the WorkerDeployment CRD). When this field is populated alongside an input payload, the client should send the payload as a json/protobuf payload, instead of a json/plain payload, like thisAdditional context
We are happy to help contribute this if we can agree on the shape of the change