Skip to content

Commit

Permalink
Upgrade to temporal-proto-go version 0.20.34 (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
samarabbas committed May 7, 2020
1 parent 17230b4 commit e108b16
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.33
go.temporal.io/temporal-proto v0.20.34
go.uber.org/atomic v1.6.0
go.uber.org/goleak v1.0.0
go.uber.org/zap v1.14.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.temporal.io/temporal-proto v0.20.33 h1:b5PmyTtT0YQdYIrro4GafCn7LqHiaTGdGnexUe5V2p4=
go.temporal.io/temporal-proto v0.20.33/go.mod h1:Lv8L8YBpbp0Z7V5nbvw5UD0j7x0isebhCOIDLkBqn6s=
go.temporal.io/temporal-proto v0.20.34 h1:IHv0Tpai7n0ayqTo6PZTASIFjdh9XvP+fOTcSmL/yw4=
go.temporal.io/temporal-proto v0.20.34/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=
Expand Down
3 changes: 0 additions & 3 deletions internal/common/util/stringer.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ func HistoryEventToString(e *eventpb.HistoryEvent) string {
case eventpb.EventType_ActivityTaskCancelRequested:
data = e.GetActivityTaskCancelRequestedEventAttributes()

case eventpb.EventType_RequestCancelActivityTaskFailed:
data = e.GetRequestCancelActivityTaskFailedEventAttributes()

case eventpb.EventType_ActivityTaskCanceled:
data = e.GetActivityTaskCanceledEventAttributes()

Expand Down
6 changes: 5 additions & 1 deletion internal/internal_decision_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,11 @@ func (h *decisionsHelper) handleActivityTaskScheduled(scheduledEventID int64, ac
decision.handleInitiatedEvent()
}

func (h *decisionsHelper) handleActivityTaskCancelRequested(activityID string) {
func (h *decisionsHelper) handleActivityTaskCancelRequested(scheduledEventID int64) {
activityID, ok := h.scheduledEventIDToActivityID[scheduledEventID]
if !ok {
panicIllegalState(fmt.Sprintf("unable to find activity ID for the scheduledEventID %v", scheduledEventID))
}
decision := h.getDecision(makeDecisionID(decisionTypeActivity, activityID))
decision.handleCancelInitiatedEvent()
}
Expand Down
2 changes: 1 addition & 1 deletion internal/internal_event_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessEvent(

case eventpb.EventType_ActivityTaskCancelRequested:
weh.decisionsHelper.handleActivityTaskCancelRequested(
event.GetActivityTaskCancelRequestedEventAttributes().GetActivityId())
event.GetActivityTaskCancelRequestedEventAttributes().GetScheduledEventId())

case eventpb.EventType_ActivityTaskCanceled:
err = weh.handleActivityTaskCanceled(event)
Expand Down

0 comments on commit e108b16

Please sign in to comment.