Skip to content

Propagate memo on continue-as-new in the test server#2943

Open
aditya-786 wants to merge 2 commits into
temporalio:mainfrom
aditya-786:test-server-propagate-memo-on-can
Open

Propagate memo on continue-as-new in the test server#2943
aditya-786 wants to merge 2 commits into
temporalio:mainfrom
aditya-786:test-server-propagate-memo-on-can

Conversation

@aditya-786

Copy link
Copy Markdown

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 ContinuedAsNew event attributes (StateMachines) and on the new run's start request (TestWorkflowService), mirroring the existing search-attribute handling added in #2731. ContinueAsNewTest already 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

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
@aditya-786 aditya-786 requested a review from a team as a code owner July 9, 2026 17:43
@CLAassistant

CLAassistant commented Jul 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestEnv should propagate Memo along with CAN

2 participants