Skip to content

Commit 24f19c1

Browse files
ShahabTShivs11
authored andcommitted
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 00b6e61 commit 24f19c1

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
@@ -535,6 +535,12 @@ func (handler *WorkflowTaskCompletedHandler) Invoke(
535535
}
536536
}
537537

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

0 commit comments

Comments
 (0)