Skip to content

Commit e108b16

Browse files
authored
Upgrade to temporal-proto-go version 0.20.34 (#122)
1 parent 17230b4 commit e108b16

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/uber-go/tally v3.3.15+incompatible
2323
github.com/uber/jaeger-client-go v2.22.1+incompatible
2424
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
25-
go.temporal.io/temporal-proto v0.20.33
25+
go.temporal.io/temporal-proto v0.20.34
2626
go.uber.org/atomic v1.6.0
2727
go.uber.org/goleak v1.0.0
2828
go.uber.org/zap v1.14.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6
9595
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
9696
go.temporal.io/temporal-proto v0.20.33 h1:b5PmyTtT0YQdYIrro4GafCn7LqHiaTGdGnexUe5V2p4=
9797
go.temporal.io/temporal-proto v0.20.33/go.mod h1:Lv8L8YBpbp0Z7V5nbvw5UD0j7x0isebhCOIDLkBqn6s=
98+
go.temporal.io/temporal-proto v0.20.34 h1:IHv0Tpai7n0ayqTo6PZTASIFjdh9XvP+fOTcSmL/yw4=
99+
go.temporal.io/temporal-proto v0.20.34/go.mod h1:Lv8L8YBpbp0Z7V5nbvw5UD0j7x0isebhCOIDLkBqn6s=
98100
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
99101
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
100102
go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo=

internal/common/util/stringer.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ func HistoryEventToString(e *eventpb.HistoryEvent) string {
127127
case eventpb.EventType_ActivityTaskCancelRequested:
128128
data = e.GetActivityTaskCancelRequestedEventAttributes()
129129

130-
case eventpb.EventType_RequestCancelActivityTaskFailed:
131-
data = e.GetRequestCancelActivityTaskFailedEventAttributes()
132-
133130
case eventpb.EventType_ActivityTaskCanceled:
134131
data = e.GetActivityTaskCanceledEventAttributes()
135132

internal/internal_decision_state_machine.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,11 @@ func (h *decisionsHelper) handleActivityTaskScheduled(scheduledEventID int64, ac
770770
decision.handleInitiatedEvent()
771771
}
772772

773-
func (h *decisionsHelper) handleActivityTaskCancelRequested(activityID string) {
773+
func (h *decisionsHelper) handleActivityTaskCancelRequested(scheduledEventID int64) {
774+
activityID, ok := h.scheduledEventIDToActivityID[scheduledEventID]
775+
if !ok {
776+
panicIllegalState(fmt.Sprintf("unable to find activity ID for the scheduledEventID %v", scheduledEventID))
777+
}
774778
decision := h.getDecision(makeDecisionID(decisionTypeActivity, activityID))
775779
decision.handleCancelInitiatedEvent()
776780
}

internal/internal_event_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessEvent(
816816

817817
case eventpb.EventType_ActivityTaskCancelRequested:
818818
weh.decisionsHelper.handleActivityTaskCancelRequested(
819-
event.GetActivityTaskCancelRequestedEventAttributes().GetActivityId())
819+
event.GetActivityTaskCancelRequestedEventAttributes().GetScheduledEventId())
820820

821821
case eventpb.EventType_ActivityTaskCanceled:
822822
err = weh.handleActivityTaskCanceled(event)

0 commit comments

Comments
 (0)