Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(workflow): Expose updateId to update handlers #1450

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

antlai-temporal
Copy link
Contributor

What was changed

A method currentUpdateInfo() has been added to workflow to obtain the name and id of a currently executing update handler from within. The solution uses AsyncLocalStorage to propagate this information across asynchronous invocations. Calling currentUpdateInfo() within a workflow, but outside the async scope of an update handler invocation, returns undefined.

Why?

Facilitate deduplication of updates, particularly across CAN boundaries.

Checklist

  1. Closes
    [Feature Request] Expose updateId to Update handlers #1317

@antlai-temporal antlai-temporal requested a review from a team as a code owner June 25, 2024 12:19
Copy link
Contributor

@mjameswh mjameswh left a comment

Choose a reason for hiding this comment

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

See review comments.

@antlai-temporal antlai-temporal merged commit 2b654ac into temporalio:main Jun 28, 2024
65 of 70 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants