Propagate memo on continue-as-new in the test server#2943
Open
aditya-786 wants to merge 2 commits into
Open
Conversation
The in-memory test server carried over search attributes and header on continue-as-new but dropped the memo, so a workflow that sets a memo on continue-as-new could not read it back on the new run under the test environment even though it works against a real server. Set the memo on the ContinuedAsNew event attributes and on the new run start request, mirroring the existing search attribute handling, and extend ContinueAsNewTest to assert the memo is visible after continue-as-new. Closes temporalio#2863
|
|
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.
What changed?
The in-memory test server carries over search attributes and the header on continue-as-new but drops the memo. As a result, a workflow that sets a memo on continue-as-new cannot read it back on the new run under the test environment, even though this works against a real server.
This sets the memo on the
ContinuedAsNewevent attributes (StateMachines) and on the new run's start request (TestWorkflowService), mirroring the existing search-attribute handling added in #2731.ContinueAsNewTestalready set a memo on each continue-as-new but never asserted it downstream; it now asserts the memo is visible on the runs that follow.Why?
Reported in #2863. We run the Java SDK in production and rely on memo continuity across continue-as-new; the test server behaving differently from the real server makes it impossible to cover that behavior in workflow tests.
Breaking changes?
No. Test-server only; behavior now matches the real server.
Server PR
Not required.
Closes #2863