Fix mislabeled "system payload" issue - #11906
Merged
Merged
Conversation
Contributor
Contributor
Author
|
My BRILLIANT RELIANCE on Cunningham's Law was successful. Instead, I'll greatly scale this PR back to just:
That closes the gap, and ensures we don't run into some weird case like this in the future. |
chrsmith
commented
Sep 2, 2026
chrsmith
commented
Sep 2, 2026
chrsmith
force-pushed
the
chrsmith/fix-system-payload-issue
branch
from
September 2, 2026 21:19
661a2d2 to
7783081
Compare
chrsmith
force-pushed
the
chrsmith/fix-system-payload-issue
branch
from
September 2, 2026 21:33
7783081 to
58454af
Compare
bergundy
reviewed
Sep 2, 2026
Contributor
Author
|
@bergundy PTAL |
bergundy
approved these changes
Sep 2, 2026
bergundy
left a comment
Member
There was a problem hiding this comment.
Still would rather use an assertion that would log or panic over just returning plain errors but I would be okay approving this as is.
chrsmith
force-pushed
the
chrsmith/fix-system-payload-issue
branch
from
September 3, 2026 19:32
b03dbe3 to
c3d12ed
Compare
yiminc
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The Temporal server was labeling everything that came through the History Service's
StartNexusOperationas a system payload. (#10948) However, when we landed support for visiting nested payloads in the Golang SDK (temporalio/api-go#297) it asserts that all system payloads have BOTH a"encoding":"binary/protobuf"AND"messageType"metadata key.That's a problem.
Now, if the Temporal server were to pick up the latest
api-gobits, it will introduce test failures. Because we have tests that return payloads encoded withplain/jsonthat will fail when ran through the SDK's payload visitor at runtime.What changed?
This PR makes the requirements surrounding a system payload clearer, and ONLY flags a System Nexus Endpoint payload as a "system payload" IFF if is a properly labeled protobuf message. Otherwise, it doesn't set the system payload tag at all.This PR now adds a check that the payload sent to the System Nexus Endpoint is a protobuf with message type available. It also updates a testcase that was sending
plain/jsonresponses to the SNE and added a new testcase.How did you test it?
Potential risks
We've already shipped code that includes the "label non-Protobuf payloads as system payloads". So it's possible that we've persisted those somewhere, and updating the
api-godependency (unless patched there) would cause problems.