Skip to content

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

Merged
maciejdudko merged 1 commit into
temporalio:mainfrom
aditya-786:test-server-propagate-memo-on-can
Jul 13, 2026
Merged

Propagate memo on continue-as-new in the test server#2943
maciejdudko merged 1 commit into
temporalio:mainfrom
aditya-786:test-server-propagate-memo-on-can

Conversation

@aditya-786

Copy link
Copy Markdown
Contributor

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

@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.

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
@maciejdudko maciejdudko force-pushed the test-server-propagate-memo-on-can branch from 7fb27eb to 4829b8e Compare July 13, 2026 16:50

@maciejdudko maciejdudko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aditya-786, thank you for your contribution! The code looks fine and the tests pass. LGTM!

@maciejdudko maciejdudko merged commit ff980d3 into temporalio:main Jul 13, 2026
16 checks passed
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

3 participants