-
Notifications
You must be signed in to change notification settings - Fork 132
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
Honor non-determinism fail workflow policy #1287
Honor non-determinism fail workflow policy #1287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping some notes from a first skim.
overall very close I think, I just need another read in an IDE or something to make sure it's good to go since this area in general is a little bit risky (but totally worth it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure there's a fairly-prominent thing in the changelog (this PR or another, as long as it happens before release), but yep. LGTM, thanks for tracking down the details on this :)
b2f959b
to
0542960
Compare
What changed?
Users can specify NonDeterministicWorkflowPolicy in worker options. If the FailWorkflow policy is chosen the workflow is expected to terminate as soon as it ends up with a nondeterministic state (e.g. activity order changed).
However this wasn't honored for a category of nondeterminism cases. This PR addresses it and workflows fail once any nondeterminism scenario is encountered.
There are two categories of nondeterminism cases in terms of how they get detected by client library:
FailWorkflow policy was honored for 2 but not for 1.
Why?
To make
NonDeterministicWorkflowPolicy
feature correct/complete.How did you test it?
Added an integration test to simulate this scenario.
Potential risks
Users depending on existing buggy behavior can be impacted. This would only happen if and only if all the below holds true
This is not very realistic expectation because users don't know about these subcategories of nondeterminism detection mechanisms.
So the risk of this fix should be minimal.