From e4241175773597fb8d856ce527cb00a16d702849 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Mon, 15 Jan 2024 23:55:49 +0530 Subject: [PATCH] removed refs to gone var --- flow/cmd/handler.go | 11 ----------- flow/cmd/mirror_status.go | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/flow/cmd/handler.go b/flow/cmd/handler.go index eaafd73c83..c5ed5db1f6 100644 --- a/flow/cmd/handler.go +++ b/flow/cmd/handler.go @@ -442,10 +442,6 @@ func (h *FlowRequestHandler) FlowStateChange( if err != nil { return nil, err } - isCDCFlow, err := h.isCDCFlow(ctx, req.FlowJobName) - if err != nil { - return nil, err - } if req.RequestedFlowState == protos.FlowStatus_STATUS_PAUSED && currState == protos.FlowStatus_STATUS_RUNNING { @@ -462,13 +458,6 @@ func (h *FlowRequestHandler) FlowStateChange( ) } else if req.RequestedFlowState == protos.FlowStatus_STATUS_RUNNING && currState == protos.FlowStatus_STATUS_PAUSED { - if isCDCFlow && req.FlowConfigUpdate.GetCdcFlowConfigUpdate() != nil { - err = h.attemptCDCFlowConfigUpdate(ctx, workflowID, - req.FlowConfigUpdate.GetCdcFlowConfigUpdate()) - if err != nil { - return nil, err - } - } err = h.temporalClient.SignalWorkflow( ctx, workflowID, diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index a42360112b..250b47daff 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -385,14 +385,3 @@ func (h *FlowRequestHandler) updateWorkflowStatus( } return nil } - -func (h *FlowRequestHandler) attemptCDCFlowConfigUpdate(ctx context.Context, - workflowID string, cdcFlowConfigUpdate *protos.CDCFlowConfigUpdate, -) error { - _, err := h.temporalClient.UpdateWorkflow(ctx, workflowID, "", - shared.CDCFlowConfigUpdate, cdcFlowConfigUpdate) - if err != nil { - return fmt.Errorf("failed to update config in CDC workflow with ID %s: %w", workflowID, err) - } - return nil -}