From 6ebf12b83fcfcb650aed87b1379c1baa6bb8b3fc Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 10 Oct 2022 13:25:12 +0200 Subject: [PATCH 1/5] feat: plugin v3 Signed-off-by: Valery Piashchynski --- aggregatedpool/activity.go | 42 ++++++++++---- aggregatedpool/handler.go | 19 +++--- aggregatedpool/init.go | 13 +++-- aggregatedpool/interface.go | 15 ----- aggregatedpool/workflow.go | 56 ++++++++++++------ .../canceller => canceller}/canceller.go | 0 .../canceller => canceller}/canceller_test.go | 0 common/interfaces.go | 58 +++++++++++++++++++ config.go | 2 +- go.mod | 13 ++--- go.sum | 21 ++++--- internal/codec/proto/proto.go | 6 +- metrics.go | 6 +- plugin.go | 50 ++++++++-------- {aggregatedpool/queue => queue}/queue.go | 2 +- {aggregatedpool/queue => queue}/queue_test.go | 2 +- .../registry => registry}/registry.go | 0 17 files changed, 194 insertions(+), 111 deletions(-) delete mode 100644 aggregatedpool/interface.go rename {aggregatedpool/canceller => canceller}/canceller.go (100%) rename {aggregatedpool/canceller => canceller}/canceller_test.go (100%) create mode 100644 common/interfaces.go rename {aggregatedpool/queue => queue}/queue.go (96%) rename {aggregatedpool/queue => queue}/queue_test.go (94%) rename {aggregatedpool/registry => registry}/registry.go (100%) diff --git a/aggregatedpool/activity.go b/aggregatedpool/activity.go index 0da3c0a6..cbb2fe65 100644 --- a/aggregatedpool/activity.go +++ b/aggregatedpool/activity.go @@ -6,11 +6,11 @@ import ( "sync/atomic" "time" - "github.com/roadrunner-server/api/v2/payload" - "github.com/roadrunner-server/api/v2/pool" "github.com/roadrunner-server/errors" - "github.com/roadrunner-server/sdk/v2/utils" - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/roadrunner-server/sdk/v3/utils" + "github.com/temporalio/roadrunner-temporal/v2/common" + "github.com/temporalio/roadrunner-temporal/v2/internal" commonpb "go.temporal.io/api/common/v1" tActivity "go.temporal.io/sdk/activity" temporalClient "go.temporal.io/sdk/client" @@ -26,18 +26,20 @@ const ( ) type Activity struct { - codec Codec - pool pool.Pool + codec common.Codec + pool common.Pool client temporalClient.Client log *zap.Logger dc converter.DataConverter seqID uint64 running sync.Map + pldPool *sync.Pool + graceTimout time.Duration } -func NewActivityDefinition(ac Codec, p pool.Pool, log *zap.Logger, dc converter.DataConverter, client temporalClient.Client, gt time.Duration) *Activity { +func NewActivityDefinition(ac common.Codec, p common.Pool, log *zap.Logger, dc converter.DataConverter, client temporalClient.Client, gt time.Duration) *Activity { return &Activity{ log: log, client: client, @@ -45,6 +47,11 @@ func NewActivityDefinition(ac Codec, p pool.Pool, log *zap.Logger, dc converter. pool: p, dc: dc, graceTimout: gt, + pldPool: &sync.Pool{ + New: func() any { + return new(payload.Payload) + }, + }, } } @@ -74,8 +81,8 @@ func (a *Activity) execute(ctx context.Context, args *commonpb.Payloads) (*commo mh := tActivity.GetMetricsHandler(ctx) // if the mh is not nil, record the RR metric if mh != nil { - mh.Gauge(RrMetricName).Update(float64(a.pool.(pool.Queuer).QueueSize())) - defer mh.Gauge(RrMetricName).Update(float64(a.pool.(pool.Queuer).QueueSize())) + mh.Gauge(RrMetricName).Update(float64(a.pool.QueueSize())) + defer mh.Gauge(RrMetricName).Update(float64(a.pool.QueueSize())) } var msg = &internal.Message{ @@ -92,13 +99,15 @@ func (a *Activity) execute(ctx context.Context, args *commonpb.Payloads) (*commo msg.Payloads.Payloads = append(msg.Payloads.Payloads, heartbeatDetails.Payloads...) } - pld := &payload.Payload{} + pld := a.getPld() + defer a.putPld(pld) + err := a.codec.Encode(&internal.Context{TaskQueue: info.TaskQueue}, pld, msg) if err != nil { return nil, err } - result, err := a.pool.Exec(pld) + result, err := a.pool.Exec(ctx, pld) if err != nil { a.running.Delete(utils.AsString(info.TaskToken)) return nil, errors.E(op, err) @@ -127,3 +136,14 @@ func (a *Activity) execute(ctx context.Context, args *commonpb.Payloads) (*commo return retPld.Payloads, nil } + +func (a *Activity) getPld() *payload.Payload { + return a.pldPool.Get().(*payload.Payload) +} + +func (a *Activity) putPld(pld *payload.Payload) { + pld.Codec = 0 + pld.Context = nil + pld.Body = nil + a.pldPool.Put(pld) +} diff --git a/aggregatedpool/handler.go b/aggregatedpool/handler.go index c8e98a25..0dba2a72 100644 --- a/aggregatedpool/handler.go +++ b/aggregatedpool/handler.go @@ -1,14 +1,14 @@ package aggregatedpool import ( + "context" "strconv" "sync/atomic" "time" - "github.com/roadrunner-server/api/v2/payload" - "github.com/roadrunner-server/api/v2/pool" "github.com/roadrunner-server/errors" - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/temporalio/roadrunner-temporal/v2/internal" commonpb "go.temporal.io/api/common/v1" bindings "go.temporal.io/sdk/internalbindings" "go.temporal.io/sdk/workflow" @@ -318,8 +318,8 @@ func (wp *Workflow) flushQueue() error { } if wp.mh != nil { - wp.mh.Gauge(RrWorkflowsMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) - defer wp.mh.Gauge(RrWorkflowsMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) + wp.mh.Gauge(RrWorkflowsMetricName).Update(float64(wp.pool.QueueSize())) + defer wp.mh.Gauge(RrWorkflowsMetricName).Update(float64(wp.pool.QueueSize())) } // todo(rustatian) to sync.Pool @@ -329,7 +329,7 @@ func (wp *Workflow) flushQueue() error { return err } - resp, err := wp.pool.Exec(pld) + resp, err := wp.pool.Exec(context.Background(), pld) if err != nil { return err } @@ -356,8 +356,8 @@ func (wp *Workflow) runCommand(cmd any, payloads *commonpb.Payloads, header *com msg := wp.mq.AllocateMessage(cmd, payloads, header) if wp.mh != nil { - wp.mh.Gauge(RrMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) - defer wp.mh.Gauge(RrMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) + wp.mh.Gauge(RrMetricName).Update(float64(wp.pool.QueueSize())) + defer wp.mh.Gauge(RrMetricName).Update(float64(wp.pool.QueueSize())) } pld := &payload.Payload{} @@ -366,7 +366,8 @@ func (wp *Workflow) runCommand(cmd any, payloads *commonpb.Payloads, header *com return nil, err } - resp, err := wp.pool.Exec(pld) + // todo(rustatian): do we need a timeout here?? + resp, err := wp.pool.Exec(context.Background(), pld) if err != nil { return nil, err } diff --git a/aggregatedpool/init.go b/aggregatedpool/init.go index 3e8ce173..37d1ec84 100644 --- a/aggregatedpool/init.go +++ b/aggregatedpool/init.go @@ -1,14 +1,15 @@ package aggregatedpool import ( + "context" "fmt" "time" "github.com/google/uuid" - "github.com/roadrunner-server/api/v2/payload" - "github.com/roadrunner-server/api/v2/pool" "github.com/roadrunner-server/errors" - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/temporalio/roadrunner-temporal/v2/common" + "github.com/temporalio/roadrunner-temporal/v2/internal" tActivity "go.temporal.io/sdk/activity" temporalClient "go.temporal.io/sdk/client" "go.temporal.io/sdk/worker" @@ -16,7 +17,7 @@ import ( "go.uber.org/zap" ) -func GetWorkerInfo(c Codec, p pool.Pool, rrVersion string, wi *[]*internal.WorkerInfo) error { +func GetWorkerInfo(c common.Codec, p common.Pool, rrVersion string, wi *[]*internal.WorkerInfo) error { const op = errors.Op("workflow_definition_init") // todo(rustatian): to sync.Pool @@ -26,7 +27,9 @@ func GetWorkerInfo(c Codec, p pool.Pool, rrVersion string, wi *[]*internal.Worke return errors.E(op, err) } - resp, err := p.Exec(pld) + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + resp, err := p.Exec(ctx, pld) if err != nil { return errors.E(op, err) } diff --git a/aggregatedpool/interface.go b/aggregatedpool/interface.go deleted file mode 100644 index 79816398..00000000 --- a/aggregatedpool/interface.go +++ /dev/null @@ -1,15 +0,0 @@ -package aggregatedpool - -import ( - "github.com/roadrunner-server/api/v2/payload" - "github.com/temporalio/roadrunner-temporal/internal" -) - -type Codec interface { - // Encode encodes messages and context to the payload for the worker - Encode(ctx *internal.Context, p *payload.Payload, msg ...*internal.Message) error - // Decode decodes payload from the worker to the proto-message - Decode(pld *payload.Payload, msg *[]*internal.Message) error - // DecodeWorkerInfo decode a call to get a worker info ID=0 (initial) - DecodeWorkerInfo(p *payload.Payload, wi *[]*internal.WorkerInfo) error -} diff --git a/aggregatedpool/workflow.go b/aggregatedpool/workflow.go index 9a408f2d..46e4c3b1 100644 --- a/aggregatedpool/workflow.go +++ b/aggregatedpool/workflow.go @@ -2,17 +2,18 @@ package aggregatedpool import ( "context" + "sync" "sync/atomic" "time" "github.com/google/uuid" - "github.com/roadrunner-server/api/v2/payload" - "github.com/roadrunner-server/api/v2/pool" "github.com/roadrunner-server/errors" - "github.com/temporalio/roadrunner-temporal/aggregatedpool/canceller" - "github.com/temporalio/roadrunner-temporal/aggregatedpool/queue" - "github.com/temporalio/roadrunner-temporal/aggregatedpool/registry" - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/temporalio/roadrunner-temporal/v2/canceller" + "github.com/temporalio/roadrunner-temporal/v2/common" + "github.com/temporalio/roadrunner-temporal/v2/internal" + "github.com/temporalio/roadrunner-temporal/v2/queue" + "github.com/temporalio/roadrunner-temporal/v2/registry" commonpb "go.temporal.io/api/common/v1" tActivity "go.temporal.io/sdk/activity" temporalClient "go.temporal.io/sdk/client" @@ -36,10 +37,12 @@ import ( type Callback func() error type Workflow struct { - codec Codec - pool pool.Pool + codec common.Codec + pool common.Pool client temporalClient.Client + pldPool *sync.Pool + env bindings.WorkflowEnvironment header *commonpb.Header mq *queue.MessageQueue @@ -59,7 +62,7 @@ type Workflow struct { mh temporalClient.MetricsHandler } -func NewWorkflowDefinition(codec Codec, dc converter.DataConverter, pool pool.Pool, log *zap.Logger, seqID func() uint64, client temporalClient.Client, gt time.Duration) *Workflow { +func NewWorkflowDefinition(codec common.Codec, dc converter.DataConverter, pool common.Pool, log *zap.Logger, seqID func() uint64, client temporalClient.Client, gt time.Duration) *Workflow { return &Workflow{ client: client, log: log, @@ -68,6 +71,11 @@ func NewWorkflowDefinition(codec Codec, dc converter.DataConverter, pool pool.Po graceTimeout: gt, dc: dc, pool: pool, + pldPool: &sync.Pool{ + New: func() any { + return new(payload.Payload) + }, + }, } } @@ -75,10 +83,11 @@ func NewWorkflowDefinition(codec Codec, dc converter.DataConverter, pool pool.Po // DO NOT USE THIS FUNCTION DIRECTLY!!!! func (wp *Workflow) NewWorkflowDefinition() bindings.WorkflowDefinition { return &Workflow{ - pool: wp.pool, - codec: wp.codec, - log: wp.log, - sID: wp.sID, + pool: wp.pool, + codec: wp.codec, + log: wp.log, + sID: wp.sID, + pldPool: wp.pldPool, } } @@ -209,8 +218,8 @@ func (wp *Workflow) execute(ctx context.Context, args *commonpb.Payloads) (*comm mh := tActivity.GetMetricsHandler(ctx) // if the mh is not nil, record the RR metric if mh != nil { - mh.Gauge(RrMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) - defer mh.Gauge(RrMetricName).Update(float64(wp.pool.(pool.Queuer).QueueSize())) + mh.Gauge(RrMetricName).Update(float64(wp.pool.QueueSize())) + defer mh.Gauge(RrMetricName).Update(float64(wp.pool.QueueSize())) } var msg = &internal.Message{ @@ -222,13 +231,15 @@ func (wp *Workflow) execute(ctx context.Context, args *commonpb.Payloads) (*comm Payloads: args, } - pld := &payload.Payload{} + pld := wp.getPld() + defer wp.putPld(pld) + err := wp.codec.Encode(&internal.Context{TaskQueue: info.TaskQueue}, pld, msg) if err != nil { return nil, err } - result, err := wp.pool.Exec(pld) + result, err := wp.pool.Exec(ctx, pld) if err != nil { return nil, errors.E(op, err) } @@ -254,3 +265,14 @@ func (wp *Workflow) execute(ctx context.Context, args *commonpb.Payloads) (*comm return retPld.Payloads, nil } + +func (wp *Workflow) getPld() *payload.Payload { + return wp.pldPool.Get().(*payload.Payload) +} + +func (wp *Workflow) putPld(pld *payload.Payload) { + pld.Codec = 0 + pld.Context = nil + pld.Body = nil + wp.pldPool.Put(pld) +} diff --git a/aggregatedpool/canceller/canceller.go b/canceller/canceller.go similarity index 100% rename from aggregatedpool/canceller/canceller.go rename to canceller/canceller.go diff --git a/aggregatedpool/canceller/canceller_test.go b/canceller/canceller_test.go similarity index 100% rename from aggregatedpool/canceller/canceller_test.go rename to canceller/canceller_test.go diff --git a/common/interfaces.go b/common/interfaces.go new file mode 100644 index 00000000..014bde59 --- /dev/null +++ b/common/interfaces.go @@ -0,0 +1,58 @@ +package common + +import ( + "context" + "time" + + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/roadrunner-server/sdk/v3/pool" + staticPool "github.com/roadrunner-server/sdk/v3/pool/static_pool" + "github.com/roadrunner-server/sdk/v3/state/process" + "github.com/roadrunner-server/sdk/v3/worker" + "github.com/temporalio/roadrunner-temporal/v2/internal" + "go.uber.org/zap" +) + +type Pool interface { + // Workers returns worker list associated with the pool. + Workers() (workers []*worker.Process) + // QueueSize can be implemented on the pool to provide the requests queue information + QueueSize() uint64 + // Reset kill all workers inside the watcher and replaces with new + Reset(ctx context.Context) error + // Exec payload + Exec(ctx context.Context, p *payload.Payload) (*payload.Payload, error) +} + +type Codec interface { + // Encode encodes messages and context to the payload for the worker + Encode(ctx *internal.Context, p *payload.Payload, msg ...*internal.Message) error + // Decode decodes payload from the worker to the proto-message + Decode(pld *payload.Payload, msg *[]*internal.Message) error + // DecodeWorkerInfo decode a call to get a worker info ID=0 (initial) + DecodeWorkerInfo(p *payload.Payload, wi *[]*internal.WorkerInfo) error +} + +// Informer used to get workers from particular plugin or set of plugins +type Informer interface { + Workers() []*process.State +} + +type Configurer interface { + // UnmarshalKey takes a single key and unmarshal it into a Struct. + UnmarshalKey(name string, out any) error + + // Has checks if config section exists. + Has(name string) bool + + // GracefulTimeout represents timeout for all servers registered in the endure + GracefulTimeout() time.Duration + + // RRVersion returns running RR version + RRVersion() string +} + +// Server creates workers for the application. +type Server interface { + NewPool(ctx context.Context, cfg *pool.Config, env map[string]string, _ *zap.Logger) (*staticPool.Pool, error) +} diff --git a/config.go b/config.go index 44ab7d26..eb68e596 100644 --- a/config.go +++ b/config.go @@ -6,7 +6,7 @@ import ( "time" "github.com/roadrunner-server/errors" - "github.com/roadrunner-server/sdk/v2/pool" + "github.com/roadrunner-server/sdk/v3/pool" ) const ( diff --git a/go.mod b/go.mod index 78d79bd7..bd70b0ca 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/temporalio/roadrunner-temporal +module github.com/temporalio/roadrunner-temporal/v2 go 1.19 @@ -7,9 +7,8 @@ require ( github.com/goccy/go-json v0.9.11 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 - github.com/roadrunner-server/api/v2 v2.23.0 github.com/roadrunner-server/errors v1.2.0 - github.com/roadrunner-server/sdk/v2 v2.19.0 + github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3 github.com/stretchr/testify v1.8.0 github.com/uber-go/tally/v4 v4.1.2 go.temporal.io/api v1.12.0 @@ -39,7 +38,7 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - github.com/roadrunner-server/goridge/v3 v3.5.3 // indirect + github.com/roadrunner-server/goridge/v3 v3.6.1 // indirect github.com/roadrunner-server/tcplisten v1.2.0 // indirect github.com/robfig/cron v1.2.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect @@ -51,12 +50,12 @@ require ( 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-20221002022538-bcab6841153b // indirect + golang.org/x/net v0.0.0-20221004154528-8021a29435af // indirect golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 // indirect - golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect + golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91 // indirect - google.golang.org/grpc v1.49.0 + google.golang.org/grpc v1.50.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7c6e2314..4a614ad7 100644 --- a/go.sum +++ b/go.sum @@ -290,14 +290,12 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/roadrunner-server/api/v2 v2.23.0 h1:FCpVZWl7fZZqBdD/Z4HCVgQ+vKbqARneji20mp3iqDM= -github.com/roadrunner-server/api/v2 v2.23.0/go.mod h1:UrOUfDFw0927h/PWv7f8PPcwfdHkwf8txWbmqszL7UA= github.com/roadrunner-server/errors v1.2.0 h1:qBmNXt8Iex9QnYTjCkbJKsBZu2EtYkQCM06GUDcQBbI= github.com/roadrunner-server/errors v1.2.0/go.mod h1:z0ECxZp/dDa5RahtMcy4mBIavVxiZ9vwE5kByl7kFtY= -github.com/roadrunner-server/goridge/v3 v3.5.3 h1:DZFKj2w2YLqQ8XWPP6MTX5JMRkv0lUTttpjTAWoq42M= -github.com/roadrunner-server/goridge/v3 v3.5.3/go.mod h1:ju0NNhhw9G1M8aCNsC0T0/2+aQ9yEHztrWIMlzv4LpE= -github.com/roadrunner-server/sdk/v2 v2.19.0 h1:ODeNTR0002SDAMsn6YeDw94kSQbhJf8qJ8o+J90ucwQ= -github.com/roadrunner-server/sdk/v2 v2.19.0/go.mod h1:7mS8y12roUB8T4c66+yf+qoIVhmIa3E2fByUcYP1DxQ= +github.com/roadrunner-server/goridge/v3 v3.6.1 h1:AnMCHWOxNdyswJUKpcTFRRPCqL1WippAXIjC0GchIgw= +github.com/roadrunner-server/goridge/v3 v3.6.1/go.mod h1:ju0NNhhw9G1M8aCNsC0T0/2+aQ9yEHztrWIMlzv4LpE= +github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3 h1:v3JRjemghzdQr1+XpvS/2kkLRuRNhoOxYB7+cvIpNzg= +github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3/go.mod h1:TEQZXEEMfEObT4e9tjyFVTOsOhO22yl+2NNZFZT2B5w= github.com/roadrunner-server/tcplisten v1.2.0 h1:nsiXEEb0zP7vjAsCWNHKpM0HdwFK/KlafFF/2gsTJlg= github.com/roadrunner-server/tcplisten v1.2.0/go.mod h1:NhumKvt7dbIKVNZnqR1fA4ET1D8ngIKsg0TxnuJTL6A= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= @@ -467,8 +465,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221002022538-bcab6841153b h1:6e93nYa3hNqAvLr0pD4PN1fFS+gKzp2zAXqrnTCstqU= -golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221004154528-8021a29435af h1:wv66FM3rLZGPdxpYL+ApnDe2HzHcTFta3z5nsc13wI4= +golang.org/x/net v0.0.0-20221004154528-8021a29435af/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -578,8 +576,8 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 h1:AzgQNqF+FKwyQ5LbVrVqOcuuFB67N47F9+htZYH0wFM= +golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -826,8 +824,9 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0 h1:fPVVDxY9w++VjTZsYvXWqEf9Rqar/e+9zYfxKK+W+YU= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/internal/codec/proto/proto.go b/internal/codec/proto/proto.go index dd3e499f..b129c4e6 100644 --- a/internal/codec/proto/proto.go +++ b/internal/codec/proto/proto.go @@ -4,10 +4,10 @@ import ( "sync" "github.com/goccy/go-json" - "github.com/roadrunner-server/api/v2/payload" "github.com/roadrunner-server/errors" - "github.com/temporalio/roadrunner-temporal/internal" - protocolV1 "github.com/temporalio/roadrunner-temporal/proto/protocol/v1" + "github.com/roadrunner-server/sdk/v3/payload" + "github.com/temporalio/roadrunner-temporal/v2/internal" + protocolV1 "github.com/temporalio/roadrunner-temporal/v2/proto/protocol/v1" "go.temporal.io/sdk/converter" "go.uber.org/zap" "google.golang.org/protobuf/proto" diff --git a/metrics.go b/metrics.go index 2efaf541..4afa2003 100644 --- a/metrics.go +++ b/metrics.go @@ -6,8 +6,8 @@ import ( "github.com/cactus/go-statsd-client/statsd" prom "github.com/prometheus/client_golang/prometheus" - "github.com/roadrunner-server/api/v2/plugins/informer" - "github.com/roadrunner-server/sdk/v2/metrics" + "github.com/roadrunner-server/sdk/v3/metrics" + "github.com/temporalio/roadrunner-temporal/v2/common" "github.com/uber-go/tally/v4" "github.com/uber-go/tally/v4/prometheus" statsdreporter "go.temporal.io/server/common/metrics/tally/statsd" @@ -24,7 +24,7 @@ const ( namespace = "rr_temporal" ) -func newStatsExporter(stats informer.Informer) *metrics.StatsExporter { +func newStatsExporter(stats common.Informer) *metrics.StatsExporter { return &metrics.StatsExporter{ TotalMemoryDesc: prom.NewDesc(prom.BuildFQName(namespace, "", "workers_memory_bytes"), "Memory usage by workers", nil, nil), StateDesc: prom.NewDesc(prom.BuildFQName(namespace, "", "worker_state"), "Worker current state", []string{"state", "pid"}, nil), diff --git a/plugin.go b/plugin.go index 3feca921..eb32fcc5 100644 --- a/plugin.go +++ b/plugin.go @@ -13,21 +13,17 @@ import ( "sync/atomic" "time" - "github.com/roadrunner-server/api/v2/event_bus" - "github.com/roadrunner-server/api/v2/plugins/config" - "github.com/roadrunner-server/api/v2/plugins/server" - rrPool "github.com/roadrunner-server/api/v2/pool" - "github.com/roadrunner-server/api/v2/state/process" "github.com/roadrunner-server/errors" - "github.com/roadrunner-server/sdk/v2/events" - "github.com/roadrunner-server/sdk/v2/metrics" - poolImpl "github.com/roadrunner-server/sdk/v2/pool" - processImpl "github.com/roadrunner-server/sdk/v2/state/process" - "github.com/temporalio/roadrunner-temporal/aggregatedpool" - "github.com/temporalio/roadrunner-temporal/data_converter" - "github.com/temporalio/roadrunner-temporal/internal" - "github.com/temporalio/roadrunner-temporal/internal/codec/proto" - "github.com/temporalio/roadrunner-temporal/internal/logger" + "github.com/roadrunner-server/sdk/v3/events" + "github.com/roadrunner-server/sdk/v3/metrics" + "github.com/roadrunner-server/sdk/v3/pool" + "github.com/roadrunner-server/sdk/v3/state/process" + "github.com/temporalio/roadrunner-temporal/v2/aggregatedpool" + "github.com/temporalio/roadrunner-temporal/v2/common" + "github.com/temporalio/roadrunner-temporal/v2/data_converter" + "github.com/temporalio/roadrunner-temporal/v2/internal" + "github.com/temporalio/roadrunner-temporal/v2/internal/codec/proto" + "github.com/temporalio/roadrunner-temporal/v2/internal/logger" "github.com/uber-go/tally/v4/prometheus" temporalClient "go.temporal.io/sdk/client" "go.temporal.io/sdk/contrib/tally" @@ -62,7 +58,7 @@ const ( type Plugin struct { mu sync.RWMutex - server server.Server + server common.Server log *zap.Logger config *Config tallyCloser io.Closer @@ -71,8 +67,8 @@ type Plugin struct { client temporalClient.Client dataConverter converter.DataConverter - actP rrPool.Pool - wfP rrPool.Pool + actP common.Pool + wfP common.Pool wwPID int rrVersion string @@ -82,9 +78,9 @@ type Plugin struct { activities map[string]*internal.ActivityInfo codec *proto.Codec - eventBus event_bus.EventBus + eventBus events.EventBus id string - events chan event_bus.Event + events chan events.Event stopCh chan struct{} seqID uint64 @@ -92,7 +88,7 @@ type Plugin struct { graceTimeout time.Duration } -func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, server server.Server) error { +func (p *Plugin) Init(cfg common.Configurer, log *zap.Logger, server common.Server) error { const op = errors.Op("temporal_plugin_init") if !cfg.Has(PluginName) { @@ -142,8 +138,8 @@ func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, server server.Serv p.rrVersion = cfg.RRVersion() // events - p.events = make(chan event_bus.Event, 1) - p.eventBus, p.id = events.Bus() + p.events = make(chan events.Event, 1) + p.eventBus, p.id = events.NewEventBus() p.stopCh = make(chan struct{}, 1) p.statsExporter = newStatsExporter(p) @@ -354,7 +350,7 @@ func (p *Plugin) Workers() []*process.State { states := make([]*process.State, 0, len(wfPw)+len(actPw)) for i := 0; i < len(wfPw); i++ { - st, err := processImpl.WorkerProcessState(wfPw[i]) + st, err := process.WorkerProcessState(wfPw[i]) if err != nil { // log error and continue p.log.Error("worker process state error", zap.Error(err)) @@ -365,7 +361,7 @@ func (p *Plugin) Workers() []*process.State { } for i := 0; i < len(actPw); i++ { - st, err := processImpl.WorkerProcessState(actPw[i]) + st, err := process.WorkerProcessState(actPw[i]) if err != nil { // log error and continue p.log.Error("worker process state error", zap.Error(err)) @@ -486,7 +482,7 @@ func rewriteNameAndVersion(ctx context.Context, method string, req, reply interf func (p *Plugin) initPool() error { var err error - ap, err := p.server.NewWorkerPool(context.Background(), p.config.Activities, map[string]string{RrMode: PluginName, RrCodec: RrCodecVal}, p.log) + ap, err := p.server.NewPool(context.Background(), p.config.Activities, map[string]string{RrMode: PluginName, RrCodec: RrCodecVal}, p.log) if err != nil { return err } @@ -494,9 +490,9 @@ func (p *Plugin) initPool() error { p.rrActivityDef = aggregatedpool.NewActivityDefinition(p.codec, ap, p.log, p.dataConverter, p.client, p.graceTimeout) // ---------- WORKFLOW POOL ------------- - wp, err := p.server.NewWorkerPool( + wp, err := p.server.NewPool( context.Background(), - &poolImpl.Config{ + &pool.Config{ NumWorkers: 1, Command: p.config.Activities.Command, AllocateTimeout: time.Hour * 240, diff --git a/aggregatedpool/queue/queue.go b/queue/queue.go similarity index 96% rename from aggregatedpool/queue/queue.go rename to queue/queue.go index 690338a9..ac5726ab 100644 --- a/aggregatedpool/queue/queue.go +++ b/queue/queue.go @@ -1,7 +1,7 @@ package queue import ( - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/temporalio/roadrunner-temporal/v2/internal" "go.temporal.io/api/common/v1" "go.temporal.io/api/failure/v1" ) diff --git a/aggregatedpool/queue/queue_test.go b/queue/queue_test.go similarity index 94% rename from aggregatedpool/queue/queue_test.go rename to queue/queue_test.go index e2132772..0d99128a 100644 --- a/aggregatedpool/queue/queue_test.go +++ b/queue/queue_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/temporalio/roadrunner-temporal/internal" + "github.com/temporalio/roadrunner-temporal/v2/internal" "go.temporal.io/api/common/v1" "go.temporal.io/api/failure/v1" ) diff --git a/aggregatedpool/registry/registry.go b/registry/registry.go similarity index 100% rename from aggregatedpool/registry/registry.go rename to registry/registry.go From 1f5037c2c82e842529f72547c07435ff42283642 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 10 Oct 2022 13:31:19 +0200 Subject: [PATCH 2/5] update ci Signed-off-by: Valery Piashchynski --- .github/workflows/linters.yml | 2 +- .golangci.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 3eccd652..d5b4c05c 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -18,6 +18,6 @@ jobs: - name: Run linter uses: golangci/golangci-lint-action@v3.2.0 # Action page: with: - version: v1.49 # without patch version + version: v1.50 # without patch version only-new-issues: false # show only new issues if it's a pull request args: --timeout=10m --build-tags=safe diff --git a/.golangci.yml b/.golangci.yml index 89ebb588..b466e53d 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,6 @@ # Documentation: run: - go: '1.17' timeout: 1m skip-dirs: - .github @@ -68,7 +67,6 @@ linters: # All available linters list: Date: Tue, 11 Oct 2022 09:10:45 +0200 Subject: [PATCH 3/5] modules: update deps Signed-off-by: Valery Piashchynski --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index bd70b0ca..d3703ae7 100644 --- a/go.mod +++ b/go.mod @@ -10,11 +10,11 @@ require ( github.com/roadrunner-server/errors v1.2.0 github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3 github.com/stretchr/testify v1.8.0 - github.com/uber-go/tally/v4 v4.1.2 + 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/sdk/contrib/tally v0.2.0 - go.temporal.io/server v1.18.0 + go.temporal.io/server v1.18.1 go.uber.org/zap v1.23.0 google.golang.org/protobuf v1.28.1 ) @@ -52,10 +52,10 @@ require ( go.uber.org/multierr v1.8.0 // indirect golang.org/x/net v0.0.0-20221004154528-8021a29435af // indirect golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 // indirect - golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect + golang.org/x/sys v0.0.0-20221010170243-090e33056c14 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect - google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91 // indirect + google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e // indirect google.golang.org/grpc v1.50.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 4a614ad7..6bb255ee 100644 --- a/go.sum +++ b/go.sum @@ -331,8 +331,8 @@ github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/uber-go/tally/v4 v4.1.1/go.mod h1:aXeSTDMl4tNosyf6rdU8jlgScHyjEGGtfJ/uwCIf/vM= -github.com/uber-go/tally/v4 v4.1.2 h1:NlU/4j+AAaPHG7yxQVmu0QY7H0W9FFDjFznwAU0t+rE= -github.com/uber-go/tally/v4 v4.1.2/go.mod h1:aXeSTDMl4tNosyf6rdU8jlgScHyjEGGtfJ/uwCIf/vM= +github.com/uber-go/tally/v4 v4.1.3 h1:dKhkrkVSSJK0AxZCv/MmK5JrWmH+MPG3dgZCbxWk2Yc= +github.com/uber-go/tally/v4 v4.1.3/go.mod h1:aXeSTDMl4tNosyf6rdU8jlgScHyjEGGtfJ/uwCIf/vM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -358,8 +358,8 @@ go.temporal.io/sdk v1.17.0 h1:5zF4nBg35R7V+J/m8ke2tIWJNpiqRK2EpWZBQkVQCEc= go.temporal.io/sdk v1.17.0/go.mod h1:EybaEzZSigK4Pr0wBbP1cb4VrCEf8ZowcigT7LCgsMU= go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34MnWDRrOo= go.temporal.io/sdk/contrib/tally v0.2.0/go.mod h1:1kpSuCms/tHeJQDPuuKkaBsMqfHnIIRnCtUYlPNXxuE= -go.temporal.io/server v1.18.0 h1:FxA4ckBB/ryVpdJGJXQ23KSvuG37WwR7rHKFSszRras= -go.temporal.io/server v1.18.0/go.mod h1:66GmtRD75LKrEMdGBSiCqySE9WzpTWf5vLxejRwyZIY= +go.temporal.io/server v1.18.1 h1:uW28z5OF1UPQHLa9qNPc9dgrT98ZM/XEMTmEUJjykAk= +go.temporal.io/server v1.18.1/go.mod h1:66GmtRD75LKrEMdGBSiCqySE9WzpTWf5vLxejRwyZIY= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -576,8 +576,8 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 h1:AzgQNqF+FKwyQ5LbVrVqOcuuFB67N47F9+htZYH0wFM= -golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14 h1:k5II8e6QD8mITdi+okbbmR/cIyEbeXLBhy5Ha4nevyc= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -789,8 +789,8 @@ google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220902135211-223410557253/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20220909194730-69f6226f97e5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91 h1:Ezh2cpcnP5Rq60sLensUsFnxh7P6513NLvNtCm9iyJ4= -google.golang.org/genproto v0.0.0-20220930163606-c98284e70a91/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e h1:halCgTFuLWDRD61piiNSxPsARANGD3Xl16hPrLgLiIg= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= 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.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= From 40c7d564e8c91a2b2a5878d7f8936f76f4904398 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 13 Oct 2022 17:59:17 +0200 Subject: [PATCH 4/5] modules: update deps Signed-off-by: Valery Piashchynski --- go.mod | 6 +++--- go.sum | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index d3703ae7..22d00945 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 github.com/roadrunner-server/errors v1.2.0 - github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3 + github.com/roadrunner-server/sdk/v3 v3.0.0-beta.4 github.com/stretchr/testify v1.8.0 github.com/uber-go/tally/v4 v4.1.3 go.temporal.io/api v1.12.0 @@ -50,10 +50,10 @@ require ( 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-20221004154528-8021a29435af // indirect + golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458 // indirect golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 // indirect golang.org/x/sys v0.0.0-20221010170243-090e33056c14 // indirect - golang.org/x/text v0.3.7 // 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 google.golang.org/grpc v1.50.0 diff --git a/go.sum b/go.sum index 6bb255ee..ef1a669e 100644 --- a/go.sum +++ b/go.sum @@ -294,8 +294,8 @@ github.com/roadrunner-server/errors v1.2.0 h1:qBmNXt8Iex9QnYTjCkbJKsBZu2EtYkQCM0 github.com/roadrunner-server/errors v1.2.0/go.mod h1:z0ECxZp/dDa5RahtMcy4mBIavVxiZ9vwE5kByl7kFtY= github.com/roadrunner-server/goridge/v3 v3.6.1 h1:AnMCHWOxNdyswJUKpcTFRRPCqL1WippAXIjC0GchIgw= github.com/roadrunner-server/goridge/v3 v3.6.1/go.mod h1:ju0NNhhw9G1M8aCNsC0T0/2+aQ9yEHztrWIMlzv4LpE= -github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3 h1:v3JRjemghzdQr1+XpvS/2kkLRuRNhoOxYB7+cvIpNzg= -github.com/roadrunner-server/sdk/v3 v3.0.0-beta.3/go.mod h1:TEQZXEEMfEObT4e9tjyFVTOsOhO22yl+2NNZFZT2B5w= +github.com/roadrunner-server/sdk/v3 v3.0.0-beta.4 h1:jrBpY72kXYTkfQ00RME2HaW/m9+L4jYLujdkhW2/uwE= +github.com/roadrunner-server/sdk/v3 v3.0.0-beta.4/go.mod h1:QnhQ/Ib3uYXSVF0N9F7Accozx/nLkvRdGgufOJq5WfA= github.com/roadrunner-server/tcplisten v1.2.0 h1:nsiXEEb0zP7vjAsCWNHKpM0HdwFK/KlafFF/2gsTJlg= github.com/roadrunner-server/tcplisten v1.2.0/go.mod h1:NhumKvt7dbIKVNZnqR1fA4ET1D8ngIKsg0TxnuJTL6A= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= @@ -465,8 +465,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221004154528-8021a29435af h1:wv66FM3rLZGPdxpYL+ApnDe2HzHcTFta3z5nsc13wI4= -golang.org/x/net v0.0.0-20221004154528-8021a29435af/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458 h1:MgJ6t2zo8v0tbmLCueaCbF1RM+TtB0rs3Lv8DGtOIpY= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -588,8 +588,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 46390df8d8766f637194489abffd3b618b1f4031 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 13 Oct 2022 18:55:15 +0200 Subject: [PATCH 5/5] feat: update version Signed-off-by: Valery Piashchynski --- plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index eb32fcc5..8f81b218 100644 --- a/plugin.go +++ b/plugin.go @@ -52,7 +52,7 @@ const ( clientNameHeaderName = "client-name" clientNameHeaderValue = "roadrunner-temporal" clientVersionHeaderName = "client-version" - clientVersionHeaderValue = "1.6.2" + clientVersionHeaderValue = "2.0.0" ) type Plugin struct {