temporalio / features

Behavior and history compatibility testing for Temporal SDKs
13 stars 15 forks source link

[Feature Request] Workflow Update SDK integration #296

Open bergundy opened 1 year ago

bergundy commented 1 year ago

https://docs.temporal.io/workflows#update

Sushisource commented 9 months ago

For Core based SDKs, they should have a test which uses a canned history that looks like this: https://github.com/temporalio/sdk-core/pull/613/files#diff-d113bbfb7860d7e5dee861d8f2e48bdc2b479d240048832263075a1b4d7db9f7R14

Importantly, there is a complete WFT before the next WFT which has an update's acceptance. Core will send the first activation for this (when replaying) with two jobs: [StartWorkflow, DoUpdate]. If the SDK supports lazily registering update handlers (which, hopefully maybe just... don't, is the nice solution), then the SDK must take care to ensure that the workflow function is run at least once first so that the update handler has a chance to be registered. Otherwise, the SDK will erroneously encounter a nondeterminism error, thinking the update should be rejected (because no handler was found) when it was in fact accepted.