Skip to content

Commit 2b88fb1

Browse files
authored
Relax nondeterministc check (#1093)
1 parent 037a846 commit 2b88fb1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

internal/internal_task_handlers.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,9 +917,13 @@ ProcessEvents:
917917
}
918918
}
919919
if nonDeterministicErr == nil && w.err != nil {
920-
if panicErr, ok := w.err.(*workflowPanicError); ok && panicErr.value != nil {
921-
if _, isStateMachinePanic := panicErr.value.(stateMachineIllegalStatePanic); isStateMachinePanic {
922-
nonDeterministicErr = panicErr
920+
if isReplayTest {
921+
// NOTE: we should check the following error regardless if it's in replay test or not
922+
// but since we are not checking it previously, it may break existing customers workflow
923+
if panicErr, ok := w.err.(*workflowPanicError); ok && panicErr.value != nil {
924+
if _, isStateMachinePanic := panicErr.value.(stateMachineIllegalStatePanic); isStateMachinePanic {
925+
nonDeterministicErr = panicErr
926+
}
923927
}
924928
}
925929
}

0 commit comments

Comments
 (0)