Skip to content

Commit

Permalink
Refactor markers (#151)
Browse files Browse the repository at this point in the history
* Refactor markers.

* Remove Details map hack.

* Update JSON.
  • Loading branch information
alexshtin committed Jun 4, 2020
1 parent b7fbbb6 commit 5fcbdfb
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 89 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ require (
github.com/robfig/cron v1.2.0
github.com/sirupsen/logrus v1.5.0
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/uber-go/tally v3.3.16+incompatible
github.com/stretchr/testify v1.6.0
github.com/uber-go/tally v3.3.17+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.23.2
go.temporal.io/temporal-proto v0.23.3
go.uber.org/atomic v1.6.0
go.uber.org/goleak v1.0.0
go.uber.org/zap v1.15.0
Expand All @@ -31,6 +31,6 @@ require (
golang.org/x/tools v0.0.0-20200327195553-82bb89366a1e // indirect
google.golang.org/grpc v1.29.1
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8 // indirect
honnef.co/go/tools v0.0.1-2020.1.3 // indirect
)
34 changes: 20 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/uber-go/tally v3.3.16+incompatible h1:dlxi7iZMimK2Z0HXbZgvVFobZu4XRT/U3aEUWzLV1n4=
github.com/uber-go/tally v3.3.16+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/uber-go/tally v3.3.17+incompatible h1:nFHIuW3VQ22wItiE9kPXic8dEgExWOsVOHwpmoIvsMw=
github.com/uber-go/tally v3.3.17+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM=
github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
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.23.2 h1:8syxfKU0/g7DPb9sUHPvirVQ0zYi3rtvuTYtMY4qKas=
go.temporal.io/temporal-proto v0.23.2/go.mod h1:AUs3JCVjCSx2J2hpgkWlrVUt7R7obpONi1rDhAcV/Os=
go.temporal.io/temporal-proto v0.23.3 h1:BAtO0Msx8B9d7JS/uT2xor66V/lcM2tDettb5M+aFN8=
go.temporal.io/temporal-proto v0.23.3/go.mod h1:MH1w9QQvM360POj9mhZdJqOPtFYm1S/ylwrTnYiFr6I=
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 Expand Up @@ -136,8 +136,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476 h1:E7ct1C6/33eOdrGZKMoyntcEvs2dwZnDe30crG5vpYU=
golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -150,8 +150,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down Expand Up @@ -185,8 +185,9 @@ google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200519141106-08726f379972 h1:6ydLqG65DIMNJf6p97WudGsmd1w3Ickm/LiZnBrREPI=
google.golang.org/genproto v0.0.0-20200519141106-08726f379972/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200603110839-e855014d5736 h1:+IE3xTD+6Eb7QWG5JFp+dQr/XjKpjmrNkh4pdjTdHEs=
google.golang.org/genproto v0.0.0-20200603110839-e855014d5736/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
Expand All @@ -202,6 +203,9 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand All @@ -210,8 +214,10 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8 h1:jL/vaozO53FMfZLySWM+4nulF3gQEC6q5jH90LPomDo=
gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
Expand Down
10 changes: 10 additions & 0 deletions internal/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ type (
scheduledEventID int64
startedEventID int64
identity string
activityType *commonpb.ActivityType
activityID string
cause error
}

Expand Down Expand Up @@ -285,12 +287,16 @@ func NewActivityTaskError(
scheduledEventID int64,
startedEventID int64,
identity string,
activityType *commonpb.ActivityType,
activityID string,
cause error,
) *ActivityTaskError {
return &ActivityTaskError{
scheduledEventID: scheduledEventID,
startedEventID: startedEventID,
identity: identity,
activityType: activityType,
activityID: activityID,
cause: cause,
}
}
Expand Down Expand Up @@ -687,6 +693,8 @@ func convertErrorToFailure(err error, dc DataConverter) *failurepb.Failure {
ScheduledEventId: err.scheduledEventID,
StartedEventId: err.startedEventID,
Identity: err.identity,
ActivityType: err.activityType,
ActivityId: err.activityID,
}
failure.FailureInfo = &failurepb.Failure_ActivityTaskFailureInfo{ActivityTaskFailureInfo: failureInfo}
case *ChildWorkflowExecutionError:
Expand Down Expand Up @@ -757,6 +765,8 @@ func convertFailureToError(failure *failurepb.Failure, dc DataConverter) error {
activityTaskInfoFailure.GetScheduledEventId(),
activityTaskInfoFailure.GetStartedEventId(),
activityTaskInfoFailure.GetIdentity(),
activityTaskInfoFailure.GetActivityType(),
activityTaskInfoFailure.GetActivityId(),
convertFailureToError(failure.GetCause(), dc),
)
} else if failure.GetChildWorkflowExecutionFailureInfo() != nil {
Expand Down
6 changes: 4 additions & 2 deletions internal/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ func Test_IsRetryable(t *testing.T) {
require.True(IsRetryable(coolErr, []string{}))
require.False(IsRetryable(coolErr, []string{"coolError"}))

workflowExecutionErr := NewWorkflowExecutionError("", "", "", NewActivityTaskError(0, 0, "", coolErr))
workflowExecutionErr := NewWorkflowExecutionError("", "", "", NewActivityTaskError(0, 0, "", nil, "", coolErr))
require.True(IsRetryable(workflowExecutionErr, []string{}))
require.False(IsRetryable(workflowExecutionErr, []string{"coolError"}))
}
Expand Down Expand Up @@ -646,12 +646,14 @@ func Test_convertErrorToFailure_ActivityTaskError(t *testing.T) {
require := require.New(t)

applicationErr := NewApplicationError("app err", true)
err := NewActivityTaskError(8, 22, "alex", applicationErr)
err := NewActivityTaskError(8, 22, "alex", &commonpb.ActivityType{Name: "activityType"}, "32283", applicationErr)
f := convertErrorToFailure(err, DefaultDataConverter)
require.Equal("activity task error (scheduledEventID: 8, startedEventID: 22, identity: alex): app err", f.GetMessage())
require.Equal(int64(8), f.GetActivityTaskFailureInfo().GetScheduledEventId())
require.Equal(int64(22), f.GetActivityTaskFailureInfo().GetStartedEventId())
require.Equal("alex", f.GetActivityTaskFailureInfo().GetIdentity())
require.Equal("activityType", f.GetActivityTaskFailureInfo().GetActivityType().GetName())
require.Equal("32283", f.GetActivityTaskFailureInfo().GetActivityId())
require.Equal(convertErrorToFailure(applicationErr, DefaultDataConverter), f.GetCause())

err2 := convertFailureToError(f, DefaultDataConverter)
Expand Down
53 changes: 44 additions & 9 deletions internal/internal_decision_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
commonpb "go.temporal.io/temporal-proto/common"
decisionpb "go.temporal.io/temporal-proto/decision"
eventpb "go.temporal.io/temporal-proto/event"
failurepb "go.temporal.io/temporal-proto/failure"

"go.temporal.io/temporal/internal/common/util"
)
Expand Down Expand Up @@ -170,6 +171,13 @@ const (
versionMarkerName = "Version"
localActivityMarkerName = "LocalActivity"
mutableSideEffectMarkerName = "MutableSideEffect"

sideEffectMarkerIDName = "side-effect-id"
sideEffectMarkerDataName = "data"
versionMarkerChangeIDName = "change-id"
versionMarkerDataName = "version"
localActivityMarkerDataDetailsName = "data"
localActivityMarkerResultDetailsName = "result"
)

func (d decisionState) String() string {
Expand Down Expand Up @@ -819,16 +827,25 @@ func (h *decisionsHelper) getActivityID(event *eventpb.HistoryEvent) string {
return activityID
}

func (h *decisionsHelper) recordVersionMarker(changeID string, version Version, dataConverter DataConverter) decisionStateMachine {
func (h *decisionsHelper) recordVersionMarker(changeID string, version Version, dc DataConverter) decisionStateMachine {
markerID := fmt.Sprintf("%v_%v", versionMarkerName, changeID)
details, err := encodeArgs(dataConverter, []interface{}{changeID, version})

changeIDPayload, err := dc.ToData(changeID)
if err != nil {
panic(err)
}

versionPayload, err := dc.ToData(version)
if err != nil {
panic(err)
}

recordMarker := &decisionpb.RecordMarkerDecisionAttributes{
MarkerName: versionMarkerName,
Details: details, // Keep
Details: map[string]*commonpb.Payloads{
versionMarkerChangeIDName: changeIDPayload,
versionMarkerDataName: versionPayload,
},
}

decision := h.newMarkerDecisionStateMachine(markerID, recordMarker)
Expand All @@ -849,33 +866,51 @@ func (h *decisionsHelper) handleVersionMarker(eventID int64, changeID string) {
h.versionMarkerLookup[eventID] = changeID
}

func (h *decisionsHelper) recordSideEffectMarker(sideEffectID int64, data *commonpb.Payloads) decisionStateMachine {
func (h *decisionsHelper) recordSideEffectMarker(sideEffectID int64, data *commonpb.Payloads, dc DataConverter) decisionStateMachine {
markerID := fmt.Sprintf("%v_%v", sideEffectMarkerName, sideEffectID)
sideEffectIDPayload, err := dc.ToData(sideEffectID)
if err != nil {
panic(err)
}

attributes := &decisionpb.RecordMarkerDecisionAttributes{
MarkerName: sideEffectMarkerName,
Details: data,
Details: map[string]*commonpb.Payloads{
sideEffectMarkerIDName: sideEffectIDPayload,
sideEffectMarkerDataName: data,
},
}
decision := h.newMarkerDecisionStateMachine(markerID, attributes)
h.addDecision(decision)
return decision
}

func (h *decisionsHelper) recordLocalActivityMarker(activityID string, result *commonpb.Payloads) decisionStateMachine {
func (h *decisionsHelper) recordLocalActivityMarker(activityID string, details map[string]*commonpb.Payloads, failure *failurepb.Failure) decisionStateMachine {
markerID := fmt.Sprintf("%v_%v", localActivityMarkerName, activityID)
attributes := &decisionpb.RecordMarkerDecisionAttributes{
MarkerName: localActivityMarkerName,
Details: result,
Failure: failure,
Details: details,
}
decision := h.newMarkerDecisionStateMachine(markerID, attributes)
h.addDecision(decision)
return decision
}

func (h *decisionsHelper) recordMutableSideEffectMarker(mutableSideEffectID string, data *commonpb.Payloads) decisionStateMachine {
func (h *decisionsHelper) recordMutableSideEffectMarker(mutableSideEffectID string, data *commonpb.Payloads, dc DataConverter) decisionStateMachine {
markerID := fmt.Sprintf("%v_%v", mutableSideEffectMarkerName, mutableSideEffectID)

mutableSideEffectIDPayload, err := dc.ToData(mutableSideEffectID)
if err != nil {
panic(err)
}

attributes := &decisionpb.RecordMarkerDecisionAttributes{
MarkerName: mutableSideEffectMarkerName,
Details: data,
Details: map[string]*commonpb.Payloads{
sideEffectMarkerIDName: mutableSideEffectIDPayload,
sideEffectMarkerDataName: data,
},
}
decision := h.newMarkerDecisionStateMachine(markerID, attributes)
h.addDecision(decision)
Expand Down
4 changes: 2 additions & 2 deletions internal/internal_decision_state_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func Test_TimerCancelEventOrdering(t *testing.T) {
require.Equal(t, attributes, decisions[0].GetStartTimerDecisionAttributes())
h.handleTimerStarted(timerID)
require.Equal(t, decisionStateInitiated, d.getState())
m := h.recordLocalActivityMarker(localActivityID, &commonpb.Payloads{})
m := h.recordLocalActivityMarker(localActivityID, map[string]*commonpb.Payloads{}, nil)
require.Equal(t, decisionStateCreated, m.getState())
h.cancelTimer(timerID)
require.Equal(t, decisionStateCanceledAfterInitiated, d.getState())
Expand Down Expand Up @@ -518,7 +518,7 @@ func Test_MarkerStateMachine(t *testing.T) {
h := newDecisionsHelper()

// record marker for side effect
d := h.recordSideEffectMarker(1, &commonpb.Payloads{})
d := h.recordSideEffectMarker(1, &commonpb.Payloads{}, DefaultDataConverter)
require.Equal(t, decisionStateCreated, d.getState())

// send decisions
Expand Down
Loading

0 comments on commit 5fcbdfb

Please sign in to comment.