File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
api/respondworkflowtaskcompleted Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,10 @@ func (handler *WorkflowTaskCompletedHandler) Invoke(
476476 if request .GetForceCreateNewWorkflowTask () || // Heartbeat WT is always of Normal type.
477477 wtFailedShouldCreateNewTask ||
478478 hasBufferedEventsOrMessages ||
479- activityNotStartedCancelled {
479+ activityNotStartedCancelled ||
480+ // If the workflow has an ongoing transition to another deployment version, we should ensure
481+ // it has a pending wft so it does not remain in the transition phase for long.
482+ ms .GetDeploymentTransition () != nil {
480483
481484 newWorkflowTaskType = enumsspb .WORKFLOW_TASK_TYPE_NORMAL
482485
Original file line number Diff line number Diff line change @@ -1129,16 +1129,6 @@ func (m *workflowTaskStateMachine) afterAddWorkflowTaskCompletedEvent(
11291129 }
11301130 }
11311131
1132- if transition != nil {
1133- // There is still a transition going on. We need to schedule a new WFT so it goes to the
1134- // transition deployment this time.
1135- if _ , err := m .ms .AddWorkflowTaskScheduledEvent (
1136- false ,
1137- enumsspb .WORKFLOW_TASK_TYPE_NORMAL ,
1138- ); err != nil {
1139- return err
1140- }
1141- }
11421132 // Deployment and behavior before applying the data came from the completed wft.
11431133 wfDeploymentBefore := m .ms .GetEffectiveDeployment ()
11441134 wfBehaviorBefore := m .ms .GetEffectiveVersioningBehavior ()
You can’t perform that action at this time.
0 commit comments