diff --git a/go.mod b/go.mod index 356afd2b4..9160474e3 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/uber-go/tally v3.3.15+incompatible github.com/uber/jaeger-client-go v2.22.1+incompatible github.com/uber/jaeger-lib v2.2.0+incompatible // indirect - go.temporal.io/temporal-proto v0.20.26 + go.temporal.io/temporal-proto v0.20.27 go.uber.org/atomic v1.6.0 go.uber.org/goleak v1.0.0 go.uber.org/zap v1.14.1 diff --git a/go.sum b/go.sum index 250c5caab..6b1fced06 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMW github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.temporal.io/temporal-proto v0.20.26 h1:EkAJ3nlpwk7WCjTenWMvsGClB5yReffTh20MVgb2vgs= -go.temporal.io/temporal-proto v0.20.26/go.mod h1:Lv8L8YBpbp0Z7V5nbvw5UD0j7x0isebhCOIDLkBqn6s= +go.temporal.io/temporal-proto v0.20.27 h1:g/UMo4TZyUGCGCAsvz81IIlkN6YQW7S5Ua4bwpjECvQ= +go.temporal.io/temporal-proto v0.20.27/go.mod h1:Lv8L8YBpbp0Z7V5nbvw5UD0j7x0isebhCOIDLkBqn6s= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo= diff --git a/internal/internal_decision_state_machine.go b/internal/internal_decision_state_machine.go index c2f46cbf6..edf8e5421 100644 --- a/internal/internal_decision_state_machine.go +++ b/internal/internal_decision_state_machine.go @@ -883,7 +883,7 @@ func (h *decisionsHelper) requestCancelExternalWorkflowExecution(namespace, work Namespace: namespace, WorkflowId: workflowID, RunId: runID, - Control: []byte(cancellationID), + Control: cancellationID, ChildWorkflowOnly: false, } decision := h.newCancelExternalWorkflowStateMachine(attributes, cancellationID) @@ -943,7 +943,7 @@ func (h *decisionsHelper) signalExternalWorkflowExecution(namespace, workflowID, }, SignalName: signalName, Input: input, - Control: []byte(signalID), + Control: signalID, ChildWorkflowOnly: childWorkflowOnly, } decision := h.newSignalExternalWorkflowStateMachine(attributes, signalID) diff --git a/internal/internal_decision_state_machine_test.go b/internal/internal_decision_state_machine_test.go index b2c2fee48..964ec8558 100644 --- a/internal/internal_decision_state_machine_test.go +++ b/internal/internal_decision_state_machine_test.go @@ -557,7 +557,7 @@ func Test_CancelExternalWorkflowStateMachine_Succeed(t *testing.T) { Namespace: namespace, WorkflowId: workflowID, RunId: runID, - Control: []byte(cancellationID), + Control: cancellationID, ChildWorkflowOnly: false, }, decisions[0].GetRequestCancelExternalWorkflowExecutionDecisionAttributes(), @@ -603,7 +603,7 @@ func Test_CancelExternalWorkflowStateMachine_Failed(t *testing.T) { Namespace: namespace, WorkflowId: workflowID, RunId: runID, - Control: []byte(cancellationID), + Control: cancellationID, ChildWorkflowOnly: false, }, decisions[0].GetRequestCancelExternalWorkflowExecutionDecisionAttributes(), diff --git a/internal/internal_worker.go b/internal/internal_worker.go index c623e8635..46c72faa3 100644 --- a/internal/internal_worker.go +++ b/internal/internal_worker.go @@ -1249,7 +1249,7 @@ func (aw *WorkflowReplayer) replayWorkflowHistory(logger *zap.Logger, service wo if last.GetEventType() != eventpb.EventType_WorkflowExecutionCompleted && last.GetEventType() != eventpb.EventType_WorkflowExecutionContinuedAsNew { return nil } - err = fmt.Errorf("replay workflow doesn't return the same result as the last event, resp: %v, last: %v", resp, last) + if resp != nil { completeReq, ok := resp.(*workflowservice.RespondDecisionTaskCompletedRequest) if ok { @@ -1275,7 +1275,7 @@ func (aw *WorkflowReplayer) replayWorkflowHistory(logger *zap.Logger, service wo } } } - return err + return fmt.Errorf("replay workflow doesn't return the same result as the last event, resp: %v, last: %v", resp, last) } func extractHistoryFromFile(jsonfileName string, lastEventID int64) (*eventpb.History, error) { diff --git a/internal/testdata/parentWF.json b/internal/testdata/parentWF.json index cc9aad0ea..c9c0cc376 100644 --- a/internal/testdata/parentWF.json +++ b/internal/testdata/parentWF.json @@ -158,7 +158,7 @@ }, "signalName": "test-signal", "input": null, - "control": "MA==", + "control": "0", "childWorkflowOnly": true } }, @@ -175,7 +175,7 @@ "workflowId": "child_workflow:0ea65eda-a0db-4a59-bef3-dce48e8484f8", "runId": "" }, - "control": "MA==" + "control": "0" } }, {