Skip to content

Commit c0e8b3e

Browse files
authored
Do not bypass task generation when version changes (#7890)
## What changed? Server sends new wft in response of preious wft completion. This should not happen if the next wft is supposed to go to a different worker version. ## Why? When there is a transition, workflow could fall into an infinite loop of workflow tasks because they never go to the right worker. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) will be verified in Nightlies. ## Potential risks None
1 parent 1e7c853 commit c0e8b3e

File tree

1 file changed

+6
-0
lines changed
  • service/history/api/respondworkflowtaskcompleted

1 file changed

+6
-0
lines changed

service/history/api/respondworkflowtaskcompleted/api.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,12 @@ func (handler *WorkflowTaskCompletedHandler) Invoke(
536536
}
537537
}
538538

539+
if ms.GetDeploymentTransition() != nil {
540+
// Do not return new wft to worker if the workflow is transitioning to a different deployment version.
541+
// Let the task go through matching and get dispatched to the right worker
542+
bypassTaskGeneration = false
543+
}
544+
539545
var newWTErr error
540546
// If we checked WT heartbeat timeout before and WT wasn't timed out,
541547
// then OriginalScheduledTime needs to be carried over to the new WT.

0 commit comments

Comments
 (0)