Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Breaking Change) Generate update ID at call time if not set #2319

Merged

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

Current the SDK generates an Update ID, if not is set, when UpdateOptionsBuilder.build is called. This PR changes the behaviour so the Update ID is generated when the update request is made. This is done to:

  • Match the behaviour of WorkflowID in WorkflowOptions
  • Match other SDK's behaviour
  • Prevent the confusing case where reusing an option without an ID set causes one one update request when the customer tried to make two, see the test updateWorkflowReuseOptions.

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner November 14, 2024 22:09
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Makes sense to delay this until inside of root interceptor

@Quinn-With-Two-Ns
Copy link
Contributor Author

@cretz I set the ID before the interceptor so the interceptor has access to the ID, this is important for things like tracing interceptors . This is also consistent with the rest of the Java SDK.

@cretz
Copy link
Member

cretz commented Nov 15, 2024

Hrmm, ok. Some other SDKs do differently, but I agree it's more important to be intra-SDK consistent here than inter-SDK consistent.

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 2a68883 into temporalio:master Nov 15, 2024
8 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.

2 participants