-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix proxy manipulation of single payload fields #202
Fix proxy manipulation of single payload fields #202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was originally caused by moving internally from a mutating visitor to a returning visitor in #119 (though it's not the fault of that issue that we didn't have a test for single-payload case
).
@@ -273,6 +273,14 @@ func visitPayloads( | |||
if options.SkipSearchAttributes { continue } | |||
{{end}} | |||
if o == nil { continue } | |||
{{range $record.Payloads -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we then should just remove the case *common.Payload
logic altogether? Or if we want that to work for people passing in payload directly to the visitor, then we should probably just make case *common.Payload
work (i.e. replace the data and metadata fields of the visitPayload
result). And if that's the case, you don't need these other changes I assume.
So I say either 1) keep your logic and remove the case *common.Payload
and document to users that this doesn't work when you pass in Payload
directly, or 2) fix case *common.Payload
and remove this new stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, we can remove the *common.Payload
case. Let's just do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. I would like to request that we update the VisitPayloads
Godoc to mention that directly visiting *common.Payload
does not work, but that is non-blocking (this is kinda a compat break too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me do this in a follow up PR since this is blocking a release and I won't have time to do it otherwise.
6926d41
to
be23dd9
Compare
## What was changed Updates SDK and Server dependencies. ## Why? Triaging a bug observed internally using a grpc-proxy with workflows that use a Nexus Operation. I wanted to reproduce with purely OSS sample code, which required updating dependencies to get the Nexus workflowservice methods. Note that there's a bug in the proxy that doesn't handle single Payload fields properly that will be fixed in temporalio/api-go#202. ## Checklist 1. How was this tested: Running both `grpc-proxy` and `nexus` samples. I didn't test the OIDC path, however. --------- Co-authored-by: Roey Berman <roey.berman@gmail.com>
@@ -273,6 +273,14 @@ func visitPayloads( | |||
if options.SkipSearchAttributes { continue } | |||
{{end}} | |||
if o == nil { continue } | |||
{{range $record.Payloads -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. I would like to request that we update the VisitPayloads
Godoc to mention that directly visiting *common.Payload
does not work, but that is non-blocking (this is kinda a compat break too)
What changed?
Fixed a bug where the proxy visited single payload fields but didn't actually set the converted result on the parent object.