Skip to content

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Nov 19, 2025

Carry over search attributes on continue-as-new if none are explicitly set, this is the documented behaviour but previously the Java SDK was not actually carrying over search attributes.

closes #2178


Note

Carry over existing SearchAttributes during continue-as-new when none are specified, and add tests verifying typed attributes and retry options propagation.

  • Workflow runtime (continue-as-new):
    • Carry over existing SearchAttributes if none are provided:
      • When ContinueAsNewOptions has neither searchAttributes nor typedSearchAttributes.
      • When options is null (also continues copying RetryOptions).
  • Tests:
    • Expand ContinueAsNewTest to use typed search attributes and assert their propagation across continue-as-new runs alongside RetryOptions.
    • Enable external service in test rule and adjust assertions.
  • Docs:
    • Minor grammar tweak in ContinueAsNewOptions Javadoc.

Written by Cursor Bugbot for commit 296c6b2. This will update automatically on new commits. Configure here.

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner November 19, 2025 03:35
chatgpt-codex-connector[bot]

This comment was marked as outdated.

Copy link
Member

@cretz cretz Nov 19, 2025

Choose a reason for hiding this comment

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

Technically this is a change to behavior incompatibly if people have built expectation on the carryover not occurring. Should we add a 💥 in the title and note it in release notes? I assume if they want to go back to today's behavior they can provide an explicit empty attr collection?

(not reviewing the PR itself, just confirming the relaying of compatibility change)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So according to the Javadoc the behaviour has always been to copy if none are specify, the SDK just hasn't been. This is a change in behavior so I have no issue calling it out with 💥 .

And yes if a user wants the previous behaviour they can set an empt collection.

@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Carry over search attributes on continue-as-new if none are explicitly set 💥 Carry over search attributes on continue-as-new if none are explicitly set Nov 19, 2025
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.

Carry over search attributes on continue-as-new if none are explicitly specified

2 participants