Skip to content

Commit

Permalink
[#292]: chore(deps): bump go.temporal.io/sdk from 1.17.0 to 1.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Nov 11, 2022
2 parents 5e445d4 + 66b2fdd commit 5173e10
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 39 deletions.
4 changes: 2 additions & 2 deletions aggregatedpool/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
tActivity "go.temporal.io/sdk/activity"
temporalClient "go.temporal.io/sdk/client"
"go.temporal.io/sdk/converter"
"go.temporal.io/sdk/internalbindings"
"go.temporal.io/sdk/temporal"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -131,7 +131,7 @@ func (a *Activity) execute(ctx context.Context, args *commonpb.Payloads) (*commo
return nil, tActivity.ErrResultPending
}

return nil, internalbindings.ConvertFailureToError(retPld.Failure, a.dc)
return nil, temporal.GetDefaultFailureConverter().FailureToError(retPld.Failure)
}

return retPld.Payloads, nil
Expand Down
13 changes: 7 additions & 6 deletions aggregatedpool/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/temporalio/roadrunner-temporal/v2/internal"
commonpb "go.temporal.io/api/common/v1"
bindings "go.temporal.io/sdk/internalbindings"
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/workflow"
"go.uber.org/zap"
)
Expand Down Expand Up @@ -64,7 +65,7 @@ func (wp *Workflow) handleQuery(queryType string, queryArgs *commonpb.Payloads,
}

if result.Failure != nil {
return nil, errors.E(op, bindings.ConvertFailureToError(result.Failure, wp.env.GetDataConverter()))
return nil, errors.E(op, temporal.GetDefaultFailureConverter().FailureToError(result.Failure))
}

return result.Payloads, nil
Expand Down Expand Up @@ -171,7 +172,7 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error {
return nil
}

wp.env.Complete(nil, bindings.ConvertFailureToError(msg.Failure, wp.env.GetDataConverter()))
wp.env.Complete(nil, temporal.GetDefaultFailureConverter().FailureToError(msg.Failure))

case *internal.ContinueAsNew:
result, _ := wp.env.GetDataConverter().ToPayloads(completed)
Expand Down Expand Up @@ -224,7 +225,7 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error {

case *internal.Panic:
// do not wrap error to pass it directly to Temporal
return bindings.ConvertFailureToError(msg.Failure, wp.env.GetDataConverter())
return temporal.GetDefaultFailureConverter().FailureToError(msg.Failure)

default:
return errors.E(op, errors.Str("undefined command"))
Expand All @@ -239,7 +240,7 @@ func (wp *Workflow) createLocalActivityCallback(id uint64) bindings.LocalActivit

if lar.Err != nil {
wp.log.Error("local activity", zap.Error(lar.Err), zap.Int32("attempt", lar.Attempt), zap.Duration("backoff", lar.Backoff))
wp.mq.PushError(id, bindings.ConvertErrorToFailure(lar.Err, wp.env.GetDataConverter()))
wp.mq.PushError(id, temporal.GetDefaultFailureConverter().ErrorToFailure(lar.Err))
return
}

Expand All @@ -265,7 +266,7 @@ func (wp *Workflow) createCallback(id uint64) bindings.ResultHandler {
wp.canceller.Discard(id)

if err != nil {
wp.mq.PushError(id, bindings.ConvertErrorToFailure(err, wp.env.GetDataConverter()))
wp.mq.PushError(id, temporal.GetDefaultFailureConverter().ErrorToFailure(err))
return
}

Expand Down Expand Up @@ -293,7 +294,7 @@ func (wp *Workflow) createContinuableCallback(id uint64) bindings.ResultHandler
wp.canceller.Discard(id)

if err != nil {
wp.mq.PushError(id, bindings.ConvertErrorToFailure(err, wp.env.GetDataConverter()))
wp.mq.PushError(id, temporal.GetDefaultFailureConverter().ErrorToFailure(err))
return
}

Expand Down
3 changes: 2 additions & 1 deletion aggregatedpool/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
temporalClient "go.temporal.io/sdk/client"
"go.temporal.io/sdk/converter"
bindings "go.temporal.io/sdk/internalbindings"
"go.temporal.io/sdk/temporal"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -260,7 +261,7 @@ func (wp *Workflow) execute(ctx context.Context, args *commonpb.Payloads) (*comm
return nil, tActivity.ErrResultPending
}

return nil, bindings.ConvertFailureToError(retPld.Failure, wp.dc)
return nil, temporal.GetDefaultFailureConverter().FailureToError(retPld.Failure)
}

return retPld.Payloads, nil
Expand Down
4 changes: 2 additions & 2 deletions data_converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr any) err
return r.dc.FromPayload(payload, valuePtr)
}

// ToString converts payload object into human readable string.
// ToString converts payload object into human-readable string.
func (r *DataConverter) ToString(input *commonpb.Payload) string {
return r.dc.ToString(input)
}

// ToStrings converts payloads object into human readable strings.
// ToStrings converts payloads object into human-readable strings.
func (r *DataConverter) ToStrings(input *commonpb.Payloads) []string {
return r.dc.ToStrings(input)
}
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require (
github.com/roadrunner-server/sdk/v3 v3.0.0-beta.5
github.com/stretchr/testify v1.8.1
github.com/uber-go/tally/v4 v4.1.3
go.temporal.io/api v1.12.0
go.temporal.io/sdk v1.17.0
go.temporal.io/api v1.13.0
go.temporal.io/sdk v1.18.1
go.temporal.io/sdk/contrib/tally v0.2.0
go.temporal.io/server v1.18.4
go.uber.org/zap v1.23.0
Expand Down Expand Up @@ -43,19 +43,19 @@ require (
github.com/robfig/cron v1.2.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.3.8 // indirect
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.2.0 // indirect
google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 // indirect
google.golang.org/grpc v1.50.1
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 5173e10

Please sign in to comment.