diff --git a/service/history/ndc/workflow_resetter.go b/service/history/ndc/workflow_resetter.go index f281346a340..53f22262fcb 100644 --- a/service/history/ndc/workflow_resetter.go +++ b/service/history/ndc/workflow_resetter.go @@ -136,7 +136,6 @@ func (r *workflowResetterImpl) ResetWorkflow( var currentWorkflowEventsSeq []*persistence.WorkflowEvents var reapplyEventsFn workflowResetReapplyEventsFn currentMutableState := currentWorkflow.GetMutableState() - currentUpdateRegistry := currentWorkflow.GetContext().UpdateRegistry(ctx, nil) if currentMutableState.IsWorkflowExecutionRunning() { if err := r.terminateWorkflow( currentMutableState, @@ -157,7 +156,6 @@ func (r *workflowResetterImpl) ResetWorkflow( lastVisitedRunID, err := r.reapplyContinueAsNewWorkflowEvents( ctx, resetMutableState, - currentUpdateRegistry, currentWorkflow, namespaceID, workflowID, @@ -185,7 +183,6 @@ func (r *workflowResetterImpl) ResetWorkflow( _, err := r.reapplyContinueAsNewWorkflowEvents( ctx, resetMutableState, - currentUpdateRegistry, currentWorkflow, namespaceID, workflowID, @@ -575,7 +572,6 @@ func (r *workflowResetterImpl) terminateWorkflow( func (r *workflowResetterImpl) reapplyContinueAsNewWorkflowEvents( ctx context.Context, resetMutableState workflow.MutableState, - currentUpdateRegistry update.Registry, currentWorkflow Workflow, namespaceID namespace.ID, workflowID string, diff --git a/service/history/ndc/workflow_resetter_test.go b/service/history/ndc/workflow_resetter_test.go index 4f344c5c87f..31bd0cc25b5 100644 --- a/service/history/ndc/workflow_resetter_test.go +++ b/service/history/ndc/workflow_resetter_test.go @@ -57,7 +57,6 @@ import ( "go.temporal.io/server/service/history/tests" "go.temporal.io/server/service/history/workflow" wcache "go.temporal.io/server/service/history/workflow/cache" - "go.temporal.io/server/service/history/workflow/update" "go.uber.org/mock/gomock" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -602,9 +601,6 @@ func (s *workflowResetterSuite) TestReapplyContinueAsNewWorkflowEvents_WithOutCo }, nil) mutableState := workflow.NewMockMutableState(s.controller) - mutableState.EXPECT().VisitUpdates(gomock.Any()).Return() - mutableState.EXPECT().GetCurrentVersion().Return(int64(0)) - currentUpdateRegistry := update.NewRegistry(mutableState) currentWorkflow := NewMockWorkflow(s.controller) smReg := hsm.NewRegistry() s.NoError(workflow.RegisterStateMachine(smReg)) @@ -615,7 +611,6 @@ func (s *workflowResetterSuite) TestReapplyContinueAsNewWorkflowEvents_WithOutCo lastVisitedRunID, err := s.workflowResetter.reapplyContinueAsNewWorkflowEvents( ctx, mutableState, - currentUpdateRegistry, currentWorkflow, s.namespaceID, s.workflowID, @@ -732,10 +727,7 @@ func (s *workflowResetterSuite) TestReapplyContinueAsNewWorkflowEvents_WithConti s.NoError(err) mutableState := workflow.NewMockMutableState(s.controller) - mutableState.EXPECT().VisitUpdates(gomock.Any()).Return() - mutableState.EXPECT().GetCurrentVersion().Return(int64(0)) mutableState.EXPECT().GetWorkflowKey().Return(definition.WorkflowKey{RunID: "random-run-id"}) - currentUpdateRegistry := update.NewRegistry(mutableState) currentWorkflow := NewMockWorkflow(s.controller) currentWorkflow.EXPECT().GetMutableState().Return(mutableState) smReg := hsm.NewRegistry() @@ -747,7 +739,6 @@ func (s *workflowResetterSuite) TestReapplyContinueAsNewWorkflowEvents_WithConti lastVisitedRunID, err := s.workflowResetter.reapplyContinueAsNewWorkflowEvents( ctx, mutableState, - currentUpdateRegistry, currentWorkflow, s.namespaceID, s.workflowID,