Commit 6cff798
authored
feat: Add NonDeterminism Tracking (cadence-workflow#65)
<!-- Describe what has changed in this PR -->
**What changed?**
- Remove DecisionsHelper. The mechanism it used for generating IDs is
inconsistent with the other clients, where they all share an
incrementing integer. The other functionality it provided was unused.
- Add NonDeterminism Tracking to provide specific errors when
nondeterminism occurs.
- We look at the outcome decisions for the batch and create a set of
expectations that must be met so that we can immediately flag
non-determinism, rather than waiting until after the user code finishing
execution.
- We add markers any time there's immediate cancellation.
- Add a state machine for Workflow completion. We need to route the
Decision attributes through the DecisionManager so that it can check for
nondeterminism.
- Restructure workflow exception handling a bit to handle
ExceptionGroup. This still needs more work.
<!-- Tell your future self why have you made these changes -->
**Why?**
- Feature parity with other clients
- Trying out new non-determinism detection algorithm to see if it would
work for other clients.
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
- Unit and integration tests
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
- This is a breaking change
<!-- Is it notable for release? e.g. schema updates, configuration or
data migration required? If so, please mention it, and also update
CHANGELOG.md -->
**Release notes**
<!-- Is there any documentation updates should be made for config,
https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please
open an PR in https://github.com/cadence-workflow/cadence-docs -->
**Documentation Changes**1 parent 09fd459 commit 6cff798
File tree
21 files changed
+1972
-504
lines changed- cadence
- _internal/workflow
- statemachine
- worker
- tests
- cadence/_internal/workflow/statemachine
- integration_tests
- nondeterminism
21 files changed
+1972
-504
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | | - | |
74 | 71 | | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
455 | 462 | | |
456 | 463 | | |
457 | 464 | | |
458 | | - | |
459 | | - | |
460 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
461 | 495 | | |
462 | 496 | | |
463 | 497 | | |
| |||
0 commit comments