From 44ff2d573a5bfbba715c8d7673642223690f368b Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 22 Feb 2024 00:23:28 +0100 Subject: [PATCH 01/19] fix: async updates handler Signed-off-by: Valery Piashchynski --- aggregatedpool/handler.go | 96 ++++++++++++++++++++------------------ aggregatedpool/workflow.go | 50 +++++++++++++------- internal/protocol.go | 22 +++++++++ 3 files changed, 107 insertions(+), 61 deletions(-) diff --git a/aggregatedpool/handler.go b/aggregatedpool/handler.go index 021b8616..940ed995 100644 --- a/aggregatedpool/handler.go +++ b/aggregatedpool/handler.go @@ -38,56 +38,59 @@ func (wp *Workflow) getContext() *internal.Context { func (wp *Workflow) handleUpdate(name string, id string, input *commonpb.Payloads, header *commonpb.Header, callbacks bindings.UpdateCallbacks) { wp.log.Debug("update request received", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id)) - wp.updatesQueue = append(wp.updatesQueue, name) + // save update name + wp.updatesQueue[name] = struct{}{} rid := wp.env.WorkflowInfo().WorkflowExecution.RunID // this callback executed in the OnTick function - callback := func() { - // we don't execute update validation during replay - if !wp.env.IsReplaying() { - result, err := wp.runCommand(internal.InvokeUpdate{ - RunID: rid, - UpdateID: id, - Name: name, - Type: validate, - }, input, header) - - if err != nil { - callbacks.Reject(err) - return + updatesQueueCb := func() { + wp.updateValidateCb[id] = func(msg *internal.Message) { + if !wp.env.IsReplaying() { + // before accept we have only one option - reject + if msg.Failure != nil { + callbacks.Reject(temporal.GetDefaultFailureConverter().FailureToError(msg.Failure)) + return + } + + callbacks.Accept() } - // before accept we have only one option - reject - if result.Failure != nil { - callbacks.Reject(temporal.GetDefaultFailureConverter().FailureToError(result.Failure)) - return + wp.mq.PushCommand( + &internal.InvokeUpdate{ + RunID: rid, + UpdateID: id, + Name: name, + Type: execute, + }, + input, + header, + ) + + wp.updateCompleteCb[id] = func(res *internal.Message) { + wp.log.Debug("update request result", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", res)) + if res.Failure != nil { + callbacks.Complete(nil, temporal.GetDefaultFailureConverter().FailureToError(res.Failure)) + return + } + + callbacks.Complete(res.Payloads, nil) } } - callbacks.Accept() - - result, err := wp.runCommand(internal.InvokeUpdate{ - RunID: rid, - UpdateID: id, - Name: name, - Type: execute, - }, input, header) - - if err != nil { - callbacks.Complete(nil, err) - return - } - - wp.log.Debug("update request result", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", result)) - if result.Failure != nil { - callbacks.Complete(nil, temporal.GetDefaultFailureConverter().FailureToError(result.Failure)) - return - } - - callbacks.Complete(result.Payloads, nil) + // push validate command + wp.mq.PushCommand( + &internal.InvokeUpdate{ + RunID: rid, + UpdateID: id, + Name: name, + Type: validate, + }, + input, + header, + ) } - wp.env.QueueUpdate(name, callback) + wp.env.QueueUpdate(name, updatesQueueCb) } // schedule cancel command @@ -234,6 +237,14 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error { wp.createContinuableCallback(msg.ID, "SideEffect"), ) + case *internal.UpdateCompleted: + wp.updateCompleteCb[command.ID](msg) + delete(wp.updateCompleteCb, command.ID) + + case *internal.UpdateValidated: + wp.updateValidateCb[command.ID](msg) + delete(wp.updateValidateCb, command.ID) + case *internal.CompleteWorkflow: wp.log.Debug("complete workflow request", zap.Uint64("ID", msg.ID)) result, _ := wp.env.GetDataConverter().ToPayloads(completed) @@ -450,11 +461,6 @@ func (wp *Workflow) flushQueue() error { return err } wp.mq.Flush() - - if err != nil { - return errors.E(op, err) - } - wp.pipeline = append(wp.pipeline, msgs...) return nil diff --git a/aggregatedpool/workflow.go b/aggregatedpool/workflow.go index 2d0dbbe0..9b5051a3 100644 --- a/aggregatedpool/workflow.go +++ b/aggregatedpool/workflow.go @@ -51,11 +51,15 @@ type Workflow struct { ids *registry.IDRegistry seqID uint64 pipeline []*internal.Message - updatesQueue []string + updatesQueue map[string]struct{} callbacks []Callback canceller *canceller.Canceller inLoop uint32 + // updates + updateValidateCb map[string]func(res *internal.Message) + updateCompleteCb map[string]func(res *internal.Message) + log *zap.Logger mh temporalClient.MetricsHandler @@ -65,10 +69,14 @@ type Workflow struct { func NewWorkflowDefinition(codec common.Codec, pool common.Pool, log *zap.Logger) *Workflow { return &Workflow{ - rrID: uuid.NewString(), - log: log, - codec: codec, - pool: pool, + rrID: uuid.NewString(), + updateValidateCb: make(map[string]func(res *internal.Message)), + updateCompleteCb: make(map[string]func(res *internal.Message)), + + updatesQueue: map[string]struct{}{}, + log: log, + codec: codec, + pool: pool, pldPool: &sync.Pool{ New: func() any { return new(payload.Payload) @@ -81,7 +89,12 @@ func NewWorkflowDefinition(codec common.Codec, pool common.Pool, log *zap.Logger // DO NOT USE THIS FUNCTION DIRECTLY!!!! func (wp *Workflow) NewWorkflowDefinition() bindings.WorkflowDefinition { return &Workflow{ - rrID: uuid.NewString(), + rrID: uuid.NewString(), + // updates logic + updateValidateCb: make(map[string]func(res *internal.Message)), + updateCompleteCb: make(map[string]func(res *internal.Message)), + updatesQueue: map[string]struct{}{}, + // -- updates pool: wp.pool, codec: wp.codec, log: wp.log, @@ -101,7 +114,6 @@ func (wp *Workflow) Execute(env bindings.WorkflowEnvironment, header *commonpb.H wp.env = env wp.header = header wp.seqID = 0 - wp.updatesQueue = make([]string, 0, 1) wp.canceller = new(canceller.Canceller) // sequenceID shared for all pool workflows @@ -160,20 +172,21 @@ func (wp *Workflow) OnWorkflowTaskStarted(t time.Duration) { wp.callbacks = nil - // at first, we should flush our queue with command, e.g.: startWorkflow - err = wp.flushQueue() - if err != nil { - panic(err) - } - // handle updates if len(wp.updatesQueue) > 0 { - for i := 0; i < len(wp.updatesQueue); i++ { - wp.env.HandleQueuedUpdates(wp.updatesQueue[i]) + for k := range wp.updatesQueue { + wp.env.HandleQueuedUpdates(k) + delete(wp.updatesQueue, k) } } // clean - wp.updatesQueue = make([]string, 0, 1) + wp.updatesQueue = map[string]struct{}{} + + // at first, we should flush our queue with command, e.g.: startWorkflow + err = wp.flushQueue() + if err != nil { + panic(err) + } for len(wp.pipeline) > 0 { msg := wp.pipeline[0] @@ -228,6 +241,11 @@ func (wp *Workflow) Close() { if wp.env.DrainUnhandledUpdates() { wp.log.Info("drained unhandled updates") } + + // clean the map + for k := range wp.updatesQueue { + delete(wp.updatesQueue, k) + } // send destroy command _, _ = wp.runCommand(internal.DestroyWorkflow{RunID: wp.env.WorkflowInfo().WorkflowExecution.RunID}, nil, wp.header) // flush queue diff --git a/internal/protocol.go b/internal/protocol.go index f4e52ade..d92605d5 100644 --- a/internal/protocol.go +++ b/internal/protocol.go @@ -35,6 +35,8 @@ const ( sideEffectCommand = "SideEffect" getVersionCommand = "GetVersion" completeWorkflowCommand = "CompleteWorkflow" + completeUpdateCommand = "UpdateCompleted" + validateUpdateCommand = "UpdateValidated" continueAsNewCommand = "ContinueAsNew" upsertWorkflowSearchAttributesCommand = "UpsertWorkflowSearchAttributes" @@ -238,6 +240,16 @@ type GetVersion struct { // CompleteWorkflow sent by worker to complete workflow. Might include additional error as part of the payload. type CompleteWorkflow struct{} +// CompleteUpdate sent by worker to complete update +type UpdateCompleted struct { + ID string `json:"id"` +} + +// UpdateValidated sent by worker to validate update +type UpdateValidated struct { + ID string `json:"id"` +} + // ContinueAsNew restarts workflow with new running instance. type ContinueAsNew struct { // Result defines workflow execution result. @@ -410,6 +422,10 @@ func CommandName(cmd any) (string, error) { return sideEffectCommand, nil case CompleteWorkflow, *CompleteWorkflow: return completeWorkflowCommand, nil + case UpdateCompleted, *UpdateCompleted: + return completeWorkflowCommand, nil + case UpdateValidated, *UpdateValidated: + return validateUpdateCommand, nil case ContinueAsNew, *ContinueAsNew: return continueAsNewCommand, nil case UpsertWorkflowSearchAttributes, *UpsertWorkflowSearchAttributes: @@ -481,6 +497,12 @@ func InitCommand(name string) (any, error) { case completeWorkflowCommand: return &CompleteWorkflow{}, nil + case completeUpdateCommand: + return &UpdateCompleted{}, nil + + case validateUpdateCommand: + return &UpdateValidated{}, nil + case continueAsNewCommand: return &ContinueAsNew{}, nil From 7556d1fb6487ae1556b89d9af97c335daed59bca Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 22 Feb 2024 00:35:48 +0100 Subject: [PATCH 02/19] chore: add more logs and checks Signed-off-by: Valery Piashchynski --- aggregatedpool/handler.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/aggregatedpool/handler.go b/aggregatedpool/handler.go index 940ed995..6667ee8a 100644 --- a/aggregatedpool/handler.go +++ b/aggregatedpool/handler.go @@ -238,10 +238,36 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error { ) case *internal.UpdateCompleted: + wp.log.Debug("complete update request", zap.String("update id", command.ID)) + + if command.ID == "" { + wp.log.Error("update id is empty, can't complete update", zap.String("workflow id", wp.env.WorkflowInfo().WorkflowExecution.ID), zap.String("run id", wp.env.WorkflowInfo().WorkflowExecution.RunID)) + return errors.Str("update id is empty, can't complete update") + } + + if _, ok := wp.updateCompleteCb[command.ID]; !ok { + wp.log.Warn("no such update ID, can't complete update", zap.String("requested id", command.ID)) + // TODO(rustatian): error here? + return nil + } + wp.updateCompleteCb[command.ID](msg) delete(wp.updateCompleteCb, command.ID) case *internal.UpdateValidated: + wp.log.Debug("validate update request", zap.String("update id", command.ID)) + + if command.ID == "" { + wp.log.Error("update id is empty, can't validate update", zap.String("workflow id", wp.env.WorkflowInfo().WorkflowExecution.ID), zap.String("run id", wp.env.WorkflowInfo().WorkflowExecution.RunID)) + return errors.Str("update id is empty, can't validate update") + } + + if _, ok := wp.updateCompleteCb[command.ID]; !ok { + wp.log.Warn("no such update ID, can't validate update", zap.String("requested id", command.ID)) + // TODO(rustatian): error here? + return nil + } + wp.updateValidateCb[command.ID](msg) delete(wp.updateValidateCb, command.ID) From e6f77b728943ab2fea73bf5930141ec93cb976f7 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 22 Feb 2024 22:56:15 +0100 Subject: [PATCH 03/19] chore: refactor all tests, update updates handler Signed-off-by: Valery Piashchynski --- aggregatedpool/handler.go | 41 +- aggregatedpool/workflow.go | 21 +- go.mod | 15 +- go.sum | 16 + go.work.sum | 7 +- tests/cancel_test.go | 32 +- tests/child_test.go | 16 +- tests/disaster_test.go | 26 +- tests/env/docker-compose-temporal_arm.yaml | 4 + tests/general_test.go | 2 +- tests/go.mod | 14 +- tests/go.sum | 16 + tests/helpers.go | 127 +-- tests/hp_test.go | 62 +- tests/metrics_test.go | 34 +- tests/php_test_files/composer.json | 2 +- tests/php_test_files/composer.lock | 748 ++++++++++-------- .../src/Workflow/UpdateWorkflow.php | 91 +++ tests/query_test.go | 8 +- tests/rpc_test.go | 2 +- tests/signal_test.go | 20 +- tests/updates_test.go | 95 +++ 22 files changed, 774 insertions(+), 625 deletions(-) create mode 100644 tests/php_test_files/src/Workflow/UpdateWorkflow.php create mode 100644 tests/updates_test.go diff --git a/aggregatedpool/handler.go b/aggregatedpool/handler.go index 6667ee8a..0176a109 100644 --- a/aggregatedpool/handler.go +++ b/aggregatedpool/handler.go @@ -20,8 +20,7 @@ import ( const ( completed string = "completed" // update types - validate string = "validate" - execute string = "execute" + valExec string = "validate_execute" ) // execution context. @@ -44,7 +43,9 @@ func (wp *Workflow) handleUpdate(name string, id string, input *commonpb.Payload // this callback executed in the OnTick function updatesQueueCb := func() { + // validate callback wp.updateValidateCb[id] = func(msg *internal.Message) { + wp.log.Debug("validate request callback", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", msg)) if !wp.env.IsReplaying() { // before accept we have only one option - reject if msg.Failure != nil { @@ -54,27 +55,17 @@ func (wp *Workflow) handleUpdate(name string, id string, input *commonpb.Payload callbacks.Accept() } + } - wp.mq.PushCommand( - &internal.InvokeUpdate{ - RunID: rid, - UpdateID: id, - Name: name, - Type: execute, - }, - input, - header, - ) - - wp.updateCompleteCb[id] = func(res *internal.Message) { - wp.log.Debug("update request result", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", res)) - if res.Failure != nil { - callbacks.Complete(nil, temporal.GetDefaultFailureConverter().FailureToError(res.Failure)) - return - } - - callbacks.Complete(res.Payloads, nil) + // execute callback + wp.updateCompleteCb[id] = func(msg *internal.Message) { + wp.log.Debug("update request callback", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", msg)) + if msg.Failure != nil { + callbacks.Complete(nil, temporal.GetDefaultFailureConverter().FailureToError(msg.Failure)) + return } + + callbacks.Complete(msg.Payloads, nil) } // push validate command @@ -83,7 +74,7 @@ func (wp *Workflow) handleUpdate(name string, id string, input *commonpb.Payload RunID: rid, UpdateID: id, Name: name, - Type: validate, + Type: valExec, }, input, header, @@ -262,7 +253,7 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error { return errors.Str("update id is empty, can't validate update") } - if _, ok := wp.updateCompleteCb[command.ID]; !ok { + if _, ok := wp.updateValidateCb[command.ID]; !ok { wp.log.Warn("no such update ID, can't validate update", zap.String("requested id", command.ID)) // TODO(rustatian): error here? return nil @@ -270,6 +261,10 @@ func (wp *Workflow) handleMessage(msg *internal.Message) error { wp.updateValidateCb[command.ID](msg) delete(wp.updateValidateCb, command.ID) + // delete updateCompleteCb in case of error + if msg.Failure != nil { + delete(wp.updateCompleteCb, command.ID) + } case *internal.CompleteWorkflow: wp.log.Debug("complete workflow request", zap.Uint64("ID", msg.ID)) diff --git a/aggregatedpool/workflow.go b/aggregatedpool/workflow.go index 9b5051a3..92f5d407 100644 --- a/aggregatedpool/workflow.go +++ b/aggregatedpool/workflow.go @@ -57,8 +57,8 @@ type Workflow struct { inLoop uint32 // updates - updateValidateCb map[string]func(res *internal.Message) updateCompleteCb map[string]func(res *internal.Message) + updateValidateCb map[string]func(res *internal.Message) log *zap.Logger mh temporalClient.MetricsHandler @@ -69,14 +69,10 @@ type Workflow struct { func NewWorkflowDefinition(codec common.Codec, pool common.Pool, log *zap.Logger) *Workflow { return &Workflow{ - rrID: uuid.NewString(), - updateValidateCb: make(map[string]func(res *internal.Message)), - updateCompleteCb: make(map[string]func(res *internal.Message)), - - updatesQueue: map[string]struct{}{}, - log: log, - codec: codec, - pool: pool, + rrID: uuid.NewString(), + log: log, + codec: codec, + pool: pool, pldPool: &sync.Pool{ New: func() any { return new(payload.Payload) @@ -91,8 +87,8 @@ func (wp *Workflow) NewWorkflowDefinition() bindings.WorkflowDefinition { return &Workflow{ rrID: uuid.NewString(), // updates logic - updateValidateCb: make(map[string]func(res *internal.Message)), updateCompleteCb: make(map[string]func(res *internal.Message)), + updateValidateCb: make(map[string]func(res *internal.Message)), updatesQueue: map[string]struct{}{}, // -- updates pool: wp.pool, @@ -246,6 +242,11 @@ func (wp *Workflow) Close() { for k := range wp.updatesQueue { delete(wp.updatesQueue, k) } + + for k := range wp.updateCompleteCb { + delete(wp.updateCompleteCb, k) + } + // send destroy command _, _ = wp.runCommand(internal.DestroyWorkflow{RunID: wp.env.WorkflowInfo().WorkflowExecution.RunID}, nil, wp.header) // flush queue diff --git a/go.mod b/go.mod index 34fce354..008a794f 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( go.temporal.io/api v1.27.0 go.temporal.io/sdk v1.26.0-rc.2 go.temporal.io/sdk/contrib/tally v0.2.0 - go.temporal.io/server v1.22.4 - go.uber.org/zap v1.26.0 + go.temporal.io/server v1.22.5 + go.uber.org/zap v1.27.0 google.golang.org/protobuf v1.32.0 ) @@ -37,7 +37,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/common v0.47.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/goridge/v3 v3.8.1 @@ -50,7 +50,6 @@ require ( github.com/twmb/murmur3 v1.1.8 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/atomic v1.11.0 // indirect - go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/net v0.21.0 // indirect @@ -58,9 +57,9 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/grpc v1.61.1 + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/grpc v1.62.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 56a86488..7269355a 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ github.com/cactus/go-statsd-client/v5 v5.0.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4 github.com/cactus/go-statsd-client/v5 v5.1.0 h1:sbbdfIl9PgisjEoXzvXI1lwUKWElngsjJKaZeC021P4= github.com/cactus/go-statsd-client/v5 v5.1.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4eeDw9maJBMIuMPBZbY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -99,6 +100,7 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= @@ -151,6 +153,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= @@ -227,6 +231,8 @@ go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34Mn go.temporal.io/sdk/contrib/tally v0.2.0/go.mod h1:1kpSuCms/tHeJQDPuuKkaBsMqfHnIIRnCtUYlPNXxuE= go.temporal.io/server v1.22.4 h1:Pj0virq3yqMAzyBSerpCHvYBmvwjuQ6DVDbERO9jYx4= go.temporal.io/server v1.22.4/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= +go.temporal.io/server v1.22.5 h1:bZEXDcV2RwHuv2j38nW1nouN3SCMMqIoDq37Ci4gi+0= +go.temporal.io/server v1.22.5/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= 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= @@ -244,6 +250,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -357,10 +365,16 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 h1:4++qSzdWBUy9/2x8L5KZgwZw+mjJZ2yDSCGMVM0YzRs= google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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= @@ -372,6 +386,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/go.work.sum b/go.work.sum index ce9e4ae2..cdfad7dc 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1414,6 +1414,7 @@ cloud.google.com/go/spanner v1.53.1/go.mod h1:liG4iCeLqm5L3fFLU5whFITqP0e0orsAW1 cloud.google.com/go/spanner v1.55.0/go.mod h1:HXEznMUVhC+PC+HDyo9YFG2Ajj5BQDkcbqB9Z2Ffxi0= cloud.google.com/go/spanner v1.56.0 h1:o/Cv7/zZ1WgRXVCd5g3Nc23ZI39p/1pWFqFwvg6Wcu8= cloud.google.com/go/spanner v1.56.0/go.mod h1:DndqtUKQAt3VLuV2Le+9Y3WTnq5cNKrnLb/Piqcj+h0= +cloud.google.com/go/spanner v1.57.0/go.mod h1:aXQ5QDdhPRIqVhYmnkAdwPYvj/DRN0FguclhEWw+jOo= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -1750,7 +1751,6 @@ github.com/centrifugal/centrifuge-go v0.10.1 h1:aAiW8SeJygYjyjvb6C7WM9uNDmVEAN60 github.com/centrifugal/centrifuge-go v0.10.1/go.mod h1:jYJB6Nony+XVRbMJUZCzL2iDAp9rkJT7SRmf7Y1fQMY= github.com/centrifugal/protocol v0.10.0 h1:Lac48ATVjVjirYPTHxbSMmiQXXajx7dhARKHy1UOL+A= github.com/centrifugal/protocol v0.10.0/go.mod h1:Tq5I1mBpLHkLxNM9gfb3Gth+sTE2kKU5hH3cVgmVs9s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= @@ -1770,6 +1770,7 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+g github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= github.com/cncf/xds/go v0.0.0-20231109132714-523115ebc101/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= @@ -1816,6 +1817,7 @@ github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCw github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= @@ -1823,6 +1825,7 @@ github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= @@ -1875,6 +1878,7 @@ github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0L github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1953,7 +1957,6 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= diff --git a/tests/cancel_test.go b/tests/cancel_test.go index 97927413..5a209723 100644 --- a/tests/cancel_test.go +++ b/tests/cancel_test.go @@ -17,7 +17,7 @@ func Test_SimpleWorkflowCancelProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -46,7 +46,7 @@ func Test_CancellableWorkflowScopeProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -78,7 +78,7 @@ func Test_CanceledWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -105,7 +105,7 @@ func Test_CanceledWithCompensationWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -154,7 +154,7 @@ func Test_CanceledNestedWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -201,7 +201,7 @@ func Test_CanceledNSingleScopeWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -245,7 +245,7 @@ func Test_CanceledMidflightWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -290,7 +290,7 @@ func Test_CancelSignaledChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -336,7 +336,7 @@ func Test_SimpleWorkflowCancelLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -365,7 +365,7 @@ func Test_CancellableWorkflowScopeLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -396,7 +396,7 @@ func Test_CanceledWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -423,7 +423,7 @@ func Test_CanceledWithCompensationWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -472,7 +472,7 @@ func Test_CanceledNestedWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -519,7 +519,7 @@ func Test_CanceledNSingleScopeWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -563,7 +563,7 @@ func Test_CanceledMidflightWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -608,7 +608,7 @@ func Test_CancelSignaledChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/child_test.go b/tests/child_test.go index 952872e4..d2e89080 100644 --- a/tests/child_test.go +++ b/tests/child_test.go @@ -13,7 +13,7 @@ func Test_ExecuteChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -36,7 +36,7 @@ func Test_ExecuteChildStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -59,7 +59,7 @@ func Test_ExecuteChildStubWorkflow_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -82,7 +82,7 @@ func Test_SignalChildViaStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -106,7 +106,7 @@ func Test_ExecuteChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -129,7 +129,7 @@ func Test_ExecuteChildStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -152,7 +152,7 @@ func Test_ExecuteChildStubWorkflowLA_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -175,7 +175,7 @@ func Test_SignalChildViaStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/disaster_test.go b/tests/disaster_test.go index 479a5177..cce191fd 100644 --- a/tests/disaster_test.go +++ b/tests/disaster_test.go @@ -21,7 +21,7 @@ func Test_WorkerError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -55,7 +55,7 @@ func Test_ResetAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -96,7 +96,7 @@ func Test_ResetWFWorker(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -144,7 +144,7 @@ func Test_ActivityError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -192,7 +192,7 @@ func Test_WorkerError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -226,7 +226,7 @@ func Test_WorkerError_DisasterRecovery_Heavy(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -280,7 +280,7 @@ func Test_ActivityError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -329,7 +329,7 @@ func Test_WorkerError_DisasterRecovery_HeavyLA(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script @@ -383,7 +383,7 @@ func Test_WorkerErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -417,7 +417,7 @@ func Test_ResetLAAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -458,7 +458,7 @@ func Test_ActivityErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script @@ -506,7 +506,7 @@ func Test_WorkerErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -540,7 +540,7 @@ func Test_ActivityErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script diff --git a/tests/env/docker-compose-temporal_arm.yaml b/tests/env/docker-compose-temporal_arm.yaml index 488f8d95..87f35439 100644 --- a/tests/env/docker-compose-temporal_arm.yaml +++ b/tests/env/docker-compose-temporal_arm.yaml @@ -15,6 +15,7 @@ services: security_opt: - no-new-privileges tty: false + temporal: container_name: temporal depends_on: @@ -26,6 +27,8 @@ services: - POSTGRES_PWD= - POSTGRES_SEEDS=postgres image: temporalio/auto-setup:1 + volumes: + - ./dynamicconfig:/etc/temporal/config/dynamicconfig links: - cockroach:postgres networks: @@ -34,6 +37,7 @@ services: - 7233:7233 labels: kompose.volume.type: configMap + temporal-admin-tools: container_name: temporal-admin-tools depends_on: diff --git a/tests/general_test.go b/tests/general_test.go index 9d4fb7dd..981ab6f1 100644 --- a/tests/general_test.go +++ b/tests/general_test.go @@ -14,7 +14,7 @@ func Test_HistoryLen(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/go.mod b/tests/go.mod index f1cbe93c..50d08a98 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -21,7 +21,7 @@ require ( github.com/temporalio/roadrunner-temporal/v4 v4.6.0 go.temporal.io/api v1.27.0 go.temporal.io/sdk v1.26.0-rc.2 - go.uber.org/zap v1.26.0 + go.uber.org/zap v1.27.0 ) exclude github.com/uber-go/tally/v4 v4.1.11 // indirect @@ -58,7 +58,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/common v0.47.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/errors v1.4.0 // indirect @@ -95,7 +95,7 @@ require ( go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.temporal.io/sdk/contrib/opentelemetry v0.4.0 // indirect go.temporal.io/sdk/contrib/tally v0.2.0 // indirect - go.temporal.io/server v1.22.4 // indirect + go.temporal.io/server v1.22.5 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect @@ -104,10 +104,10 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/grpc v1.61.1 // indirect + google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/grpc v1.62.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect diff --git a/tests/go.sum b/tests/go.sum index 0e555e44..359f652d 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -20,6 +20,7 @@ github.com/cactus/go-statsd-client/v5 v5.1.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4 github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -114,6 +115,7 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= @@ -183,6 +185,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= @@ -325,6 +329,8 @@ go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34Mn go.temporal.io/sdk/contrib/tally v0.2.0/go.mod h1:1kpSuCms/tHeJQDPuuKkaBsMqfHnIIRnCtUYlPNXxuE= go.temporal.io/server v1.22.4 h1:Pj0virq3yqMAzyBSerpCHvYBmvwjuQ6DVDbERO9jYx4= go.temporal.io/server v1.22.4/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= +go.temporal.io/server v1.22.5 h1:bZEXDcV2RwHuv2j38nW1nouN3SCMMqIoDq37Ci4gi+0= +go.temporal.io/server v1.22.5/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= 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= @@ -342,6 +348,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -457,10 +465,16 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= +google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 h1:4++qSzdWBUy9/2x8L5KZgwZw+mjJZ2yDSCGMVM0YzRs= google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= +google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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= @@ -472,6 +486,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= 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= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/tests/helpers.go b/tests/helpers.go index 61bea2b3..12c241f1 100644 --- a/tests/helpers.go +++ b/tests/helpers.go @@ -95,15 +95,15 @@ func (l *log) fields(keyvals []any) []zap.Field { return zf } -func NewTestServer(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup) *TestServer { +func NewTestServer(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup, configPath string) *TestServer { container := endure.New(slog.LevelDebug, endure.GracefulShutdownTimeout(time.Second*30)) cfg := &configImpl.Plugin{ Timeout: time.Second * 30, + Path: configPath, + Prefix: rrPrefix, + Version: rrVersion, } - cfg.Path = "configs/.rr-proto.yaml" - cfg.Prefix = rrPrefix - cfg.Version = rrVersion err := container.RegisterAll( cfg, @@ -144,119 +144,8 @@ func NewTestServer(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup) *Test Logger: newZapAdapter(initLogger()), }) if err != nil { - panic(err) + t.Fatal(err) } - require.NoError(t, err) - - return &TestServer{ - Client: client, - } -} - -func NewTestServerLA(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup) *TestServer { - container := endure.New(slog.LevelDebug, endure.GracefulShutdownTimeout(time.Second*30)) - - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-proto-la.yaml" - cfg.Prefix = rrPrefix - cfg.Version = "2.11.0" - - err := container.RegisterAll( - cfg, - &roadrunnerTemporal.Plugin{}, - &logger.Plugin{}, - &resetter.Plugin{}, - &informer.Plugin{}, - &server.Plugin{}, - &rpc.Plugin{}, - ) - - assert.NoError(t, err) - assert.NoError(t, container.Init()) - - errCh, err := container.Serve() - if err != nil { - panic(err) - } - - go func() { - defer wg.Done() - for { - select { - case er := <-errCh: - assert.Fail(t, fmt.Sprintf("got error from vertex: %s, error: %v", er.VertexID, er.Error)) - assert.NoError(t, container.Stop()) - return - case <-stopCh: - assert.NoError(t, container.Stop()) - return - } - } - }() - - dc := data_converter.NewDataConverter(converter.GetDefaultDataConverter()) - client, err := temporalClient.Dial(temporalClient.Options{ - HostPort: "127.0.0.1:7233", - Namespace: "default", - DataConverter: dc, - Logger: newZapAdapter(initLogger()), - }) - if err != nil { - panic(err) - } - require.NoError(t, err) - - return &TestServer{ - Client: client, - } -} - -func NewTestServerWithMetrics(t *testing.T, stopCh chan struct{}, cfg Configurer, wg *sync.WaitGroup) *TestServer { - container := endure.New(slog.LevelDebug) - - err := container.RegisterAll( - cfg, - &roadrunnerTemporal.Plugin{}, - &logger.Plugin{}, - &resetter.Plugin{}, - &informer.Plugin{}, - &server.Plugin{}, - &rpc.Plugin{}, - ) - - assert.NoError(t, err) - assert.NoError(t, container.Init()) - - errCh, err := container.Serve() - if err != nil { - panic(err) - } - - go func() { - defer wg.Done() - for { - select { - case er := <-errCh: - assert.Fail(t, fmt.Sprintf("got error from vertex: %s, error: %v", er.VertexID, er.Error)) - assert.NoError(t, container.Stop()) - return - case <-stopCh: - assert.NoError(t, container.Stop()) - return - } - } - }() - - dc := data_converter.NewDataConverter(converter.GetDefaultDataConverter()) - client, err := temporalClient.Dial(temporalClient.Options{ - HostPort: "127.0.0.1:7233", - Namespace: "default", - Logger: newZapAdapter(initLogger()), - DataConverter: dc, - }) - require.NoError(t, err) return &TestServer{ Client: client, @@ -504,11 +393,7 @@ func (s *TestServer) AssertNotContainsEvent(client temporalClient.Client, t *tes enums.HISTORY_EVENT_FILTER_TYPE_ALL_EVENT, ) - for { - if !i.HasNext() { - break - } - + for i.HasNext() { e, err := i.Next() if err != nil { t.Error("unable to read history event") diff --git a/tests/hp_test.go b/tests/hp_test.go index 5f28faa3..85b6052c 100644 --- a/tests/hp_test.go +++ b/tests/hp_test.go @@ -38,7 +38,7 @@ func Test_VerifyRegistrationProto(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - _ = NewTestServer(t, stopCh, wg) + _ = NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") activities := getActivities(t) workflows := getWorkflows(t) @@ -57,7 +57,7 @@ func Test_ExecuteSimpleWorkflow_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -80,7 +80,7 @@ func Test_ExecuteSimpleWorkflowLA_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -103,7 +103,7 @@ func Test_ExecuteSimpleDTOWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -129,7 +129,7 @@ func Test_ExecuteSimpleDTOWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -155,7 +155,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -178,7 +178,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -201,7 +201,7 @@ func Test_MultipleWorkflowsInSingleWorkerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -237,7 +237,7 @@ func Test_MultipleWorkflowsInSingleWorkerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -273,7 +273,7 @@ func Test_ExecuteWorkflowWithParallelScopesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -296,7 +296,7 @@ func Test_ExecuteWorkflowWithParallelScopesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -319,7 +319,7 @@ func Test_TimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -348,7 +348,7 @@ func Test_TimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -377,7 +377,7 @@ func Test_SideEffectProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -404,7 +404,7 @@ func Test_SideEffectLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -431,7 +431,7 @@ func Test_EmptyWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -454,7 +454,7 @@ func Test_EmptyWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -477,7 +477,7 @@ func Test_PromiseChainingProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -500,7 +500,7 @@ func Test_PromiseChainingLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -523,7 +523,7 @@ func Test_ActivityHeartbeatProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -557,7 +557,7 @@ func Test_BinaryPayloadProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -586,7 +586,7 @@ func Test_BinaryPayloadLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -615,7 +615,7 @@ func Test_ContinueAsNewProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -648,7 +648,7 @@ func Test_ContinueAsNewLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -681,7 +681,7 @@ func Test_ActivityStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -709,7 +709,7 @@ func Test_ActivityStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -737,7 +737,7 @@ func Test_ExecuteProtoWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -760,7 +760,7 @@ func Test_ExecuteProtoWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -783,7 +783,7 @@ func Test_SagaWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -804,7 +804,7 @@ func Test_UpsertSearchAttributesWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") ctx := context.Background() _, err := s.Client.OperatorService().AddSearchAttributes(ctx, &operatorservice.AddSearchAttributesRequest{ @@ -845,7 +845,7 @@ func Test_SagaWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/metrics_test.go b/tests/metrics_test.go index 8c977739..a54c9f99 100644 --- a/tests/metrics_test.go +++ b/tests/metrics_test.go @@ -9,7 +9,6 @@ import ( "testing" "time" - configImpl "github.com/roadrunner-server/config/v4" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" ) @@ -19,14 +18,7 @@ func Test_SimpleWorkflowMetrics(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.9.0" - - s := NewTestServerWithMetrics(t, stopCh, cfg, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -79,14 +71,7 @@ func Test_SimpleWorkflowMetricsPrometheusNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics-prom-new.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.11.2" - - s := NewTestServerWithMetrics(t, stopCh, cfg, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics-prom-new.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -139,14 +124,7 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics-statsd.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.11.2" - - s := NewTestServerWithMetrics(t, stopCh, cfg, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics-statsd.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -184,7 +162,7 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { // get request and return body func get() (string, error) { - r, err := http.Get("http://127.0.0.1:9095/metrics") + r, err := http.Get("http://127.0.0.1:9095/metrics") //nolint:noctx if err != nil { return "", err } @@ -206,12 +184,12 @@ func get() (string, error) { func getStatsd() (string, error) { conn, err := net.Dial("tcp4", "127.0.0.1:8126") if err != nil { - panic(err) + return "", err } _, err = conn.Write([]byte("counters")) if err != nil { - panic(err) + return "", err } _ = conn.SetReadDeadline(time.Now().Add(time.Second * 2)) diff --git a/tests/php_test_files/composer.json b/tests/php_test_files/composer.json index 4b1f8324..fa906718 100644 --- a/tests/php_test_files/composer.json +++ b/tests/php_test_files/composer.json @@ -7,7 +7,7 @@ "nyholm/psr7": "^1.5", "spiral/roadrunner-http": "^3.0", "spiral/roadrunner-worker": "^3.0", - "temporal/sdk": "dev-master", + "temporal/sdk": "dev-updates#fc7ade25696a815f979f495902e72071ab2d8d38", "spiral/tokenizer": ">=2.7", "spiral/roadrunner-metrics": "^3.0", "spiral/roadrunner-grpc": "^3.0", diff --git a/tests/php_test_files/composer.lock b/tests/php_test_files/composer.lock index 34c8b445..db278d7f 100644 --- a/tests/php_test_files/composer.lock +++ b/tests/php_test_files/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7677d5f6ee1f1a9f2240a92ab1b1e271", + "content-hash": "25597927eb3c7036dfff13e4c016115b", "packages": [ { "name": "brick/math", @@ -61,6 +61,75 @@ ], "time": "2023-01-15T23:15:59+00:00" }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/dbal": "<4.0.0 || >=5.0.0" + }, + "require-dev": { + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2024-02-09T16:56:22+00:00" + }, { "name": "composer/semver", "version": "3.4.0", @@ -144,16 +213,16 @@ }, { "name": "google/common-protos", - "version": "v4.4.0", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/googleapis/common-protos-php.git", - "reference": "04b6c213e0add963dab058329caf2d2d9014129a" + "reference": "dfc232e90823cedca107b56e7371f2e2f35b9427" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/04b6c213e0add963dab058329caf2d2d9014129a", - "reference": "04b6c213e0add963dab058329caf2d2d9014129a", + "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/dfc232e90823cedca107b56e7371f2e2f35b9427", + "reference": "dfc232e90823cedca107b56e7371f2e2f35b9427", "shasum": "" }, "require": { @@ -190,22 +259,22 @@ ], "support": { "issues": "https://github.com/googleapis/common-protos-php/issues", - "source": "https://github.com/googleapis/common-protos-php/tree/v4.4.0" + "source": "https://github.com/googleapis/common-protos-php/tree/v4.5.0" }, - "time": "2023-10-02T18:14:18+00:00" + "time": "2023-11-29T21:08:16+00:00" }, { "name": "google/protobuf", - "version": "v3.25.1", + "version": "v3.25.3", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "1fb247e72df401c863ed239c1660f981644af5db" + "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/1fb247e72df401c863ed239c1660f981644af5db", - "reference": "1fb247e72df401c863ed239c1660f981644af5db", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/983a87f4f8798a90ca3a25b0f300b8fda38df643", + "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643", "shasum": "" }, "require": { @@ -234,9 +303,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.1" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.3" }, - "time": "2023-11-15T21:36:03+00:00" + "time": "2024-02-15T21:11:49+00:00" }, { "name": "grpc/grpc", @@ -684,19 +753,20 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", + "version": "2.72.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -708,8 +778,8 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -786,7 +856,7 @@ "type": "tidelift" } ], - "time": "2023-09-25T11:31:05+00:00" + "time": "2024-01-25T10:35:09+00:00" }, { "name": "nyholm/dsn", @@ -1144,16 +1214,16 @@ }, { "name": "php-http/discovery", - "version": "1.19.1", + "version": "1.19.2", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", - "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", + "url": "https://api.github.com/repos/php-http/discovery/zipball/61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", + "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb", "shasum": "" }, "require": { @@ -1216,9 +1286,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.1" + "source": "https://github.com/php-http/discovery/tree/1.19.2" }, - "time": "2023-07-11T07:02:26+00:00" + "time": "2023-11-30T16:49:05+00:00" }, { "name": "php-http/guzzle6-adapter", @@ -1285,6 +1355,7 @@ "issues": "https://github.com/php-http/guzzle6-adapter/issues", "source": "https://github.com/php-http/guzzle6-adapter/tree/v2.0.2" }, + "abandoned": "guzzlehttp/guzzle or php-http/guzzle7-adapter", "time": "2021-03-02T10:52:33+00:00" }, { @@ -1401,16 +1472,16 @@ }, { "name": "php-http/promise", - "version": "1.2.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "44a67cb59f708f826f3bec35f22030b3edb90119" + "reference": "2916a606d3b390f4e9e8e2b8dd68581508be0f07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/44a67cb59f708f826f3bec35f22030b3edb90119", - "reference": "44a67cb59f708f826f3bec35f22030b3edb90119", + "url": "https://api.github.com/repos/php-http/promise/zipball/2916a606d3b390f4e9e8e2b8dd68581508be0f07", + "reference": "2916a606d3b390f4e9e8e2b8dd68581508be0f07", "shasum": "" }, "require": { @@ -1447,9 +1518,9 @@ ], "support": { "issues": "https://github.com/php-http/promise/issues", - "source": "https://github.com/php-http/promise/tree/1.2.1" + "source": "https://github.com/php-http/promise/tree/1.3.0" }, - "time": "2023-11-08T12:57:08+00:00" + "time": "2024-01-04T18:49:48+00:00" }, { "name": "psr/cache", @@ -2089,23 +2160,23 @@ }, { "name": "react/promise", - "version": "v2.10.0", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", - "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "url": "https://api.github.com/repos/reactphp/promise/zipball/1a8460931ea36dc5c76838fec5734d55c88c6831", + "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -2149,7 +2220,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.10.0" + "source": "https://github.com/reactphp/promise/tree/v2.11.0" }, "funding": [ { @@ -2157,25 +2228,26 @@ "type": "open_collective" } ], - "time": "2023-05-02T15:15:43+00:00" + "time": "2023-11-16T16:16:50+00:00" }, { "name": "roadrunner-php/app-logger", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/app-logger.git", - "reference": "d622d68e86f18ef7e0295bc749c2bd25b2bbabdb" + "reference": "555a31933c7797cfb5749a5c7176d39c2b368183" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/app-logger/zipball/d622d68e86f18ef7e0295bc749c2bd25b2bbabdb", - "reference": "d622d68e86f18ef7e0295bc749c2bd25b2bbabdb", + "url": "https://api.github.com/repos/roadrunner-php/app-logger/zipball/555a31933c7797cfb5749a5c7176d39c2b368183", + "reference": "555a31933c7797cfb5749a5c7176d39c2b368183", "shasum": "" }, "require": { "ext-json": "*", "php": ">=8.1", + "roadrunner-php/roadrunner-api-dto": "^1.4", "spiral/goridge": "^3.1 || ^4.0" }, "require-dev": { @@ -2205,8 +2277,7 @@ ], "description": "Send log messages to RoadRunner", "support": { - "issues": "https://github.com/roadrunner-php/app-logger/issues", - "source": "https://github.com/roadrunner-php/app-logger/tree/1.1.0" + "source": "https://github.com/roadrunner-php/app-logger/tree/1.2.0" }, "funding": [ { @@ -2214,7 +2285,7 @@ "type": "github" } ], - "time": "2023-04-13T13:48:31+00:00" + "time": "2023-12-22T06:01:40+00:00" }, { "name": "roadrunner-php/centrifugo", @@ -2363,23 +2434,23 @@ }, { "name": "roadrunner-php/version-checker", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/roadrunner-php/version-checker.git", - "reference": "7c087fed3d31c7fdc9cbc6682c808c63c297aeb5" + "reference": "1733f27dcd0d5dd05c9d9ce554529193d8013a21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/version-checker/zipball/7c087fed3d31c7fdc9cbc6682c808c63c297aeb5", - "reference": "7c087fed3d31c7fdc9cbc6682c808c63c297aeb5", + "url": "https://api.github.com/repos/roadrunner-php/version-checker/zipball/1733f27dcd0d5dd05c9d9ce554529193d8013a21", + "reference": "1733f27dcd0d5dd05c9d9ce554529193d8013a21", "shasum": "" }, "require": { "composer-runtime-api": "^2.0", "composer/semver": "^3.3", "php": "^8.0", - "symfony/process": "^5.4 || ^6.0" + "symfony/process": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.8", @@ -2404,8 +2475,7 @@ "version-checker" ], "support": { - "issues": "https://github.com/roadrunner-php/version-checker/issues", - "source": "https://github.com/roadrunner-php/version-checker/tree/v1.0.0" + "source": "https://github.com/roadrunner-php/version-checker/tree/v1.0.1" }, "funding": [ { @@ -2413,43 +2483,34 @@ "type": "github" } ], - "time": "2023-05-25T15:28:27+00:00" + "time": "2023-12-19T08:51:40+00:00" }, { "name": "spiral/attributes", - "version": "v3.1.2", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/spiral/attributes.git", - "reference": "aa45e59e0d50119d237177a897ee801efce3b8d9" + "reference": "eb12813865da0342a19bba0e273c1709f9b38490" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/attributes/zipball/aa45e59e0d50119d237177a897ee801efce3b8d9", - "reference": "aa45e59e0d50119d237177a897ee801efce3b8d9", + "url": "https://api.github.com/repos/spiral/attributes/zipball/eb12813865da0342a19bba0e273c1709f9b38490", + "reference": "eb12813865da0342a19bba0e273c1709f9b38490", "shasum": "" }, "require": { "php": ">=8.1", - "psr/cache": ">=1.0", + "psr/cache": "1 - 3", "psr/simple-cache": "1 - 3" }, "require-dev": { - "doctrine/annotations": "^1.12 || ^2.0", + "doctrine/annotations": "^1.14 || ^2.0", "jetbrains/phpstorm-attributes": "^1.0", "phpunit/phpunit": "^9.5.20", - "symfony/var-dumper": "^5.2 || ^6.0", - "vimeo/psalm": "^4.21" - }, - "suggest": { - "doctrine/annotations": "^1.0 for Doctrine metadata driver support" + "vimeo/psalm": "^5.17" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, "autoload": { "files": [ "src/polyfill.php" @@ -2463,6 +2524,22 @@ "MIT" ], "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "Pavel Butchnev (butschster)", + "email": "pavel.buchnev@spiralscout.com" + }, + { + "name": "Aleksei Gagarin (roxblnfk)", + "email": "alexey.gagarin@spiralscout.com" + }, + { + "name": "Maksim Smakouz (msmakouz)", + "email": "maksim.smakouz@spiralscout.com" + }, { "name": "Kirill Nesmeyanov (SerafimArts)", "email": "kirill.nesmeyanov@spiralscout.com" @@ -2470,24 +2547,38 @@ ], "description": "PHP attributes reader", "homepage": "https://spiral.dev", + "keywords": [ + "annotations", + "attributes", + "metadata" + ], "support": { + "chat": "https://discord.gg/V6EK4he", + "docs": "https://spiral.dev/docs", + "forum": "https://forum.spiral.dev", "issues": "https://github.com/spiral/attributes/issues", "source": "https://github.com/spiral/attributes" }, - "time": "2023-07-04T14:18:50+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/roadrunner-server", + "type": "github" + } + ], + "time": "2024-02-12T09:31:34+00:00" }, { "name": "spiral/core", - "version": "3.9.1", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/spiral/core.git", - "reference": "9d9c39f76225409c01d3936077841a3ba67254f5" + "reference": "8147d305a2a1e06fa498fe2d8ab32097451a6b34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/core/zipball/9d9c39f76225409c01d3936077841a3ba67254f5", - "reference": "9d9c39f76225409c01d3936077841a3ba67254f5", + "url": "https://api.github.com/repos/spiral/core/zipball/8147d305a2a1e06fa498fe2d8ab32097451a6b34", + "reference": "8147d305a2a1e06fa498fe2d8ab32097451a6b34", "shasum": "" }, "require": { @@ -2505,7 +2596,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.10.x-dev" + "dev-master": "3.12.x-dev" } }, "autoload": { @@ -2541,20 +2632,20 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/core" }, - "time": "2023-10-19T14:19:18+00:00" + "time": "2023-12-21T14:43:04+00:00" }, { "name": "spiral/goridge", - "version": "4.1.0", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/roadrunner-php/goridge.git", - "reference": "d955f58be1c51daa1eb94a5ddaf4c2daf64ee14e" + "reference": "a5d67441dc862aa32647622975c9e6f6042a593d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/d955f58be1c51daa1eb94a5ddaf4c2daf64ee14e", - "reference": "d955f58be1c51daa1eb94a5ddaf4c2daf64ee14e", + "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/a5d67441dc862aa32647622975c9e6f6042a593d", + "reference": "a5d67441dc862aa32647622975c9e6f6042a593d", "shasum": "" }, "require": { @@ -2620,7 +2711,7 @@ "docs": "https://roadrunner.dev/docs", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/goridge/tree/4.1.0" + "source": "https://github.com/roadrunner-php/goridge/tree/4.1.1" }, "funding": [ { @@ -2628,26 +2719,26 @@ "type": "github" } ], - "time": "2023-10-03T18:40:43+00:00" + "time": "2023-12-21T10:47:02+00:00" }, { "name": "spiral/logger", - "version": "3.9.1", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/spiral/logger.git", - "reference": "87c448e8c38eb346526584c24a1ca285bec1ce58" + "reference": "c88f6b2286487347e6dcdaca1eaa510f68b2da20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/logger/zipball/87c448e8c38eb346526584c24a1ca285bec1ce58", - "reference": "87c448e8c38eb346526584c24a1ca285bec1ce58", + "url": "https://api.github.com/repos/spiral/logger/zipball/c88f6b2286487347e6dcdaca1eaa510f68b2da20", + "reference": "c88f6b2286487347e6dcdaca1eaa510f68b2da20", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "1 - 3", - "spiral/core": "^3.9.1" + "spiral/core": "^3.11.1" }, "require-dev": { "mockery/mockery": "^1.5", @@ -2657,7 +2748,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.10.x-dev" + "dev-master": "3.12.x-dev" } }, "autoload": { @@ -2693,20 +2784,20 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/logger" }, - "time": "2023-10-24T14:07:14+00:00" + "time": "2023-12-29T10:41:05+00:00" }, { "name": "spiral/roadrunner", - "version": "v2023.3.4", + "version": "v2023.3.11", "source": { "type": "git", "url": "https://github.com/roadrunner-server/roadrunner.git", - "reference": "2f2aeb95ed35600bd43d400f0d3c5414f79d78b2" + "reference": "a39c549a196451fec13fde1266ea7b3dc3722f3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/2f2aeb95ed35600bd43d400f0d3c5414f79d78b2", - "reference": "2f2aeb95ed35600bd43d400f0d3c5414f79d78b2", + "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/a39c549a196451fec13fde1266ea7b3dc3722f3a", + "reference": "a39c549a196451fec13fde1266ea7b3dc3722f3a", "shasum": "" }, "type": "metapackage", @@ -2735,7 +2826,7 @@ "docs": "https://roadrunner.dev/docs", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-server/roadrunner/tree/v2023.3.4" + "source": "https://github.com/roadrunner-server/roadrunner/tree/v2023.3.11" }, "funding": [ { @@ -2743,20 +2834,20 @@ "type": "github" } ], - "time": "2023-11-09T16:13:48+00:00" + "time": "2024-02-15T19:41:47+00:00" }, { "name": "spiral/roadrunner-cli", - "version": "v2.5.0", + "version": "v2.6.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/cli.git", - "reference": "468c4a646d10a38b1475ec7b71f5880aa354febf" + "reference": "a896e1d05a1fc4ebaf14e68b8b901c851c3b38b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/468c4a646d10a38b1475ec7b71f5880aa354febf", - "reference": "468c4a646d10a38b1475ec7b71f5880aa354febf", + "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/a896e1d05a1fc4ebaf14e68b8b901c851c3b38b2", + "reference": "a896e1d05a1fc4ebaf14e68b8b901c851c3b38b2", "shasum": "" }, "require": { @@ -2765,15 +2856,14 @@ "php": ">=7.4", "spiral/roadrunner-worker": ">=2.0.2", "spiral/tokenizer": "^2.13 || ^3.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/console": "^5.3 || ^6.0 || ^7.0", + "symfony/http-client": "^4.4.11 || ^5.0 || ^6.0 || ^7.0", "symfony/polyfill-php80": "^1.22", - "symfony/yaml": "^5.4 || ^6.0" + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "jetbrains/phpstorm-attributes": "^1.0", - "symfony/var-dumper": "^4.4|^5.0", - "vimeo/psalm": "^4.4" + "vimeo/psalm": "^5.17" }, "bin": [ "bin/rr" @@ -2805,23 +2895,22 @@ ], "description": "RoadRunner: Command Line Interface", "support": { - "issues": "https://github.com/roadrunner-php/cli/issues", - "source": "https://github.com/roadrunner-php/cli/tree/v2.5.0" + "source": "https://github.com/roadrunner-php/cli/tree/v2.6.0" }, - "time": "2023-04-18T14:19:26+00:00" + "time": "2023-12-05T20:46:56+00:00" }, { "name": "spiral/roadrunner-grpc", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/grpc.git", - "reference": "94b5ec7a4ae8e0ef479f7c056069f42c9041bebe" + "reference": "6865691e2adf8ddc8f7365b716521a2deaca3192" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/grpc/zipball/94b5ec7a4ae8e0ef479f7c056069f42c9041bebe", - "reference": "94b5ec7a4ae8e0ef479f7c056069f42c9041bebe", + "url": "https://api.github.com/repos/roadrunner-php/grpc/zipball/6865691e2adf8ddc8f7365b716521a2deaca3192", + "reference": "6865691e2adf8ddc8f7365b716521a2deaca3192", "shasum": "" }, "require": { @@ -2878,7 +2967,7 @@ "docs": "https://roadrunner.dev/docs", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/grpc/tree/3.1.0" + "source": "https://github.com/roadrunner-php/grpc/tree/3.2.0" }, "funding": [ { @@ -2886,20 +2975,20 @@ "type": "github" } ], - "time": "2023-10-26T08:12:59+00:00" + "time": "2023-11-30T14:43:28+00:00" }, { "name": "spiral/roadrunner-http", - "version": "3.2.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/http.git", - "reference": "c6aef2a4da22a210aa77539ace4caab8a8bcd337" + "reference": "c6fb29998a1074c82038cb280c2c6bb61b2d178f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/http/zipball/c6aef2a4da22a210aa77539ace4caab8a8bcd337", - "reference": "c6aef2a4da22a210aa77539ace4caab8a8bcd337", + "url": "https://api.github.com/repos/roadrunner-php/http/zipball/c6fb29998a1074c82038cb280c2c6bb61b2d178f", + "reference": "c6fb29998a1074c82038cb280c2c6bb61b2d178f", "shasum": "" }, "require": { @@ -2915,8 +3004,7 @@ "jetbrains/phpstorm-attributes": "^1.0", "nyholm/psr7": "^1.3", "phpunit/phpunit": "^10.0", - "symfony/process": "^6.2", - "symfony/var-dumper": "^6.3", + "symfony/process": "^6.2 || ^7.0", "vimeo/psalm": "^5.9" }, "suggest": { @@ -2962,10 +3050,10 @@ "homepage": "https://spiral.dev/", "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://roadrunner.dev/docs", + "docs": "https://docs.roadrunner.dev", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/http/tree/3.2.0" + "source": "https://github.com/roadrunner-php/http/tree/v3.4.0" }, "funding": [ { @@ -2973,20 +3061,20 @@ "type": "github" } ], - "time": "2023-10-04T09:40:13+00:00" + "time": "2024-02-05T13:06:59+00:00" }, { "name": "spiral/roadrunner-jobs", - "version": "4.2.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/jobs.git", - "reference": "d031e96de1652b0fa9e605ca49eaff898f01fd34" + "reference": "b0903fe3921151d23c10f6b1b4ac19a320aead29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/jobs/zipball/d031e96de1652b0fa9e605ca49eaff898f01fd34", - "reference": "d031e96de1652b0fa9e605ca49eaff898f01fd34", + "url": "https://api.github.com/repos/roadrunner-php/jobs/zipball/b0903fe3921151d23c10f6b1b4ac19a320aead29", + "reference": "b0903fe3921151d23c10f6b1b4ac19a320aead29", "shasum": "" }, "require": { @@ -3047,7 +3135,7 @@ "docs": "https://roadrunner.dev/docs", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/jobs/tree/4.2.0" + "source": "https://github.com/roadrunner-php/jobs/tree/4.3.0" }, "funding": [ { @@ -3055,7 +3143,7 @@ "type": "github" } ], - "time": "2023-10-06T10:10:55+00:00" + "time": "2023-11-08T13:23:40+00:00" }, { "name": "spiral/roadrunner-kv", @@ -3225,22 +3313,22 @@ }, { "name": "spiral/roadrunner-services", - "version": "2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/roadrunner-php/services.git", - "reference": "9b5cdb6e058e4f6dd378fd0cd685c3677a7e20ac" + "reference": "362208a5a231fd65aa99f3da6f3b5ea3a8e9596b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/services/zipball/9b5cdb6e058e4f6dd378fd0cd685c3677a7e20ac", - "reference": "9b5cdb6e058e4f6dd378fd0cd685c3677a7e20ac", + "url": "https://api.github.com/repos/roadrunner-php/services/zipball/362208a5a231fd65aa99f3da6f3b5ea3a8e9596b", + "reference": "362208a5a231fd65aa99f3da6f3b5ea3a8e9596b", "shasum": "" }, "require": { "google/protobuf": "^3.7", "php": ">=8.1", - "roadrunner-php/roadrunner-api-dto": "^1.1", + "roadrunner-php/roadrunner-api-dto": "^1.4", "spiral/goridge": "^4.0", "spiral/roadrunner": "^2023.2" }, @@ -3281,10 +3369,10 @@ "homepage": "https://roadrunner.dev/", "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://roadrunner.dev/docs", + "docs": "https://docs.roadrunner.dev", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/services/tree/2.1.0" + "source": "https://github.com/roadrunner-php/services/tree/v2.1.1" }, "funding": [ { @@ -3292,7 +3380,7 @@ "type": "github" } ], - "time": "2023-07-12T07:25:55+00:00" + "time": "2024-02-19T15:18:52+00:00" }, { "name": "spiral/roadrunner-tcp", @@ -3373,16 +3461,16 @@ }, { "name": "spiral/roadrunner-worker", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/worker.git", - "reference": "88104bfc20c0e8fd90535259fcac69aedec98871" + "reference": "53f81c3e138a650c4605fcd60cae7c89ef24061f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/88104bfc20c0e8fd90535259fcac69aedec98871", - "reference": "88104bfc20c0e8fd90535259fcac69aedec98871", + "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/53f81c3e138a650c4605fcd60cae7c89ef24061f", + "reference": "53f81c3e138a650c4605fcd60cae7c89ef24061f", "shasum": "" }, "require": { @@ -3397,7 +3485,7 @@ "require-dev": { "jetbrains/phpstorm-attributes": "^1.0", "phpunit/phpunit": "^10.0", - "symfony/var-dumper": "^6.3", + "symfony/var-dumper": "^6.3 || ^7.0", "vimeo/psalm": "^5.9" }, "suggest": { @@ -3446,7 +3534,7 @@ "docs": "https://roadrunner.dev/docs", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/worker/tree/3.2.0" + "source": "https://github.com/roadrunner-php/worker/tree/3.3.0" }, "funding": [ { @@ -3454,40 +3542,40 @@ "type": "github" } ], - "time": "2023-10-10T10:14:17+00:00" + "time": "2023-12-05T19:53:37+00:00" }, { "name": "spiral/tokenizer", - "version": "3.9.1", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/spiral/tokenizer.git", - "reference": "05aa5ab2b984545b5e383059d0fae32e1a885ac6" + "reference": "67be0d5e6493740008a2cee2cc26bea30a4a513b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/tokenizer/zipball/05aa5ab2b984545b5e383059d0fae32e1a885ac6", - "reference": "05aa5ab2b984545b5e383059d0fae32e1a885ac6", + "url": "https://api.github.com/repos/spiral/tokenizer/zipball/67be0d5e6493740008a2cee2cc26bea30a4a513b", + "reference": "67be0d5e6493740008a2cee2cc26bea30a4a513b", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=8.1", - "spiral/core": "^3.9.1", - "spiral/logger": "^3.9.1", - "symfony/finder": "^5.3.7|^6.0" + "spiral/core": "^3.11.1", + "spiral/logger": "^3.11.1", + "symfony/finder": "^5.3.7 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^10.1", "spiral/attributes": "^2.8|^3.0", - "spiral/boot": "^3.9.1", - "spiral/files": "^3.9.1", + "spiral/boot": "^3.11.1", + "spiral/files": "^3.11.1", "vimeo/psalm": "^5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.10.x-dev" + "dev-master": "3.12.x-dev" } }, "autoload": { @@ -3523,47 +3611,50 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/tokenizer" }, - "time": "2023-10-24T14:07:58+00:00" + "time": "2023-12-29T10:41:21+00:00" }, { "name": "symfony/console", - "version": "v6.3.8", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" + "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", - "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "url": "https://api.github.com/repos/symfony/console/zipball/c5010d50f1ee4b25cfa0201d9915cf1b14071456", + "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3597,7 +3688,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.8" + "source": "https://github.com/symfony/console/tree/v7.0.3" }, "funding": [ { @@ -3613,7 +3704,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T08:09:35+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3684,20 +3775,20 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.1", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + "reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2890e3a825bc0c0558526c04499c13f83e1b6b12", + "reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -3727,7 +3818,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + "source": "https://github.com/symfony/filesystem/tree/v7.0.3" }, "funding": [ { @@ -3743,27 +3834,27 @@ "type": "tidelift" } ], - "time": "2023-06-01T08:30:39+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/finder", - "version": "v6.3.5", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3791,7 +3882,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.5" + "source": "https://github.com/symfony/finder/tree/v7.0.0" }, "funding": [ { @@ -3807,32 +3898,31 @@ "type": "tidelift" } ], - "time": "2023-09-26T12:56:25+00:00" + "time": "2023-10-31T17:59:56+00:00" }, { "name": "symfony/http-client", - "version": "v6.3.8", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "0314e2d49939a9831929d6fc81c01c6df137fd0a" + "reference": "3d2605c07cd14aec294f72f5bf8147702f7a5ada" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/0314e2d49939a9831929d6fc81c01c6df137fd0a", - "reference": "0314e2d49939a9831929d6fc81c01c6df137fd0a", + "url": "https://api.github.com/repos/symfony/http-client/zipball/3d2605c07cd14aec294f72f5bf8147702f7a5ada", + "reference": "3d2605c07cd14aec294f72f5bf8147702f7a5ada", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-client-contracts": "^3", "symfony/service-contracts": "^2.5|^3" }, "conflict": { "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.3" + "symfony/http-foundation": "<6.4" }, "provide": { "php-http/async-client-implementation": "*", @@ -3849,10 +3939,11 @@ "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/stopwatch": "^5.4|^6.0" + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -3883,7 +3974,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.3.8" + "source": "https://github.com/symfony/http-client/tree/v7.0.3" }, "funding": [ { @@ -3899,7 +3990,7 @@ "type": "tidelift" } ], - "time": "2023-11-06T18:31:59+00:00" + "time": "2024-01-29T15:41:16+00:00" }, { "name": "symfony/http-client-contracts", @@ -3981,16 +4072,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -4004,9 +4095,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4043,7 +4131,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -4059,20 +4147,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -4083,9 +4171,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4124,7 +4209,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -4140,20 +4225,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -4166,9 +4251,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4211,7 +4293,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -4227,20 +4309,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -4251,9 +4333,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4295,7 +4374,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -4311,20 +4390,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4338,9 +4417,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4378,7 +4454,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4394,20 +4470,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -4415,9 +4491,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4454,7 +4527,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -4470,20 +4543,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -4491,9 +4564,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4537,7 +4607,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -4553,24 +4623,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.3.4", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "937a195147e0c27b2759ade834169ed006d0bc74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/937a195147e0c27b2759ade834169ed006d0bc74", + "reference": "937a195147e0c27b2759ade834169ed006d0bc74", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -4598,7 +4668,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "source": "https://github.com/symfony/process/tree/v7.0.3" }, "funding": [ { @@ -4614,25 +4684,25 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4680,7 +4750,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -4696,24 +4766,24 @@ "type": "tidelift" } ], - "time": "2023-07-30T20:28:31+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", - "version": "v6.3.8", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "13880a87790c76ef994c91e87efb96134522577a" + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", - "reference": "13880a87790c76ef994c91e87efb96134522577a", + "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -4723,11 +4793,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4766,7 +4836,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.8" + "source": "https://github.com/symfony/string/tree/v7.0.3" }, "funding": [ { @@ -4782,20 +4852,20 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:28:21+00:00" + "time": "2024-01-29T15:41:16+00:00" }, { "name": "symfony/translation", - "version": "v6.3.7", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499" + "reference": "637c51191b6b184184bbf98937702bcf554f7d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/30212e7c87dcb79c83f6362b00bde0e0b1213499", - "reference": "30212e7c87dcb79c83f6362b00bde0e0b1213499", + "url": "https://api.github.com/repos/symfony/translation/zipball/637c51191b6b184184bbf98937702bcf554f7d04", + "reference": "637c51191b6b184184bbf98937702bcf554f7d04", "shasum": "" }, "require": { @@ -4818,19 +4888,19 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/intl": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0" + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -4861,7 +4931,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.3.7" + "source": "https://github.com/symfony/translation/tree/v6.4.3" }, "funding": [ { @@ -4877,20 +4947,20 @@ "type": "tidelift" } ], - "time": "2023-10-28T23:11:45+00:00" + "time": "2024-01-29T13:11:52+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" + "reference": "06450585bf65e978026bda220cdebca3f867fde7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", + "reference": "06450585bf65e978026bda220cdebca3f867fde7", "shasum": "" }, "require": { @@ -4939,7 +5009,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" }, "funding": [ { @@ -4955,32 +5025,31 @@ "type": "tidelift" } ], - "time": "2023-07-25T15:08:44+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/yaml", - "version": "v6.3.8", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92" + "reference": "2d4fca631c00700597e9442a0b2451ce234513d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92", - "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2d4fca631c00700597e9442a0b2451ce234513d3", + "reference": "2d4fca631c00700597e9442a0b2451ce234513d3", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^6.4|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -5011,7 +5080,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.3.8" + "source": "https://github.com/symfony/yaml/tree/v7.0.3" }, "funding": [ { @@ -5027,20 +5096,20 @@ "type": "tidelift" } ], - "time": "2023-11-06T10:58:05+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "temporal/sdk", - "version": "dev-master", + "version": "dev-updates", "source": { "type": "git", "url": "https://github.com/temporalio/sdk-php.git", - "reference": "530308a0cdc39a675fe1f08c0fe0b6ebf136590b" + "reference": "fc7ade25696a815f979f495902e72071ab2d8d38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/530308a0cdc39a675fe1f08c0fe0b6ebf136590b", - "reference": "530308a0cdc39a675fe1f08c0fe0b6ebf136590b", + "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/fc7ade25696a815f979f495902e72071ab2d8d38", + "reference": "fc7ade25696a815f979f495902e72071ab2d8d38", "shasum": "" }, "require": { @@ -5054,40 +5123,37 @@ "psr/log": "^2.0 || ^3.0", "ramsey/uuid": "^4.7", "react/promise": "^2.9", - "roadrunner-php/roadrunner-api-dto": "^1.3", + "roadrunner-php/roadrunner-api-dto": "^1.4", "roadrunner-php/version-checker": "^1.0", - "spiral/attributes": "^2.8 || ^3.0", - "spiral/roadrunner": "^v2023.2", + "spiral/attributes": "^3.1.4", + "spiral/roadrunner": "^v2023.3.11", "spiral/roadrunner-cli": "^2.5", "spiral/roadrunner-kv": "^4.0", "spiral/roadrunner-worker": "^3.0", - "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", - "symfony/http-client": "^4.4.27 || ^5.0 || ^6.0", - "symfony/process": "^5.4 || ^6.0" + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/http-client": "^5.4 || ^6.0 || ^7.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "buggregator/trap": "^1.0.2", + "buggregator/trap": "^1.2.2", "composer/composer": "^2.0", "dereuromark/composer-prefer-lowest": "^0.1.10", - "doctrine/annotations": "^1.11", + "doctrine/annotations": "^1.14|^2.0.0", "friendsofphp/php-cs-fixer": "^3.0", "illuminate/support": "^9.0", "jetbrains/phpstorm-attributes": "dev-master@dev", "laminas/laminas-code": "^4.0", - "monolog/monolog": "^2.1 || ^3.0", - "phpunit/phpunit": "^9.5.21", - "symfony/translation": "^6.0", - "symfony/var-dumper": "^6.0", + "phpunit/phpunit": "^10.5", + "symfony/var-dumper": "^6.0 || ^7.0", "vimeo/psalm": "^4.30 || ^5.4" }, "suggest": { "doctrine/annotations": "^1.11 for Doctrine metadata driver support" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7.x-dev" + "dev-master": "2.8.x-dev" } }, "autoload": { @@ -5120,7 +5186,7 @@ "issues": "https://github.com/temporalio/sdk-php/issues", "source": "https://github.com/temporalio/sdk-php" }, - "time": "2023-11-13T18:05:08+00:00" + "time": "2024-02-21T17:07:37+00:00" } ], "packages-dev": [], diff --git a/tests/php_test_files/src/Workflow/UpdateWorkflow.php b/tests/php_test_files/src/Workflow/UpdateWorkflow.php new file mode 100644 index 00000000..8124f4d4 --- /dev/null +++ b/tests/php_test_files/src/Workflow/UpdateWorkflow.php @@ -0,0 +1,91 @@ + $this->exit); + return $this->greetings; + } + + #[Workflow\UpdateMethod] + public function addNameWithoutValidation(string $name): mixed + { + $this->greetings[] = $result = \sprintf('Hello, %s!', $name); + return $result; + } + + #[Workflow\UpdateMethod] + public function addName(string $name): mixed + { + $this->greetings[] = $result = \sprintf('Hello, %s!', $name); + return $result; + } + + #[Workflow\UpdateMethod] + public function randomizeName(int $count = 1): mixed + { + $promises = []; + for ($i = 0; $i < $count; $i++) { + $promises[] = Workflow::sideEffect( + static fn(): string => \sprintf('Hello, %s!', ['Antony', 'Alexey', 'John'][\random_int(0, 2)]), + )->then( + function (string $greeting) { + $this->greetings[] = $greeting; + } + ); + } + yield Promise::all($promises); + return $this->greetings; + } + + #[Workflow\UpdateMethod] + public function addNameViaActivity(string $name): mixed + { + $name = yield Workflow::newActivityStub(SimpleActivity::class)->lower($name); + $this->greetings[] = $result = \sprintf('Hello, %s!', $name); + return $result; + } + + #[Workflow\UpdateValidatorMethod(forUpdate: 'addName')] + public function validateName(string $name): void + { + if (\preg_match('/\\d/', $name) === 1) { + throw new \InvalidArgumentException('Name must not contain digits'); + } + } + + #[Workflow\UpdateMethod] + public function throwException(string $name): mixed + { + throw new \Exception("Test exception with $name"); + } + + #[Workflow\SignalMethod] + public function exit(): void + { + $this->exit = true; + } +} diff --git a/tests/query_test.go b/tests/query_test.go index 2f6bb2f2..b696ed3b 100644 --- a/tests/query_test.go +++ b/tests/query_test.go @@ -17,7 +17,7 @@ func Test_ListQueriesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -80,7 +80,7 @@ func Test_GetQueryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -115,7 +115,7 @@ func Test_ListQueriesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -146,7 +146,7 @@ func Test_GetQueryLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/rpc_test.go b/tests/rpc_test.go index 4b20e6c6..fe531ee3 100644 --- a/tests/rpc_test.go +++ b/tests/rpc_test.go @@ -26,7 +26,7 @@ func Test_RPC_Methods(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/signal_test.go b/tests/signal_test.go index 9ee8c995..58980999 100644 --- a/tests/signal_test.go +++ b/tests/signal_test.go @@ -17,7 +17,7 @@ func Test_SignalsWithoutSignalsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -40,7 +40,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -77,7 +77,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -114,7 +114,7 @@ func Test_RuntimeSignalProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -148,7 +148,7 @@ func Test_SignalStepsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -196,7 +196,7 @@ func Test_SignalsWithoutSignalsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -219,7 +219,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -256,7 +256,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -293,7 +293,7 @@ func Test_RuntimeSignalLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -327,7 +327,7 @@ func Test_SignalStepsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerLA(t, stopCh, wg) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/updates_test.go b/tests/updates_test.go new file mode 100644 index 00000000..9668fb2c --- /dev/null +++ b/tests/updates_test.go @@ -0,0 +1,95 @@ +package tests + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.temporal.io/api/enums/v1" + "go.temporal.io/api/history/v1" + "go.temporal.io/sdk/client" +) + +func Test_UpdatesInit(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + "Update.greet") + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), "addName", "John Doe") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, "Hello, John Doe!", result.(string)) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "exit", nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_UpdatesSideEffect(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + "Update.greet") + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), "randomizeName", 3) + require.NoError(t, err) + + var result []any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Len(t, result, 3) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "exit", nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} From c3036f69f100842037e3f123703a7d5e1d1dca58 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 28 Feb 2024 21:08:57 +0100 Subject: [PATCH 04/19] chore: tests refactoring Signed-off-by: Valery Piashchynski --- go.mod | 18 +-- go.sum | 52 +++----- go.work.sum | 19 +++ tests/cancel_test.go | 33 ++--- tests/child_test.go | 17 +-- tests/disaster_test.go | 27 ++-- tests/general_test.go | 3 +- tests/go.mod | 40 +++--- tests/go.sum | 96 ++++++-------- tests/{ => helpers}/helpers.go | 2 +- .../temporal_interceptor_plugin.go | 2 +- tests/hp_test.go | 63 +++++----- tests/interceptor_test.go | 3 +- tests/metrics_test.go | 7 +- tests/otlp_test.go | 3 +- tests/php_test_files/composer.json | 2 +- tests/php_test_files/composer.lock | 82 ++++++------ .../src/Workflow/AwaitsUpdateWorkflow.php | 118 ++++++++++++++++++ .../src/Workflow/UpdateWorkflow.php | 22 ++-- tests/query_test.go | 9 +- tests/rpc_test.go | 3 +- tests/signal_test.go | 21 ++-- tests/tls/cancel_tls_test.go | 34 ++--- tests/tls/child_tls_test.go | 18 +-- tests/tls/disaster_tls_test.go | 28 ++--- tests/tls/general_tls_test.go | 4 +- tests/tls/hp_tls_test.go | 62 ++++----- tests/tls/metrics_tls_test.go | 16 ++- tests/tls/query_tls_test.go | 10 +- tests/tls/signal_tls_test.go | 22 ++-- tests/updates/updates_async_test.go | 1 + tests/{ => updates}/updates_test.go | 7 +- 32 files changed, 486 insertions(+), 358 deletions(-) rename tests/{ => helpers}/helpers.go (99%) rename tests/{ => helpers}/temporal_interceptor_plugin.go (98%) create mode 100644 tests/php_test_files/src/Workflow/AwaitsUpdateWorkflow.php create mode 100644 tests/updates/updates_async_test.go rename tests/{ => updates}/updates_test.go (92%) diff --git a/go.mod b/go.mod index 008a794f..c4c982df 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,14 @@ go 1.22.0 require ( github.com/goccy/go-json v0.10.2 github.com/google/uuid v1.6.0 - github.com/roadrunner-server/api/v4 v4.11.0 + github.com/roadrunner-server/api/v4 v4.11.1 github.com/roadrunner-server/endure/v2 v2.4.3 github.com/roadrunner-server/errors v1.4.0 github.com/roadrunner-server/sdk/v4 v4.6.0 github.com/stretchr/testify v1.8.4 github.com/uber-go/tally/v4 v4.1.10 - go.temporal.io/api v1.27.0 - go.temporal.io/sdk v1.26.0-rc.2 + go.temporal.io/api v1.28.0 + go.temporal.io/sdk v1.26.0-rc.3 go.temporal.io/sdk/contrib/tally v0.2.0 go.temporal.io/server v1.22.5 go.uber.org/zap v1.27.0 @@ -36,9 +36,9 @@ require ( github.com/pborman/uuid v1.2.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/goridge/v3 v3.8.1 github.com/robfig/cron v1.2.0 // indirect @@ -51,15 +51,15 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.62.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7269355a..75dc22c1 100644 --- a/go.sum +++ b/go.sum @@ -18,7 +18,6 @@ github.com/cactus/go-statsd-client/v5 v5.0.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4 github.com/cactus/go-statsd-client/v5 v5.1.0 h1:sbbdfIl9PgisjEoXzvXI1lwUKWElngsjJKaZeC021P4= github.com/cactus/go-statsd-client/v5 v5.1.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4eeDw9maJBMIuMPBZbY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -100,7 +99,6 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= @@ -145,29 +143,27 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= -github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/roadrunner-server/api/v4 v4.11.0 h1:N/MX+9r0ExSQ3rJG7sYUc2WQkWYYnJTJDUhxkx3UdX0= -github.com/roadrunner-server/api/v4 v4.11.0/go.mod h1:+OkLfVYQM24v7uU+txIyCyE5U9qtxVwX3xMafzKpfzY= +github.com/roadrunner-server/api/v4 v4.11.1 h1:QDcAg+2YL6z1dBWUZi32qyFUaJAAF6LsIO8hqATegZU= +github.com/roadrunner-server/api/v4 v4.11.1/go.mod h1:YA8GSWngFSJMtloWsuqJg6GO9a2O9Lcz/743PxaCwd0= github.com/roadrunner-server/endure/v2 v2.4.3 h1:R9DdsLiLjtSFivZ1HKk/1eDZ0TYaKHQzakVwz9D2hto= github.com/roadrunner-server/endure/v2 v2.4.3/go.mod h1:4n3PdwZ3h/IRL2enDGvEVXtaQgqRnZ74VOyZtOJq528= github.com/roadrunner-server/errors v1.4.0 h1:Odjg3VZrj1q5Y8ILwoN+JgERyv0pkhrWPNOM4h68iQ8= @@ -222,15 +218,13 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.temporal.io/api v1.5.0/go.mod h1:BqKxEJJYdxb5dqf0ODfzfMxh8UEQ5L3zKS51FiIYYkA= -go.temporal.io/api v1.27.0 h1:M7a7p3A/gIKEMAYVBQD+/2hfzh/hC0410393TwD20Ko= -go.temporal.io/api v1.27.0/go.mod h1:iASB2zPPR+FtFKn5w7/hF7AG2dkvkW7TTMAqL06tz0g= +go.temporal.io/api v1.28.0 h1:P97+SxhV7jORPz7WAYx5qIF0BUr44XbgmdBbpjUsnMc= +go.temporal.io/api v1.28.0/go.mod h1:sAtVCXkwNaCtHVMP6B/FlK8PcEnaDjJ+KHCwS/ufscI= go.temporal.io/sdk v1.12.0/go.mod h1:lSp3lH1lI0TyOsus0arnO3FYvjVXBZGi/G7DjnAnm6o= -go.temporal.io/sdk v1.26.0-rc.2 h1:0NX4wR2qwD6xCv+JNhZdViamsITMYWzZkUqBJEIVHBw= -go.temporal.io/sdk v1.26.0-rc.2/go.mod h1:HDr8fIWJ/HF8dJwTPgOayI8PYB5WoVIxUMjzE78M2ng= +go.temporal.io/sdk v1.26.0-rc.3 h1:klb8p/KE/oofnCc7H2YbLz1qgxcfKc0khlX5ZcxIInk= +go.temporal.io/sdk v1.26.0-rc.3/go.mod h1:HDr8fIWJ/HF8dJwTPgOayI8PYB5WoVIxUMjzE78M2ng= 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.22.4 h1:Pj0virq3yqMAzyBSerpCHvYBmvwjuQ6DVDbERO9jYx4= -go.temporal.io/server v1.22.4/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= go.temporal.io/server v1.22.5 h1:bZEXDcV2RwHuv2j38nW1nouN3SCMMqIoDq37Ci4gi+0= go.temporal.io/server v1.22.5/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -248,8 +242,6 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -257,8 +249,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -363,18 +355,12 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= -google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 h1:4++qSzdWBUy9/2x8L5KZgwZw+mjJZ2yDSCGMVM0YzRs= -google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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= @@ -384,8 +370,6 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/go.work.sum b/go.work.sum index cdfad7dc..67262278 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1751,6 +1751,7 @@ github.com/centrifugal/centrifuge-go v0.10.1 h1:aAiW8SeJygYjyjvb6C7WM9uNDmVEAN60 github.com/centrifugal/centrifuge-go v0.10.1/go.mod h1:jYJB6Nony+XVRbMJUZCzL2iDAp9rkJT7SRmf7Y1fQMY= github.com/centrifugal/protocol v0.10.0 h1:Lac48ATVjVjirYPTHxbSMmiQXXajx7dhARKHy1UOL+A= github.com/centrifugal/protocol v0.10.0/go.mod h1:Tq5I1mBpLHkLxNM9gfb3Gth+sTE2kKU5hH3cVgmVs9s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= @@ -1957,6 +1958,7 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= @@ -2344,8 +2346,11 @@ go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memca go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFufObyB0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVznctQ9V6KK7Vq6CjmYXJ7DeSs4E= @@ -2360,12 +2365,17 @@ go.opentelemetry.io/otel/exporters/prometheus v0.39.0 h1:whAaiHxOatgtKd+w0dOi//1 go.opentelemetry.io/otel/exporters/prometheus v0.39.0/go.mod h1:4jo5Q4CROlCpSPsXLhymi+LYrDXd2ObU5wbKayfZs7Y= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms20Jb7Bbp+HiTo= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/otel/trace v1.23.0/go.mod h1:GSGTbIClEsuZrGIzoEHqsVfxgn5UkggkflQwDScNUsk= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.20.0 h1:BLOA1cZBAGSbRiNuGCCKiFrCdYB7deeHDeD1SueyOfA= @@ -2485,6 +2495,7 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -2568,6 +2579,8 @@ golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= @@ -2702,6 +2715,7 @@ google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9 google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= @@ -2819,6 +2833,7 @@ google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJ google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= @@ -2840,8 +2855,10 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go. google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3/go.mod h1:k2dtGpRrbsSyKcNPKKI5sstZkrNCZwpU/ns96JoHbGg= google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:B5xPO//w8qmBDjGReYLpR6UJPnkldGkCSMoH/2vxJeg= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc h1:g3hIDl0jRNd9PPTs2uBzYuaD5mQuwOkZY0vSc0LR32o= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5c13 h1:AzcXcS6RbpBm65S0+/F78J9hFCL0/GZWp8oCRZod780= @@ -2867,6 +2884,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= @@ -2898,6 +2916,7 @@ google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230623203957-0b3a81eabc28 h1:soFSbKG2H9FiKip4adXyJL8FEsA+wcFvu1YYMDcKKWY= diff --git a/tests/cancel_test.go b/tests/cancel_test.go index 5a209723..60a80139 100644 --- a/tests/cancel_test.go +++ b/tests/cancel_test.go @@ -4,6 +4,7 @@ import ( "context" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/assert" @@ -17,7 +18,7 @@ func Test_SimpleWorkflowCancelProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -46,7 +47,7 @@ func Test_CancellableWorkflowScopeProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -78,7 +79,7 @@ func Test_CanceledWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -105,7 +106,7 @@ func Test_CanceledWithCompensationWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -154,7 +155,7 @@ func Test_CanceledNestedWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -201,7 +202,7 @@ func Test_CanceledNSingleScopeWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -245,7 +246,7 @@ func Test_CanceledMidflightWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -290,7 +291,7 @@ func Test_CancelSignaledChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -336,7 +337,7 @@ func Test_SimpleWorkflowCancelLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -365,7 +366,7 @@ func Test_CancellableWorkflowScopeLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -396,7 +397,7 @@ func Test_CanceledWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -423,7 +424,7 @@ func Test_CanceledWithCompensationWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -472,7 +473,7 @@ func Test_CanceledNestedWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -519,7 +520,7 @@ func Test_CanceledNSingleScopeWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -563,7 +564,7 @@ func Test_CanceledMidflightWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -608,7 +609,7 @@ func Test_CancelSignaledChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/child_test.go b/tests/child_test.go index d2e89080..0563fde4 100644 --- a/tests/child_test.go +++ b/tests/child_test.go @@ -4,6 +4,7 @@ import ( "context" "sync" "testing" + "tests/helpers" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" @@ -13,7 +14,7 @@ func Test_ExecuteChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -36,7 +37,7 @@ func Test_ExecuteChildStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -59,7 +60,7 @@ func Test_ExecuteChildStubWorkflow_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -82,7 +83,7 @@ func Test_SignalChildViaStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -106,7 +107,7 @@ func Test_ExecuteChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -129,7 +130,7 @@ func Test_ExecuteChildStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -152,7 +153,7 @@ func Test_ExecuteChildStubWorkflowLA_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -175,7 +176,7 @@ func Test_SignalChildViaStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/disaster_test.go b/tests/disaster_test.go index cce191fd..52af3529 100644 --- a/tests/disaster_test.go +++ b/tests/disaster_test.go @@ -8,6 +8,7 @@ import ( "sync" "syscall" "testing" + "tests/helpers" "time" goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc" @@ -21,7 +22,7 @@ func Test_WorkerError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -55,7 +56,7 @@ func Test_ResetAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -96,7 +97,7 @@ func Test_ResetWFWorker(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -144,7 +145,7 @@ func Test_ActivityError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -192,7 +193,7 @@ func Test_WorkerError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -226,7 +227,7 @@ func Test_WorkerError_DisasterRecovery_Heavy(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -280,7 +281,7 @@ func Test_ActivityError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") defer func() { // always restore script @@ -329,7 +330,7 @@ func Test_WorkerError_DisasterRecovery_HeavyLA(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script @@ -383,7 +384,7 @@ func Test_WorkerErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -417,7 +418,7 @@ func Test_ResetLAAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -458,7 +459,7 @@ func Test_ActivityErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script @@ -506,7 +507,7 @@ func Test_WorkerErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -540,7 +541,7 @@ func Test_ActivityErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") defer func() { // always restore script diff --git a/tests/general_test.go b/tests/general_test.go index 981ab6f1..4aa424b6 100644 --- a/tests/general_test.go +++ b/tests/general_test.go @@ -4,6 +4,7 @@ import ( "context" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/assert" @@ -14,7 +15,7 @@ func Test_HistoryLen(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/go.mod b/tests/go.mod index 50d08a98..94e2e91a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/fatih/color v1.16.0 github.com/pborman/uuid v1.2.1 - github.com/roadrunner-server/api/v4 v4.11.0 + github.com/roadrunner-server/api/v4 v4.11.1 github.com/roadrunner-server/config/v4 v4.6.8 github.com/roadrunner-server/endure/v2 v2.4.3 github.com/roadrunner-server/goridge/v3 v3.8.1 @@ -19,8 +19,8 @@ require ( github.com/roadrunner-server/status/v4 v4.4.14 github.com/stretchr/testify v1.8.4 github.com/temporalio/roadrunner-temporal/v4 v4.6.0 - go.temporal.io/api v1.27.0 - go.temporal.io/sdk v1.26.0-rc.2 + go.temporal.io/api v1.28.0 + go.temporal.io/sdk v1.26.0-rc.3 go.uber.org/zap v1.27.0 ) @@ -57,9 +57,9 @@ require ( github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/errors v1.4.0 // indirect github.com/roadrunner-server/tcplisten v1.4.0 // indirect @@ -81,32 +81,32 @@ require ( github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect - go.opentelemetry.io/contrib/propagators/jaeger v1.23.0 // indirect - go.opentelemetry.io/otel v1.23.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.23.1 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.23.1 // indirect - go.opentelemetry.io/otel/metric v1.23.1 // indirect - go.opentelemetry.io/otel/sdk v1.23.1 // indirect - go.opentelemetry.io/otel/trace v1.23.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.24.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.temporal.io/sdk/contrib/opentelemetry v0.4.0 // indirect go.temporal.io/sdk/contrib/tally v0.2.0 // indirect go.temporal.io/server v1.22.5 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc v1.62.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index 359f652d..337b359d 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -20,7 +20,6 @@ github.com/cactus/go-statsd-client/v5 v5.1.0/go.mod h1:COEvJ1E+/E2L4q6QE5CkjWPi4 github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -115,7 +114,6 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= @@ -177,29 +175,27 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= -github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/roadrunner-server/api/v4 v4.11.0 h1:N/MX+9r0ExSQ3rJG7sYUc2WQkWYYnJTJDUhxkx3UdX0= -github.com/roadrunner-server/api/v4 v4.11.0/go.mod h1:+OkLfVYQM24v7uU+txIyCyE5U9qtxVwX3xMafzKpfzY= +github.com/roadrunner-server/api/v4 v4.11.1 h1:QDcAg+2YL6z1dBWUZi32qyFUaJAAF6LsIO8hqATegZU= +github.com/roadrunner-server/api/v4 v4.11.1/go.mod h1:YA8GSWngFSJMtloWsuqJg6GO9a2O9Lcz/743PxaCwd0= github.com/roadrunner-server/config/v4 v4.6.8 h1:dxG+VdPL5+7JG1BMjvs21sqZdqEAr7EFuLxk3XEhR8Q= github.com/roadrunner-server/config/v4 v4.6.8/go.mod h1:Bh7SBen7Bb38ex8j1F3xAcvARsLsxbLbLCVw/vZBd8c= github.com/roadrunner-server/endure/v2 v2.4.3 h1:R9DdsLiLjtSFivZ1HKk/1eDZ0TYaKHQzakVwz9D2hto= @@ -290,45 +286,43 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= -go.opentelemetry.io/contrib/propagators/jaeger v1.23.0 h1:KFxfTCTkH1usVFzDaWzbmNdFX7ybUTCtkLsUTww0nG4= -go.opentelemetry.io/contrib/propagators/jaeger v1.23.0/go.mod h1:xU+81opGquQICJGzwscLXAQLnIPWI+q7Zu4AQSrgXf8= -go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= -go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1 h1:o8iWeVFa1BcLtVEV0LzrCxV2/55tB3xLxADr6Kyoey4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.1/go.mod h1:SEVfdK4IoBnbT2FXNM/k8yC08MrfbhWk3U4ljM8B3HE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1 h1:p3A5+f5l9e/kuEBwLOrnpkIDHQFlHmbiVxMURWRK6gQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.1/go.mod h1:OClrnXUjBqQbInvjJFjYSnMxBSCXBF8r3b34WqjiIrQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 h1:cfuy3bXmLJS7M1RZmAL6SuhGtKUp2KEsrm00OlAXkq4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1/go.mod h1:22jr92C6KwlwItJmQzfixzQM3oyyuYLCfHiMY+rpsPU= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.23.1 h1:IqmsDcJnxQSs6W+1TMSqpYO7VY4ZuEKJGYlSBPUlT1s= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.23.1/go.mod h1:VMZ84RYOd4Lrp0+09mckDvqBj2PXWDwOFaxb1P5uO8g= -go.opentelemetry.io/otel/exporters/zipkin v1.23.1 h1:goka4KdsPPpHHQnzp1/XE1wVpk2oQO9RXCOH4MZWSyg= -go.opentelemetry.io/otel/exporters/zipkin v1.23.1/go.mod h1:KXTI1fJdTqRrQlIYgdmF4MnyAbHFWg1z320eOpL53qA= -go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= -go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= -go.opentelemetry.io/otel/sdk v1.23.1 h1:O7JmZw0h76if63LQdsBMKQDWNb5oEcOThG9IrxscV+E= -go.opentelemetry.io/otel/sdk v1.23.1/go.mod h1:LzdEVR5am1uKOOwfBWFef2DCi1nu3SA8XQxx2IerWFk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/contrib/propagators/jaeger v1.24.0 h1:CKtIfwSgDvJmaWsZROcHzONZgmQdMYn9mVYWypOWT5o= +go.opentelemetry.io/contrib/propagators/jaeger v1.24.0/go.mod h1:Q5JA/Cfdy/ta+5VeEhrMJRWGyS6UNRwFbl+yS3W1h5I= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0 h1:s0PHtIkN+3xrbDOpt2M8OTG92cWqUESvzh2MxiR5xY8= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.24.0/go.mod h1:hZlFbDbRt++MMPCCfSJfmhkGIWnX1h3XjkfxZUjLrIA= +go.opentelemetry.io/otel/exporters/zipkin v1.24.0 h1:3evrL5poBuh1KF51D9gO/S+N/1msnm4DaBqs/rpXUqY= +go.opentelemetry.io/otel/exporters/zipkin v1.24.0/go.mod h1:0EHgD8R0+8yRhUYJOGR8Hfg2dpiJQxDOszd5smVO9wM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= -go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.temporal.io/api v1.5.0/go.mod h1:BqKxEJJYdxb5dqf0ODfzfMxh8UEQ5L3zKS51FiIYYkA= -go.temporal.io/api v1.27.0 h1:M7a7p3A/gIKEMAYVBQD+/2hfzh/hC0410393TwD20Ko= -go.temporal.io/api v1.27.0/go.mod h1:iASB2zPPR+FtFKn5w7/hF7AG2dkvkW7TTMAqL06tz0g= +go.temporal.io/api v1.28.0 h1:P97+SxhV7jORPz7WAYx5qIF0BUr44XbgmdBbpjUsnMc= +go.temporal.io/api v1.28.0/go.mod h1:sAtVCXkwNaCtHVMP6B/FlK8PcEnaDjJ+KHCwS/ufscI= go.temporal.io/sdk v1.12.0/go.mod h1:lSp3lH1lI0TyOsus0arnO3FYvjVXBZGi/G7DjnAnm6o= -go.temporal.io/sdk v1.26.0-rc.2 h1:0NX4wR2qwD6xCv+JNhZdViamsITMYWzZkUqBJEIVHBw= -go.temporal.io/sdk v1.26.0-rc.2/go.mod h1:HDr8fIWJ/HF8dJwTPgOayI8PYB5WoVIxUMjzE78M2ng= +go.temporal.io/sdk v1.26.0-rc.3 h1:klb8p/KE/oofnCc7H2YbLz1qgxcfKc0khlX5ZcxIInk= +go.temporal.io/sdk v1.26.0-rc.3/go.mod h1:HDr8fIWJ/HF8dJwTPgOayI8PYB5WoVIxUMjzE78M2ng= go.temporal.io/sdk/contrib/opentelemetry v0.4.0 h1:Ddx+39cESh4CNFI6cy8TI1OBJC8MUQUDzt6TpIJJjPQ= go.temporal.io/sdk/contrib/opentelemetry v0.4.0/go.mod h1:CR+WkaiDM74Uimy1d+BE4ov+A/2+U2W5ssyDBf33gEQ= 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.22.4 h1:Pj0virq3yqMAzyBSerpCHvYBmvwjuQ6DVDbERO9jYx4= -go.temporal.io/server v1.22.4/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= go.temporal.io/server v1.22.5 h1:bZEXDcV2RwHuv2j38nW1nouN3SCMMqIoDq37Ci4gi+0= go.temporal.io/server v1.22.5/go.mod h1:O4xn5yeqn2ItJv6lZNv2/e0mGAIV6r+FOpM2vPGUSVc= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -346,8 +340,6 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -355,8 +347,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -463,18 +455,12 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ= -google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9 h1:4++qSzdWBUy9/2x8L5KZgwZw+mjJZ2yDSCGMVM0YzRs= -google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o= -google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 h1:hZB7eLIaYlW9qXRfCq/qDaPdbeY3757uARz5Vvfv+cY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:YUWgXUFRPfoYK1IHMuxH5K6nPEXSCzIMljnQ59lLRCk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= 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= @@ -484,8 +470,6 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= -google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/tests/helpers.go b/tests/helpers/helpers.go similarity index 99% rename from tests/helpers.go rename to tests/helpers/helpers.go index 12c241f1..88e24f4d 100644 --- a/tests/helpers.go +++ b/tests/helpers/helpers.go @@ -1,4 +1,4 @@ -package tests +package helpers import ( "context" diff --git a/tests/temporal_interceptor_plugin.go b/tests/helpers/temporal_interceptor_plugin.go similarity index 98% rename from tests/temporal_interceptor_plugin.go rename to tests/helpers/temporal_interceptor_plugin.go index fad63477..d0fedb83 100644 --- a/tests/temporal_interceptor_plugin.go +++ b/tests/helpers/temporal_interceptor_plugin.go @@ -1,4 +1,4 @@ -package tests +package helpers import ( "context" diff --git a/tests/hp_test.go b/tests/hp_test.go index 85b6052c..44f8ed7f 100644 --- a/tests/hp_test.go +++ b/tests/hp_test.go @@ -10,6 +10,7 @@ import ( "strconv" "sync" "testing" + "tests/helpers" "time" goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc" @@ -38,7 +39,7 @@ func Test_VerifyRegistrationProto(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - _ = NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + _ = helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") activities := getActivities(t) workflows := getWorkflows(t) @@ -57,7 +58,7 @@ func Test_ExecuteSimpleWorkflow_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -80,7 +81,7 @@ func Test_ExecuteSimpleWorkflowLA_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -103,7 +104,7 @@ func Test_ExecuteSimpleDTOWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -129,7 +130,7 @@ func Test_ExecuteSimpleDTOWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -155,7 +156,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -178,7 +179,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -201,7 +202,7 @@ func Test_MultipleWorkflowsInSingleWorkerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -237,7 +238,7 @@ func Test_MultipleWorkflowsInSingleWorkerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -273,7 +274,7 @@ func Test_ExecuteWorkflowWithParallelScopesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -296,7 +297,7 @@ func Test_ExecuteWorkflowWithParallelScopesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -319,7 +320,7 @@ func Test_TimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -348,7 +349,7 @@ func Test_TimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -377,7 +378,7 @@ func Test_SideEffectProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -404,7 +405,7 @@ func Test_SideEffectLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -431,7 +432,7 @@ func Test_EmptyWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -454,7 +455,7 @@ func Test_EmptyWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -477,7 +478,7 @@ func Test_PromiseChainingProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -500,7 +501,7 @@ func Test_PromiseChainingLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -523,7 +524,7 @@ func Test_ActivityHeartbeatProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -557,7 +558,7 @@ func Test_BinaryPayloadProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -586,7 +587,7 @@ func Test_BinaryPayloadLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -615,7 +616,7 @@ func Test_ContinueAsNewProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -648,7 +649,7 @@ func Test_ContinueAsNewLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -681,7 +682,7 @@ func Test_ActivityStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -709,7 +710,7 @@ func Test_ActivityStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -737,7 +738,7 @@ func Test_ExecuteProtoWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -760,7 +761,7 @@ func Test_ExecuteProtoWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -783,7 +784,7 @@ func Test_SagaWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -804,7 +805,7 @@ func Test_UpsertSearchAttributesWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") ctx := context.Background() _, err := s.Client.OperatorService().AddSearchAttributes(ctx, &operatorservice.AddSearchAttributesRequest{ @@ -845,7 +846,7 @@ func Test_SagaWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/interceptor_test.go b/tests/interceptor_test.go index 8ee3fb06..5cbae38f 100644 --- a/tests/interceptor_test.go +++ b/tests/interceptor_test.go @@ -5,6 +5,7 @@ import ( "os" "sync" "testing" + "tests/helpers" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" @@ -14,7 +15,7 @@ func Test_CustomInterceptor(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerWithInterceptor(t, stopCh, wg) + s := helpers.NewTestServerWithInterceptor(t, stopCh, wg) w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/metrics_test.go b/tests/metrics_test.go index a54c9f99..82fe9c5c 100644 --- a/tests/metrics_test.go +++ b/tests/metrics_test.go @@ -7,6 +7,7 @@ import ( "net/http" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/assert" @@ -18,7 +19,7 @@ func Test_SimpleWorkflowMetrics(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -71,7 +72,7 @@ func Test_SimpleWorkflowMetricsPrometheusNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics-prom-new.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics-prom-new.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -124,7 +125,7 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-metrics-statsd.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics-statsd.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/otlp_test.go b/tests/otlp_test.go index f6c4097c..6d9dd39f 100644 --- a/tests/otlp_test.go +++ b/tests/otlp_test.go @@ -7,6 +7,7 @@ import ( "os" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/assert" @@ -23,7 +24,7 @@ func Test_OtlpInterceptor(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServerWithOtelInterceptor(t, stopCh, wg) + s := helpers.NewTestServerWithOtelInterceptor(t, stopCh, wg) w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/php_test_files/composer.json b/tests/php_test_files/composer.json index fa906718..0b4d7358 100644 --- a/tests/php_test_files/composer.json +++ b/tests/php_test_files/composer.json @@ -7,7 +7,7 @@ "nyholm/psr7": "^1.5", "spiral/roadrunner-http": "^3.0", "spiral/roadrunner-worker": "^3.0", - "temporal/sdk": "dev-updates#fc7ade25696a815f979f495902e72071ab2d8d38", + "temporal/sdk": "dev-updates#53f72b43ed427162ac39a33b75130472acca02f6", "spiral/tokenizer": ">=2.7", "spiral/roadrunner-metrics": "^3.0", "spiral/roadrunner-grpc": "^3.0", diff --git a/tests/php_test_files/composer.lock b/tests/php_test_files/composer.lock index db278d7f..c346bb6b 100644 --- a/tests/php_test_files/composer.lock +++ b/tests/php_test_files/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "25597927eb3c7036dfff13e4c016115b", + "content-hash": "31de7ebc3708e50f7104b10b2d1d9990", "packages": [ { "name": "brick/math", @@ -3461,16 +3461,16 @@ }, { "name": "spiral/roadrunner-worker", - "version": "3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/worker.git", - "reference": "53f81c3e138a650c4605fcd60cae7c89ef24061f" + "reference": "8efc721a3ced27fd6ef6bca347a69010ff7930cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/53f81c3e138a650c4605fcd60cae7c89ef24061f", - "reference": "53f81c3e138a650c4605fcd60cae7c89ef24061f", + "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/8efc721a3ced27fd6ef6bca347a69010ff7930cb", + "reference": "8efc721a3ced27fd6ef6bca347a69010ff7930cb", "shasum": "" }, "require": { @@ -3531,10 +3531,10 @@ "homepage": "https://spiral.dev/", "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://roadrunner.dev/docs", + "docs": "https://docs.roadrunner.dev", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/worker/tree/3.3.0" + "source": "https://github.com/roadrunner-php/worker/tree/v3.4.0" }, "funding": [ { @@ -3542,7 +3542,7 @@ "type": "github" } ], - "time": "2023-12-05T19:53:37+00:00" + "time": "2024-02-26T11:59:06+00:00" }, { "name": "spiral/tokenizer", @@ -3615,16 +3615,16 @@ }, { "name": "symfony/console", - "version": "v7.0.3", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456" + "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c5010d50f1ee4b25cfa0201d9915cf1b14071456", - "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456", + "url": "https://api.github.com/repos/symfony/console/zipball/6b099f3306f7c9c2d2786ed736d0026b2903205f", + "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f", "shasum": "" }, "require": { @@ -3688,7 +3688,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.0.3" + "source": "https://github.com/symfony/console/tree/v7.0.4" }, "funding": [ { @@ -3704,7 +3704,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-02-22T20:27:20+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3902,16 +3902,16 @@ }, { "name": "symfony/http-client", - "version": "v7.0.3", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "3d2605c07cd14aec294f72f5bf8147702f7a5ada" + "reference": "8384876f49a2316a63f88a9cd12436de6936bee6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/3d2605c07cd14aec294f72f5bf8147702f7a5ada", - "reference": "3d2605c07cd14aec294f72f5bf8147702f7a5ada", + "url": "https://api.github.com/repos/symfony/http-client/zipball/8384876f49a2316a63f88a9cd12436de6936bee6", + "reference": "8384876f49a2316a63f88a9cd12436de6936bee6", "shasum": "" }, "require": { @@ -3974,7 +3974,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.0.3" + "source": "https://github.com/symfony/http-client/tree/v7.0.4" }, "funding": [ { @@ -3990,7 +3990,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T15:41:16+00:00" + "time": "2024-02-15T11:33:06+00:00" }, { "name": "symfony/http-client-contracts", @@ -4627,16 +4627,16 @@ }, { "name": "symfony/process", - "version": "v7.0.3", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "937a195147e0c27b2759ade834169ed006d0bc74" + "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/937a195147e0c27b2759ade834169ed006d0bc74", - "reference": "937a195147e0c27b2759ade834169ed006d0bc74", + "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9", + "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9", "shasum": "" }, "require": { @@ -4668,7 +4668,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.0.3" + "source": "https://github.com/symfony/process/tree/v7.0.4" }, "funding": [ { @@ -4684,7 +4684,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-02-22T20:27:20+00:00" }, { "name": "symfony/service-contracts", @@ -4770,16 +4770,16 @@ }, { "name": "symfony/string", - "version": "v7.0.3", + "version": "v7.0.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", - "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", + "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b", + "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b", "shasum": "" }, "require": { @@ -4836,7 +4836,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.3" + "source": "https://github.com/symfony/string/tree/v7.0.4" }, "funding": [ { @@ -4852,20 +4852,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T15:41:16+00:00" + "time": "2024-02-01T13:17:36+00:00" }, { "name": "symfony/translation", - "version": "v6.4.3", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "637c51191b6b184184bbf98937702bcf554f7d04" + "reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/637c51191b6b184184bbf98937702bcf554f7d04", - "reference": "637c51191b6b184184bbf98937702bcf554f7d04", + "url": "https://api.github.com/repos/symfony/translation/zipball/bce6a5a78e94566641b2594d17e48b0da3184a8e", + "reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e", "shasum": "" }, "require": { @@ -4931,7 +4931,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.3" + "source": "https://github.com/symfony/translation/tree/v6.4.4" }, "funding": [ { @@ -4947,7 +4947,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T13:11:52+00:00" + "time": "2024-02-20T13:16:58+00:00" }, { "name": "symfony/translation-contracts", @@ -5104,12 +5104,12 @@ "source": { "type": "git", "url": "https://github.com/temporalio/sdk-php.git", - "reference": "fc7ade25696a815f979f495902e72071ab2d8d38" + "reference": "53f72b43ed427162ac39a33b75130472acca02f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/fc7ade25696a815f979f495902e72071ab2d8d38", - "reference": "fc7ade25696a815f979f495902e72071ab2d8d38", + "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/53f72b43ed427162ac39a33b75130472acca02f6", + "reference": "53f72b43ed427162ac39a33b75130472acca02f6", "shasum": "" }, "require": { diff --git a/tests/php_test_files/src/Workflow/AwaitsUpdateWorkflow.php b/tests/php_test_files/src/Workflow/AwaitsUpdateWorkflow.php new file mode 100644 index 00000000..f93268eb --- /dev/null +++ b/tests/php_test_files/src/Workflow/AwaitsUpdateWorkflow.php @@ -0,0 +1,118 @@ + $this->exit); + return $this->awaits; + } + + /** + * @param non-empty-string $name + * @return mixed + */ + #[Workflow\UpdateMethod(name: 'await')] + public function add(string $name): mixed + { + $this->awaits[$name] ??= null; + yield Workflow::await(fn() => $this->awaits[$name] !== null); + return $this->awaits[$name]; + } + + #[Workflow\UpdateValidatorMethod(forUpdate: 'await')] + public function validateAdd(string $name): void + { + empty($name) and throw new \InvalidArgumentException('Name must not be empty'); + } + + /** + * @param non-empty-string $name + * @return PromiseInterface + */ + #[Workflow\UpdateMethod(name: 'awaitWithTimeout')] + public function addWithTimeout(string $name, string|int $timeout, mixed $value): mixed + { + $this->awaits[$name] ??= null; + if ($this->awaits[$name] !== null) { + return $this->awaits[$name]; + } + + $notTimeout = yield Workflow::awaitWithTimeout( + $timeout, + fn() => $this->awaits[$name] !== null, + ); + + if (!$notTimeout) { + return $this->awaits[$name] = $value; + } + + return $this->awaits[$name]; + } + + #[Workflow\UpdateValidatorMethod(forUpdate: 'awaitWithTimeout')] + public function validateAddWithTimeout(string $name, string|int $timeout, mixed $value): void + { + $value === null and throw new \InvalidArgumentException('Value must not be null'); + empty($name) and throw new \InvalidArgumentException('Name must not be empty'); + DateInterval::parse($timeout, DateInterval::FORMAT_SECONDS)->isEmpty() and throw new \InvalidArgumentException( + 'Timeout must not be empty' + ); + } + + /** + * @param non-empty-string $name + * @return mixed + */ + #[Workflow\UpdateMethod(name: 'resolveValue')] + public function resolve(string $name, mixed $value): mixed + { + return $this->awaits[$name] = $value; + } + + #[Workflow\UpdateValidatorMethod(forUpdate: 'resolveValue')] + public function validateResolve(string $name, mixed $value): void + { + $value === null and throw new \InvalidArgumentException('Value must not be null'); + \array_key_exists($name, $this->awaits) or throw new \InvalidArgumentException('Name not found'); + $this->awaits[$name] === null or throw new \InvalidArgumentException('Name already resolved'); + } + + /** + * @param non-empty-string $name + * @return mixed + */ + #[Workflow\QueryMethod(name: 'getValue')] + public function get(string $name): mixed + { + return $this->awaits[$name] ?? null; + } + + #[Workflow\SignalMethod] + public function exit(): void + { + $this->exit = true; + } +} diff --git a/tests/php_test_files/src/Workflow/UpdateWorkflow.php b/tests/php_test_files/src/Workflow/UpdateWorkflow.php index 8124f4d4..024b2a21 100644 --- a/tests/php_test_files/src/Workflow/UpdateWorkflow.php +++ b/tests/php_test_files/src/Workflow/UpdateWorkflow.php @@ -11,6 +11,7 @@ namespace Temporal\Tests\Workflow; +use Temporal\Activity\ActivityOptions; use Temporal\Promise; use Temporal\Tests\Activity\SimpleActivity; use Temporal\Workflow; @@ -44,6 +45,14 @@ public function addName(string $name): mixed return $result; } + #[Workflow\UpdateValidatorMethod(forUpdate: 'addName')] + public function validateName(string $name): void + { + if (\preg_match('/\\d/', $name) === 1) { + throw new \InvalidArgumentException('Name must not contain digits'); + } + } + #[Workflow\UpdateMethod] public function randomizeName(int $count = 1): mixed { @@ -64,19 +73,14 @@ function (string $greeting) { #[Workflow\UpdateMethod] public function addNameViaActivity(string $name): mixed { - $name = yield Workflow::newActivityStub(SimpleActivity::class)->lower($name); + $name = yield Workflow::newActivityStub( + SimpleActivity::class, + ActivityOptions::new()->withStartToCloseTimeout('10 seconds'), + )->lower($name); $this->greetings[] = $result = \sprintf('Hello, %s!', $name); return $result; } - #[Workflow\UpdateValidatorMethod(forUpdate: 'addName')] - public function validateName(string $name): void - { - if (\preg_match('/\\d/', $name) === 1) { - throw new \InvalidArgumentException('Name must not contain digits'); - } - } - #[Workflow\UpdateMethod] public function throwException(string $name): mixed { diff --git a/tests/query_test.go b/tests/query_test.go index b696ed3b..82b307da 100644 --- a/tests/query_test.go +++ b/tests/query_test.go @@ -5,6 +5,7 @@ import ( "os" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/assert" @@ -17,7 +18,7 @@ func Test_ListQueriesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -80,7 +81,7 @@ func Test_GetQueryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -115,7 +116,7 @@ func Test_ListQueriesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -146,7 +147,7 @@ func Test_GetQueryLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/rpc_test.go b/tests/rpc_test.go index fe531ee3..f9984dd5 100644 --- a/tests/rpc_test.go +++ b/tests/rpc_test.go @@ -7,6 +7,7 @@ import ( "path" "sync" "testing" + "tests/helpers" "time" protoApi "github.com/roadrunner-server/api/v4/build/temporal/v1" @@ -26,7 +27,7 @@ func Test_RPC_Methods(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/signal_test.go b/tests/signal_test.go index 58980999..d7edefe5 100644 --- a/tests/signal_test.go +++ b/tests/signal_test.go @@ -4,6 +4,7 @@ import ( "context" "sync" "testing" + "tests/helpers" "time" "github.com/pborman/uuid" @@ -17,7 +18,7 @@ func Test_SignalsWithoutSignalsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -40,7 +41,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -77,7 +78,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -114,7 +115,7 @@ func Test_RuntimeSignalProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -148,7 +149,7 @@ func Test_SignalStepsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -196,7 +197,7 @@ func Test_SignalsWithoutSignalsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -219,7 +220,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -256,7 +257,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -293,7 +294,7 @@ func Test_RuntimeSignalLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -327,7 +328,7 @@ func Test_SignalStepsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/tls/cancel_tls_test.go b/tests/tls/cancel_tls_test.go index 1ef8a3bb..994f429c 100644 --- a/tests/tls/cancel_tls_test.go +++ b/tests/tls/cancel_tls_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -19,7 +19,7 @@ func Test_SimpleWorkflowCancelTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -48,7 +48,7 @@ func Test_CancellableWorkflowScopeTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -79,7 +79,7 @@ func Test_CanceledWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -106,7 +106,7 @@ func Test_CanceledWithCompensationWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -155,7 +155,7 @@ func Test_CanceledNestedWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -202,7 +202,7 @@ func Test_CanceledNSingleScopeWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -246,7 +246,7 @@ func Test_CanceledMidflightWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -291,7 +291,7 @@ func Test_CancelSignaledChildWorkflowTLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -336,7 +336,7 @@ func Test_SimpleWorkflowCancelLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -365,7 +365,7 @@ func Test_CancellableWorkflowScopeLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -396,7 +396,7 @@ func Test_CanceledWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -423,7 +423,7 @@ func Test_CanceledWithCompensationWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -472,7 +472,7 @@ func Test_CanceledNestedWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -519,7 +519,7 @@ func Test_CanceledNSingleScopeWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -563,7 +563,7 @@ func Test_CanceledMidflightWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -608,7 +608,7 @@ func Test_CancelSignaledChildWorkflowLATLSProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/tls/child_tls_test.go b/tests/tls/child_tls_test.go index fda0c9fa..07eeb471 100644 --- a/tests/tls/child_tls_test.go +++ b/tests/tls/child_tls_test.go @@ -5,7 +5,7 @@ import ( "sync" "testing" - "tests" + "tests/helpers" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" @@ -15,7 +15,7 @@ func Test_ExecuteChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -38,7 +38,7 @@ func Test_ExecuteChildStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -61,7 +61,7 @@ func Test_ExecuteChildStubWorkflow_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -84,7 +84,7 @@ func Test_SignalChildViaStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -108,7 +108,7 @@ func Test_ExecuteChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -131,7 +131,7 @@ func Test_ExecuteChildStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -154,7 +154,7 @@ func Test_ExecuteChildStubWorkflowLA_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -177,7 +177,7 @@ func Test_SignalChildViaStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/tls/disaster_tls_test.go b/tests/tls/disaster_tls_test.go index db314ebf..a0269f48 100644 --- a/tests/tls/disaster_tls_test.go +++ b/tests/tls/disaster_tls_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc" "github.com/roadrunner-server/sdk/v4/state/process" @@ -23,7 +23,7 @@ func Test_WorkerError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -57,7 +57,7 @@ func Test_ResetAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -98,7 +98,7 @@ func Test_ResetWFWorker(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -146,7 +146,7 @@ func Test_ActivityError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") defer func() { // always restore script @@ -194,7 +194,7 @@ func Test_WorkerError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -228,7 +228,7 @@ func Test_WorkerError_DisasterRecovery_Heavy(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") defer func() { // always restore script @@ -282,7 +282,7 @@ func Test_WorkerError_DisasterRecovery_HeavyLA(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") defer func() { // always restore script @@ -336,7 +336,7 @@ func Test_ActivityError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") defer func() { // always restore script @@ -385,7 +385,7 @@ func Test_WorkerErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -419,7 +419,7 @@ func Test_ResetLAAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -460,7 +460,7 @@ func Test_ActivityErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") defer func() { // always restore script @@ -508,7 +508,7 @@ func Test_WorkerErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -542,7 +542,7 @@ func Test_ActivityErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") defer func() { // always restore script diff --git a/tests/tls/general_tls_test.go b/tests/tls/general_tls_test.go index 63467b9b..c5c767d1 100644 --- a/tests/tls/general_tls_test.go +++ b/tests/tls/general_tls_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" @@ -17,7 +17,7 @@ func Test_HistoryLen(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), client.StartWorkflowOptions{ diff --git a/tests/tls/hp_tls_test.go b/tests/tls/hp_tls_test.go index d9f95988..1b35767d 100644 --- a/tests/tls/hp_tls_test.go +++ b/tests/tls/hp_tls_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" "github.com/fatih/color" goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc" @@ -37,7 +37,7 @@ func Test_VerifyRegistrationProto(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - _ = tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + _ = helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") activities := getActivities(t) workflows := getWorkflows(t) @@ -56,7 +56,7 @@ func Test_ExecuteSimpleWorkflow_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -79,7 +79,7 @@ func Test_ExecuteSimpleWorkflowLA_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -102,7 +102,7 @@ func Test_ExecuteSimpleDTOWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -128,7 +128,7 @@ func Test_ExecuteSimpleDTOWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -154,7 +154,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -177,7 +177,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -200,7 +200,7 @@ func Test_MultipleWorkflowsInSingleWorkerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -236,7 +236,7 @@ func Test_MultipleWorkflowsInSingleWorkerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -272,7 +272,7 @@ func Test_ExecuteWorkflowWithParallelScopesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -295,7 +295,7 @@ func Test_ExecuteWorkflowWithParallelScopesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -318,7 +318,7 @@ func Test_TimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -347,7 +347,7 @@ func Test_TimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -376,7 +376,7 @@ func Test_SideEffectProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -403,7 +403,7 @@ func Test_SideEffectLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -430,7 +430,7 @@ func Test_EmptyWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -453,7 +453,7 @@ func Test_EmptyWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -476,7 +476,7 @@ func Test_PromiseChainingProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -499,7 +499,7 @@ func Test_PromiseChainingLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -522,7 +522,7 @@ func Test_ActivityHeartbeatProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -556,7 +556,7 @@ func Test_BinaryPayloadProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") rnd := make([]byte, 2500) @@ -585,7 +585,7 @@ func Test_BinaryPayloadLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") rnd := make([]byte, 2500) @@ -614,7 +614,7 @@ func Test_ContinueAsNewProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -647,7 +647,7 @@ func Test_ContinueAsNewLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -680,7 +680,7 @@ func Test_ActivityStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -708,7 +708,7 @@ func Test_ActivityStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -736,7 +736,7 @@ func Test_ExecuteProtoWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -759,7 +759,7 @@ func Test_ExecuteProtoWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -782,7 +782,7 @@ func Test_SagaWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -803,7 +803,7 @@ func Test_SagaWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/tls/metrics_tls_test.go b/tests/tls/metrics_tls_test.go index ab3b3dfe..84ef7da9 100644 --- a/tests/tls/metrics_tls_test.go +++ b/tests/tls/metrics_tls_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" configImpl "github.com/roadrunner-server/config/v4" "github.com/stretchr/testify/assert" @@ -28,7 +28,7 @@ func Test_SimpleWorkflowMetrics(t *testing.T) { cfg.Prefix = "rr" cfg.Version = "2.9.0" - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-metrics.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -88,7 +88,7 @@ func Test_SimpleWorkflowMetricsPrometheusNewDriver(t *testing.T) { cfg.Prefix = "rr" cfg.Version = "2.11.2" - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-prom-new.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-prom-new.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -148,7 +148,7 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { cfg.Prefix = "rr" cfg.Version = "2.11.2" - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-statsd.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-statsd.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -186,7 +186,13 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { // get request and return body func get() (string, error) { - r, err := http.Get("http://127.0.0.1:9095/metrics") + client := &http.Client{} + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, "http://127.0.0.1:9095/metrics", nil) + if err != nil { + return "", err + } + + r, err := client.Do(req) if err != nil { return "", err } diff --git a/tests/tls/query_tls_test.go b/tests/tls/query_tls_test.go index 95b095c7..d172ff6f 100644 --- a/tests/tls/query_tls_test.go +++ b/tests/tls/query_tls_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -19,7 +19,7 @@ func Test_ListQueriesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -75,7 +75,7 @@ func Test_GetQueryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -110,7 +110,7 @@ func Test_ListQueriesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -141,7 +141,7 @@ func Test_GetQueryLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/tls/signal_tls_test.go b/tests/tls/signal_tls_test.go index 740374b7..e8c2a6c8 100644 --- a/tests/tls/signal_tls_test.go +++ b/tests/tls/signal_tls_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "tests" + "tests/helpers" "github.com/pborman/uuid" "github.com/stretchr/testify/assert" @@ -19,7 +19,7 @@ func Test_SignalsWithoutSignalsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -42,7 +42,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -79,7 +79,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -118,7 +118,7 @@ func Test_RuntimeSignalProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -152,7 +152,7 @@ func Test_SignalStepsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -200,7 +200,7 @@ func Test_SignalsWithoutSignalsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -223,7 +223,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -260,7 +260,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -297,7 +297,7 @@ func Test_RuntimeSignalLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), @@ -331,7 +331,7 @@ func Test_SignalStepsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := tests.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") + s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go new file mode 100644 index 00000000..de15a98b --- /dev/null +++ b/tests/updates/updates_async_test.go @@ -0,0 +1 @@ +package updates diff --git a/tests/updates_test.go b/tests/updates/updates_test.go similarity index 92% rename from tests/updates_test.go rename to tests/updates/updates_test.go index 9668fb2c..4836d088 100644 --- a/tests/updates_test.go +++ b/tests/updates/updates_test.go @@ -1,9 +1,10 @@ -package tests +package updates import ( "context" "sync" "testing" + "tests/helpers" "time" "github.com/stretchr/testify/require" @@ -16,7 +17,7 @@ func Test_UpdatesInit(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -57,7 +58,7 @@ func Test_UpdatesSideEffect(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), From 486a8df7dc1d39429073f94a1ce437843013528f Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 28 Feb 2024 22:41:51 +0100 Subject: [PATCH 05/19] chore: update CI Signed-off-by: Valery Piashchynski --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ffe1986b..283a9ec8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -82,7 +82,7 @@ jobs: cd tests docker-compose -f env/docker-compose-temporal.yaml up -d --remove-orphans - go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt.out -covermode=atomic cancel_test.go child_test.go disaster_test.go general_test.go helpers.go hp_test.go interceptor_test.go metrics_test.go otlp_test.go query_test.go signal_test.go temporal_interceptor_plugin.go rpc_test.go + go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt.out -covermode=atomic cancel_test.go child_test.go disaster_test.go general_test.go hp_test.go interceptor_test.go metrics_test.go otlp_test.go query_test.go signal_test.go rpc_test.go docker-compose -f env/docker-compose-temporal.yaml up -d --remove-orphans @@ -156,7 +156,7 @@ jobs: docker-compose -f env/temporal_tls/docker-compose.yml up -d --remove-orphans sleep 60 - go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt_tls.out -covermode=atomic ./tls/cancel_tls_test.go ./tls/child_tls_test.go ./tls/disaster_tls_test.go ./tls/hp_tls_test.go ./tls/metrics_tls_test.go ./tls/query_tls_test.go ./tls/signal_tls_test.go + go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt_tls.out -covermode=atomic ./tls docker-compose -f env/temporal_tls/docker-compose.yml down From 0238a9434caa1744994548da6d1b6d00d217a3cc Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 00:19:01 +0100 Subject: [PATCH 06/19] chore: update tests Signed-off-by: Valery Piashchynski --- .github/workflows/linux.yml | 75 ++++++++++++++++++- go.mod | 5 +- go.sum | 10 +-- .../env/docker-compose-temporal-updates.yaml | 61 +++++++++++++++ tests/env/docker-compose-temporal.yaml | 2 - tests/{ => general}/cancel_test.go | 32 ++++---- tests/{ => general}/child_test.go | 16 ++-- tests/{ => general}/disaster_test.go | 62 +++++++-------- tests/{ => general}/general_test.go | 2 +- tests/{ => general}/hp_test.go | 62 +++++++-------- tests/{ => general}/interceptor_test.go | 0 tests/{ => general}/metrics_test.go | 6 +- tests/{ => general}/otlp_test.go | 0 tests/{ => general}/plugin_status_test.go | 22 +++--- tests/{ => general}/query_test.go | 9 ++- tests/{ => general}/rpc_test.go | 2 +- tests/{ => general}/signal_test.go | 61 ++++++++------- tests/go.mod | 5 +- tests/go.sum | 10 +-- tests/helpers/helpers.go | 6 +- tests/tls/metrics_tls_test.go | 22 ------ tests/tls/signal_tls_test.go | 41 +++++----- tests/updates/updates_test.go | 4 +- 23 files changed, 314 insertions(+), 201 deletions(-) create mode 100644 tests/env/docker-compose-temporal-updates.yaml rename tests/{ => general}/cancel_test.go (92%) rename tests/{ => general}/child_test.go (87%) rename tests/{ => general}/disaster_test.go (83%) rename tests/{ => general}/general_test.go (93%) rename tests/{ => general}/hp_test.go (89%) rename tests/{ => general}/interceptor_test.go (100%) rename tests/{ => general}/metrics_test.go (95%) rename tests/{ => general}/otlp_test.go (100%) rename tests/{ => general}/plugin_status_test.go (87%) rename tests/{ => general}/query_test.go (92%) rename tests/{ => general}/rpc_test.go (97%) rename tests/{ => general}/signal_test.go (89%) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 283a9ec8..746e68d9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,8 +11,77 @@ on: - stable jobs: + rrtemporal_updates_test: + name: RR Temporal updates tests with (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + matrix: + php: [ "8.3" ] + go: [ stable ] + os: [ "ubuntu-latest" ] + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v5 # action page: + with: + go-version: ${{ matrix.go }} + + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@v2 # action page: + with: + php-version: ${{ matrix.php }} + extensions: sockets + + - name: Check out code + uses: actions/checkout@v4 + + - name: Get Composer Cache Directory + id: composer-cache + run: | + cd tests/php_test_files + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Init Composer Cache # Docs: + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: cd tests/php_test_files && composer update --prefer-dist --no-progress --ansi + + - name: Init Go modules Cache # Docs: + uses: actions/cache@v4 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Install Go dependencies + run: go mod download + + - name: Create folders + run: | + mkdir ./tests/coverage-ci + + - name: Run Temporal tests with coverage + run: | + cd tests + docker-compose -f env/docker-compose-temporal-updates.yaml up -d --remove-orphans + + go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt_upd.out -covermode=atomic ./updates + + docker-compose -f env/docker-compose-temporal-updates.yaml up -d --remove-orphans + + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: coverage_2 + path: ./tests/coverage-ci + rrtemporal_test: - name: RR Temporal plugin (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) + name: RR Temporal general tests with (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: @@ -82,7 +151,7 @@ jobs: cd tests docker-compose -f env/docker-compose-temporal.yaml up -d --remove-orphans - go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt.out -covermode=atomic cancel_test.go child_test.go disaster_test.go general_test.go hp_test.go interceptor_test.go metrics_test.go otlp_test.go query_test.go signal_test.go rpc_test.go + go test -timeout 20m -v -race -cover -tags=debug -failfast -coverpkg=$(cat pkgs.txt) -coverprofile=./coverage-ci/rrt.out -covermode=atomic ./general docker-compose -f env/docker-compose-temporal.yaml up -d --remove-orphans @@ -93,7 +162,7 @@ jobs: path: ./tests/coverage-ci rrtemporal_tls_test: - name: RR Temporal TLS plugin (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) + name: RR Temporal TLS plugin tests with (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: diff --git a/go.mod b/go.mod index c4c982df..0d6d58b7 100644 --- a/go.mod +++ b/go.mod @@ -57,9 +57,8 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect google.golang.org/grpc v1.62.0 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 75dc22c1..06593059 100644 --- a/go.sum +++ b/go.sum @@ -355,12 +355,10 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 h1:SO1wX9btGFrwj9EzH3ocqfwiPVOxfv4ggAJajzlHA5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641/go.mod h1:wLupoVsUfYPgOMwjzhYFbaVklw/INms+dqTp0tc1fv8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= 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= diff --git a/tests/env/docker-compose-temporal-updates.yaml b/tests/env/docker-compose-temporal-updates.yaml new file mode 100644 index 00000000..abe97cf6 --- /dev/null +++ b/tests/env/docker-compose-temporal-updates.yaml @@ -0,0 +1,61 @@ +version: "3" + +services: + prometheus: + image: prom/prometheus + ports: + - "9091:9090" + + statsd: + image: statsd/statsd + ports: + - "8125:8125/udp" + - "8126:8126" + + postgresql: + container_name: temporal-postgresql + image: postgres:15 + environment: + POSTGRES_PASSWORD: temporal + POSTGRES_USER: temporal + ports: + - "5432:5432" + + temporal-ui: + container_name: temporal-ui + image: temporalio/ui:latest + depends_on: + - temporal + environment: + - TEMPORAL_ADDRESS=temporal:7233 + - TEMPORAL_CORS_ORIGINS=http://localhost:3000 + ports: + - "8080:8080" + + temporal: + container_name: temporal + image: temporalio/auto-setup:1 + volumes: + - ./dynamicconfig:/etc/temporal/config/dynamicconfig + depends_on: + - postgresql + environment: + - LOG_LEVEL=debug + - DB=postgresql + - DB_PORT=5432 + - POSTGRES_USER=temporal + - POSTGRES_PWD=temporal + - POSTGRES_SEEDS=postgresql + ports: + - "7233:7233" + + temporal-admin-tools: + container_name: temporal-admin-tools + image: temporalio/admin-tools:1 + depends_on: + - temporal + environment: + - TEMPORAL_CLI_ADDRESS=temporal:7233 + - LOG_LEVEL=debug + stdin_open: true + tty: true diff --git a/tests/env/docker-compose-temporal.yaml b/tests/env/docker-compose-temporal.yaml index abe97cf6..1194e9de 100644 --- a/tests/env/docker-compose-temporal.yaml +++ b/tests/env/docker-compose-temporal.yaml @@ -35,8 +35,6 @@ services: temporal: container_name: temporal image: temporalio/auto-setup:1 - volumes: - - ./dynamicconfig:/etc/temporal/config/dynamicconfig depends_on: - postgresql environment: diff --git a/tests/cancel_test.go b/tests/general/cancel_test.go similarity index 92% rename from tests/cancel_test.go rename to tests/general/cancel_test.go index 60a80139..82b4625a 100644 --- a/tests/cancel_test.go +++ b/tests/general/cancel_test.go @@ -18,7 +18,7 @@ func Test_SimpleWorkflowCancelProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -47,7 +47,7 @@ func Test_CancellableWorkflowScopeProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -79,7 +79,7 @@ func Test_CanceledWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -106,7 +106,7 @@ func Test_CanceledWithCompensationWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -155,7 +155,7 @@ func Test_CanceledNestedWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -202,7 +202,7 @@ func Test_CanceledNSingleScopeWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -246,7 +246,7 @@ func Test_CanceledMidflightWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -291,7 +291,7 @@ func Test_CancelSignaledChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -337,7 +337,7 @@ func Test_SimpleWorkflowCancelLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -366,7 +366,7 @@ func Test_CancellableWorkflowScopeLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -397,7 +397,7 @@ func Test_CanceledWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -424,7 +424,7 @@ func Test_CanceledWithCompensationWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -473,7 +473,7 @@ func Test_CanceledNestedWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -520,7 +520,7 @@ func Test_CanceledNSingleScopeWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -564,7 +564,7 @@ func Test_CanceledMidflightWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -609,7 +609,7 @@ func Test_CancelSignaledChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/child_test.go b/tests/general/child_test.go similarity index 87% rename from tests/child_test.go rename to tests/general/child_test.go index 0563fde4..cafee274 100644 --- a/tests/child_test.go +++ b/tests/general/child_test.go @@ -14,7 +14,7 @@ func Test_ExecuteChildWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -37,7 +37,7 @@ func Test_ExecuteChildStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -60,7 +60,7 @@ func Test_ExecuteChildStubWorkflow_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -83,7 +83,7 @@ func Test_SignalChildViaStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -107,7 +107,7 @@ func Test_ExecuteChildWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -130,7 +130,7 @@ func Test_ExecuteChildStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -153,7 +153,7 @@ func Test_ExecuteChildStubWorkflowLA_02Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -176,7 +176,7 @@ func Test_SignalChildViaStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/disaster_test.go b/tests/general/disaster_test.go similarity index 83% rename from tests/disaster_test.go rename to tests/general/disaster_test.go index 52af3529..1c626729 100644 --- a/tests/disaster_test.go +++ b/tests/general/disaster_test.go @@ -22,7 +22,7 @@ func Test_WorkerError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -56,7 +56,7 @@ func Test_ResetAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -97,7 +97,7 @@ func Test_ResetWFWorker(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -145,15 +145,15 @@ func Test_ActivityError_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") }() // Makes worker pool unable to recover for some time - _ = os.Rename("php_test_files/worker.php", "php_test_files/worker.bak") + _ = os.Rename("../php_test_files/worker.php", "../php_test_files/worker.bak") // destroys all workers in activities @@ -180,7 +180,7 @@ func Test_ActivityError_DisasterRecovery(t *testing.T) { time.Sleep(time.Millisecond * 750) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) @@ -193,7 +193,7 @@ func Test_WorkerError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -227,15 +227,15 @@ func Test_WorkerError_DisasterRecovery_Heavy(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") }() // Makes worker pool unable to recover for some time - require.NoError(t, os.Rename("php_test_files/worker.php", "php_test_files/worker.bak")) + require.NoError(t, os.Rename("../php_test_files/worker.php", "../php_test_files/worker.bak")) conn, err := net.Dial("tcp", "127.0.0.1:6001") assert.NoError(t, err) @@ -268,7 +268,7 @@ func Test_WorkerError_DisasterRecovery_Heavy(t *testing.T) { time.Sleep(time.Second * 5) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) @@ -281,15 +281,15 @@ func Test_ActivityError_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") }() // Makes worker pool unable to recover for some time - _ = os.Rename("php_test_files/worker.php", "php_test_files/worker.bak") + _ = os.Rename("../php_test_files/worker.php", "../php_test_files/worker.bak") // destroys all workers in activities workers := getWorkers(t) @@ -315,7 +315,7 @@ func Test_ActivityError_DisasterRecoveryProto(t *testing.T) { time.Sleep(time.Second) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker.bak", "php_test_files/worker.php") + _ = os.Rename("../php_test_files/worker.bak", "../php_test_files/worker.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) @@ -330,15 +330,15 @@ func Test_WorkerError_DisasterRecovery_HeavyLA(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") }() // Makes worker pool unable to recover for some time - require.NoError(t, os.Rename("php_test_files/worker-la.php", "php_test_files/worker-la.bak")) + require.NoError(t, os.Rename("../php_test_files/worker-la.php", "../php_test_files/worker-la.bak")) conn, err := net.Dial("tcp", "127.0.0.1:6001") assert.NoError(t, err) @@ -371,7 +371,7 @@ func Test_WorkerError_DisasterRecovery_HeavyLA(t *testing.T) { time.Sleep(time.Second * 5) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) @@ -384,7 +384,7 @@ func Test_WorkerErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -418,7 +418,7 @@ func Test_ResetLAAll(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -459,15 +459,15 @@ func Test_ActivityErrorLA_DisasterRecovery(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") }() // Makes worker pool unable to recover for some time - _ = os.Rename("php_test_files/worker-la.php", "php_test_files/worker-la.bak") + _ = os.Rename("../php_test_files/worker-la.php", "../php_test_files/worker-la.bak") // destroys all workers in activities @@ -494,7 +494,7 @@ func Test_ActivityErrorLA_DisasterRecovery(t *testing.T) { time.Sleep(time.Second) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) @@ -507,7 +507,7 @@ func Test_WorkerErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") workers := getWorkers(t) require.Len(t, workers, 5) @@ -541,15 +541,15 @@ func Test_ActivityErrorLA_DisasterRecoveryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") defer func() { // always restore script - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") }() // Makes worker pool unable to recover for some time - _ = os.Rename("php_test_files/worker-la.php", "php_test_files/worker-la.bak") + _ = os.Rename("../php_test_files/worker-la.php", "../php_test_files/worker-la.bak") // destroys all workers in activities workers := getWorkers(t) @@ -575,7 +575,7 @@ func Test_ActivityErrorLA_DisasterRecoveryProto(t *testing.T) { time.Sleep(time.Millisecond * 750) // restore the script and recover activity pool - _ = os.Rename("php_test_files/worker-la.bak", "php_test_files/worker-la.php") + _ = os.Rename("../php_test_files/worker-la.bak", "../php_test_files/worker-la.php") var result string assert.NoError(t, w.Get(context.Background(), &result)) diff --git a/tests/general_test.go b/tests/general/general_test.go similarity index 93% rename from tests/general_test.go rename to tests/general/general_test.go index 4aa424b6..9a6bb3a1 100644 --- a/tests/general_test.go +++ b/tests/general/general_test.go @@ -15,7 +15,7 @@ func Test_HistoryLen(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/hp_test.go b/tests/general/hp_test.go similarity index 89% rename from tests/hp_test.go rename to tests/general/hp_test.go index 44f8ed7f..64ec9d72 100644 --- a/tests/hp_test.go +++ b/tests/general/hp_test.go @@ -39,7 +39,7 @@ func Test_VerifyRegistrationProto(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - _ = helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + _ = helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") activities := getActivities(t) workflows := getWorkflows(t) @@ -58,7 +58,7 @@ func Test_ExecuteSimpleWorkflow_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -81,7 +81,7 @@ func Test_ExecuteSimpleWorkflowLA_1Proto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -104,7 +104,7 @@ func Test_ExecuteSimpleDTOWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -130,7 +130,7 @@ func Test_ExecuteSimpleDTOWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -156,7 +156,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -179,7 +179,7 @@ func Test_ExecuteSimpleWorkflowWithSequenceInBatchLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -202,7 +202,7 @@ func Test_MultipleWorkflowsInSingleWorkerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -238,7 +238,7 @@ func Test_MultipleWorkflowsInSingleWorkerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -274,7 +274,7 @@ func Test_ExecuteWorkflowWithParallelScopesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -297,7 +297,7 @@ func Test_ExecuteWorkflowWithParallelScopesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -320,7 +320,7 @@ func Test_TimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -349,7 +349,7 @@ func Test_TimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") start := time.Now() w, err := s.Client.ExecuteWorkflow( @@ -378,7 +378,7 @@ func Test_SideEffectProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -405,7 +405,7 @@ func Test_SideEffectLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -432,7 +432,7 @@ func Test_EmptyWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -455,7 +455,7 @@ func Test_EmptyWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -478,7 +478,7 @@ func Test_PromiseChainingProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -501,7 +501,7 @@ func Test_PromiseChainingLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -524,7 +524,7 @@ func Test_ActivityHeartbeatProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -558,7 +558,7 @@ func Test_BinaryPayloadProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -587,7 +587,7 @@ func Test_BinaryPayloadLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") rnd := make([]byte, 2500) @@ -616,7 +616,7 @@ func Test_ContinueAsNewProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -649,7 +649,7 @@ func Test_ContinueAsNewLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -682,7 +682,7 @@ func Test_ActivityStubWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -710,7 +710,7 @@ func Test_ActivityStubWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -738,7 +738,7 @@ func Test_ExecuteProtoWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -761,7 +761,7 @@ func Test_ExecuteProtoWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -784,7 +784,7 @@ func Test_SagaWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -805,7 +805,7 @@ func Test_UpsertSearchAttributesWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") ctx := context.Background() _, err := s.Client.OperatorService().AddSearchAttributes(ctx, &operatorservice.AddSearchAttributesRequest{ @@ -846,7 +846,7 @@ func Test_SagaWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/interceptor_test.go b/tests/general/interceptor_test.go similarity index 100% rename from tests/interceptor_test.go rename to tests/general/interceptor_test.go diff --git a/tests/metrics_test.go b/tests/general/metrics_test.go similarity index 95% rename from tests/metrics_test.go rename to tests/general/metrics_test.go index 82fe9c5c..301a499d 100644 --- a/tests/metrics_test.go +++ b/tests/general/metrics_test.go @@ -19,7 +19,7 @@ func Test_SimpleWorkflowMetrics(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-metrics.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -72,7 +72,7 @@ func Test_SimpleWorkflowMetricsPrometheusNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics-prom-new.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-metrics-prom-new.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -125,7 +125,7 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-metrics-statsd.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-metrics-statsd.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/otlp_test.go b/tests/general/otlp_test.go similarity index 100% rename from tests/otlp_test.go rename to tests/general/otlp_test.go diff --git a/tests/plugin_status_test.go b/tests/general/plugin_status_test.go similarity index 87% rename from tests/plugin_status_test.go rename to tests/general/plugin_status_test.go index b606ea4e..e02f2821 100644 --- a/tests/plugin_status_test.go +++ b/tests/general/plugin_status_test.go @@ -1,13 +1,7 @@ package tests import ( - "github.com/roadrunner-server/config/v4" - "github.com/roadrunner-server/endure/v2" - "github.com/roadrunner-server/logger/v4" - "github.com/roadrunner-server/server/v4" - "github.com/roadrunner-server/status/v4" - "github.com/stretchr/testify/require" - rrtemporal "github.com/temporalio/roadrunner-temporal/v4" + "context" "io" "log/slog" "net/http" @@ -18,6 +12,14 @@ import ( "testing" "time" + "github.com/roadrunner-server/config/v4" + "github.com/roadrunner-server/endure/v2" + "github.com/roadrunner-server/logger/v4" + "github.com/roadrunner-server/server/v4" + "github.com/roadrunner-server/status/v4" + "github.com/stretchr/testify/require" + rrtemporal "github.com/temporalio/roadrunner-temporal/v4" + "github.com/stretchr/testify/assert" ) @@ -26,7 +28,7 @@ func TestTemporalCheckStatus(t *testing.T) { cfg := &config.Plugin{ Version: "2023.3.0", - Path: "configs/.rr-status.yaml", + Path: "../configs/.rr-status.yaml", Prefix: "rr", } @@ -86,7 +88,7 @@ func TestTemporalCheckStatus(t *testing.T) { client := &http.Client{ Timeout: time.Second * 10, } - req, err := http.NewRequest("GET", "http://127.0.0.1:35544/health?plugin=temporal", nil) + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, "http://127.0.0.1:35544/health?plugin=temporal", nil) require.NoError(t, err) resp, err := client.Do(req) @@ -98,7 +100,7 @@ func TestTemporalCheckStatus(t *testing.T) { assert.Equal(t, http.StatusOK, resp.StatusCode) _ = resp.Body.Close() - req, err = http.NewRequest("GET", "http://127.0.0.1:35544/ready?plugin=temporal", nil) + req, err = http.NewRequestWithContext(context.Background(), http.MethodGet, "http://127.0.0.1:35544/ready?plugin=temporal", nil) require.NoError(t, err) resp, err = client.Do(req) diff --git a/tests/query_test.go b/tests/general/query_test.go similarity index 92% rename from tests/query_test.go rename to tests/general/query_test.go index 82b307da..d4d7fbe0 100644 --- a/tests/query_test.go +++ b/tests/general/query_test.go @@ -18,7 +18,7 @@ func Test_ListQueriesProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -64,6 +64,7 @@ func Test_ListQueriesProto(t *testing.T) { v, err = s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), "error", -1) assert.Nil(t, v) assert.Error(t, err) + time.Sleep(time.Second) cancel() assert.Contains(t, err.Error(), "KnownQueryTypes=[get]") @@ -81,7 +82,7 @@ func Test_GetQueryProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -116,7 +117,7 @@ func Test_ListQueriesLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -147,7 +148,7 @@ func Test_GetQueryLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/rpc_test.go b/tests/general/rpc_test.go similarity index 97% rename from tests/rpc_test.go rename to tests/general/rpc_test.go index f9984dd5..eb202b0b 100644 --- a/tests/rpc_test.go +++ b/tests/general/rpc_test.go @@ -27,7 +27,7 @@ func Test_RPC_Methods(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/signal_test.go b/tests/general/signal_test.go similarity index 89% rename from tests/signal_test.go rename to tests/general/signal_test.go index d7edefe5..8bfec93b 100644 --- a/tests/signal_test.go +++ b/tests/general/signal_test.go @@ -14,11 +14,16 @@ import ( "go.temporal.io/sdk/client" ) +const ( + signalStr = "signaled-" + addStr = "add" +) + func Test_SignalsWithoutSignalsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -41,12 +46,12 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, 10, client.StartWorkflowOptions{ TaskQueue: "default", @@ -55,7 +60,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { ) assert.NoError(t, err) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -65,7 +70,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -78,7 +83,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -92,7 +97,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { // should be around sleep(1) call time.Sleep(time.Second + time.Millisecond*200) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -102,7 +107,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -115,12 +120,12 @@ func Test_RuntimeSignalProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, -1, client.StartWorkflowOptions{ TaskQueue: "default", @@ -136,7 +141,7 @@ func Test_RuntimeSignalProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -149,7 +154,7 @@ func Test_SignalStepsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -197,7 +202,7 @@ func Test_SignalsWithoutSignalsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -220,12 +225,12 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, 10, client.StartWorkflowOptions{ TaskQueue: "default", @@ -234,7 +239,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { ) assert.NoError(t, err) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -244,7 +249,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -257,7 +262,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -271,7 +276,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { // should be around sleep(1) call time.Sleep(time.Second + time.Millisecond*200) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -281,7 +286,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -294,12 +299,12 @@ func Test_RuntimeSignalLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, -1, client.StartWorkflowOptions{ TaskQueue: "default", @@ -315,7 +320,7 @@ func Test_RuntimeSignalLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -328,7 +333,7 @@ func Test_SignalStepsLAProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto-la.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto-la.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), diff --git a/tests/go.mod b/tests/go.mod index 94e2e91a..aebada09 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -104,9 +104,8 @@ require ( golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect google.golang.org/grpc v1.62.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index 337b359d..a0d16958 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -455,12 +455,10 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= -google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 h1:SO1wX9btGFrwj9EzH3ocqfwiPVOxfv4ggAJajzlHA5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641/go.mod h1:wLupoVsUfYPgOMwjzhYFbaVklw/INms+dqTp0tc1fv8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= 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= diff --git a/tests/helpers/helpers.go b/tests/helpers/helpers.go index 88e24f4d..8507d2ff 100644 --- a/tests/helpers/helpers.go +++ b/tests/helpers/helpers.go @@ -157,10 +157,10 @@ func NewTestServerTLS(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup, co cfg := &configImpl.Plugin{ Timeout: time.Second * 30, + Path: "../configs/tls/" + configName, + Prefix: rrPrefix, + Version: rrVersion, } - cfg.Path = "../configs/tls/" + configName - cfg.Prefix = rrPrefix - cfg.Version = rrVersion err := container.RegisterAll( cfg, diff --git a/tests/tls/metrics_tls_test.go b/tests/tls/metrics_tls_test.go index 84ef7da9..56ad1053 100644 --- a/tests/tls/metrics_tls_test.go +++ b/tests/tls/metrics_tls_test.go @@ -11,7 +11,6 @@ import ( "tests/helpers" - configImpl "github.com/roadrunner-server/config/v4" "github.com/stretchr/testify/assert" "go.temporal.io/sdk/client" ) @@ -21,13 +20,6 @@ func Test_SimpleWorkflowMetrics(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.9.0" - s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics.yaml") w, err := s.Client.ExecuteWorkflow( @@ -81,13 +73,6 @@ func Test_SimpleWorkflowMetricsPrometheusNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics-prom-new.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.11.2" - s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-prom-new.yaml") w, err := s.Client.ExecuteWorkflow( @@ -141,13 +126,6 @@ func Test_SimpleWorkflowMetricsStatsdNewDriver(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(1) - cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, - } - cfg.Path = "configs/.rr-metrics-statsd.yaml" - cfg.Prefix = "rr" - cfg.Version = "2.11.2" - s := helpers.NewTestServerTLS(t, stopCh, wg, ".rr-metrics-statsd.yaml") w, err := s.Client.ExecuteWorkflow( diff --git a/tests/tls/signal_tls_test.go b/tests/tls/signal_tls_test.go index e8c2a6c8..e59f037f 100644 --- a/tests/tls/signal_tls_test.go +++ b/tests/tls/signal_tls_test.go @@ -15,6 +15,11 @@ import ( "go.temporal.io/sdk/client" ) +const ( + signalStr = "signaled-" + addStr = "add" +) + func Test_SignalsWithoutSignalsProto(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} @@ -46,8 +51,8 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, 10, client.StartWorkflowOptions{ TaskQueue: "default", @@ -56,7 +61,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { ) assert.NoError(t, err) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -66,7 +71,7 @@ func Test_SendSignalDuringTimerProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -93,7 +98,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { // should be around sleep(5) call time.Sleep(time.Second) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -105,7 +110,7 @@ func Test_SendSignalBeforeCompletingWorkflowProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -122,8 +127,8 @@ func Test_RuntimeSignalProto(t *testing.T) { w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, -1, client.StartWorkflowOptions{ TaskQueue: "default", @@ -139,7 +144,7 @@ func Test_RuntimeSignalProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -227,8 +232,8 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, 10, client.StartWorkflowOptions{ TaskQueue: "default", @@ -237,7 +242,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { ) assert.NoError(t, err) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -247,7 +252,7 @@ func Test_SendSignalDuringTimerLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -274,7 +279,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { // should be around sleep(1) call time.Sleep(time.Second + time.Millisecond*200) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "add", -1) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), addStr, -1) assert.NoError(t, err) var result int @@ -284,7 +289,7 @@ func Test_SendSignalBeforeCompletingWorkflowLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false @@ -301,8 +306,8 @@ func Test_RuntimeSignalLAProto(t *testing.T) { w, err := s.Client.SignalWithStartWorkflow( context.Background(), - "signaled-"+uuid.New(), - "add", + signalStr+uuid.New(), + addStr, -1, client.StartWorkflowOptions{ TaskQueue: "default", @@ -318,7 +323,7 @@ func Test_RuntimeSignalLAProto(t *testing.T) { s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { if event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED { attr := event.Attributes.(*history.HistoryEvent_WorkflowExecutionSignaledEventAttributes) - return attr.WorkflowExecutionSignaledEventAttributes.SignalName == "add" + return attr.WorkflowExecutionSignaledEventAttributes.SignalName == addStr } return false diff --git a/tests/updates/updates_test.go b/tests/updates/updates_test.go index 4836d088..0495ff89 100644 --- a/tests/updates/updates_test.go +++ b/tests/updates/updates_test.go @@ -17,7 +17,7 @@ func Test_UpdatesInit(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), @@ -58,7 +58,7 @@ func Test_UpdatesSideEffect(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) - s := helpers.NewTestServer(t, stopCh, wg, "configs/.rr-proto.yaml") + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( context.Background(), From 0024d47a3c1549c66cd83c64fd4902c994324431 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 00:41:16 +0100 Subject: [PATCH 07/19] chore: update test configs Signed-off-by: Valery Piashchynski --- go.work.sum | 1 + tests/configs/.rr-metrics-prom-new.yaml | 2 +- tests/configs/.rr-metrics-statsd.yaml | 4 ++-- tests/configs/.rr-metrics.yaml | 4 ++-- tests/configs/.rr-otlp.yaml | 7 ++++--- tests/configs/.rr-proto-la.yaml | 8 ++++---- tests/configs/.rr-proto.yaml | 6 +++--- tests/configs/.rr-status.yaml | 6 +++--- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/go.work.sum b/go.work.sum index 67262278..5eae2919 100644 --- a/go.work.sum +++ b/go.work.sum @@ -2836,6 +2836,7 @@ google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= diff --git a/tests/configs/.rr-metrics-prom-new.yaml b/tests/configs/.rr-metrics-prom-new.yaml index 67630d41..599c9fee 100644 --- a/tests/configs/.rr-metrics-prom-new.yaml +++ b/tests/configs/.rr-metrics-prom-new.yaml @@ -4,7 +4,7 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" diff --git a/tests/configs/.rr-metrics-statsd.yaml b/tests/configs/.rr-metrics-statsd.yaml index 90e7bfe6..4c2e6901 100644 --- a/tests/configs/.rr-metrics-statsd.yaml +++ b/tests/configs/.rr-metrics-statsd.yaml @@ -4,7 +4,7 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" @@ -22,4 +22,4 @@ temporal: logs: mode: development - level: debug \ No newline at end of file + level: debug diff --git a/tests/configs/.rr-metrics.yaml b/tests/configs/.rr-metrics.yaml index 2855cd86..7842f18c 100644 --- a/tests/configs/.rr-metrics.yaml +++ b/tests/configs/.rr-metrics.yaml @@ -4,7 +4,7 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" @@ -18,4 +18,4 @@ temporal: logs: mode: development - level: debug \ No newline at end of file + level: debug diff --git a/tests/configs/.rr-otlp.yaml b/tests/configs/.rr-otlp.yaml index f47e2385..7bcd76a1 100644 --- a/tests/configs/.rr-otlp.yaml +++ b/tests/configs/.rr-otlp.yaml @@ -4,14 +4,15 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" - cache_size: 100000 + cache_size: 10 activities: num_workers: 4 + destroy_timeout: 1s otel: insecure: false @@ -22,4 +23,4 @@ otel: logs: mode: development - level: debug \ No newline at end of file + level: debug diff --git a/tests/configs/.rr-proto-la.yaml b/tests/configs/.rr-proto-la.yaml index 3906c122..6c2f969c 100644 --- a/tests/configs/.rr-proto-la.yaml +++ b/tests/configs/.rr-proto-la.yaml @@ -4,16 +4,16 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker-la.php" + command: "php ../php_test_files/worker-la.php" temporal: - address: "localhost:7233" - cache_size: 100000 + address: "127.0.0.1:7233" + cache_size: 10 activities: num_workers: 4 destroy_timeout: 1s logs: mode: development - level: debug \ No newline at end of file + level: debug diff --git a/tests/configs/.rr-proto.yaml b/tests/configs/.rr-proto.yaml index 0f0e266f..35e92ec3 100644 --- a/tests/configs/.rr-proto.yaml +++ b/tests/configs/.rr-proto.yaml @@ -4,16 +4,16 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" - cache_size: 100000 + cache_size: 10 activities: num_workers: 4 destroy_timeout: 1s logs: mode: development - level: debug \ No newline at end of file + level: debug diff --git a/tests/configs/.rr-status.yaml b/tests/configs/.rr-status.yaml index a254b5f6..8a11bd93 100644 --- a/tests/configs/.rr-status.yaml +++ b/tests/configs/.rr-status.yaml @@ -4,11 +4,11 @@ rpc: listen: tcp://127.0.0.1:6001 server: - command: "php php_test_files/worker.php" + command: "php ../php_test_files/worker.php" temporal: address: "127.0.0.1:7233" - cache_size: 100000 + cache_size: 10 activities: num_workers: 4 destroy_timeout: 1s @@ -18,4 +18,4 @@ logs: level: debug status: - address: "127.0.0.1:35544" \ No newline at end of file + address: "127.0.0.1:35544" From 89039c695ba4ebb30a37d656defea4c1c1e8c59a Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 00:55:40 +0100 Subject: [PATCH 08/19] chore: fix config path Signed-off-by: Valery Piashchynski --- tests/helpers/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers/helpers.go b/tests/helpers/helpers.go index 8507d2ff..94bf44dc 100644 --- a/tests/helpers/helpers.go +++ b/tests/helpers/helpers.go @@ -241,7 +241,7 @@ func NewTestServerWithInterceptor(t *testing.T, stopCh chan struct{}, wg *sync.W cfg := &configImpl.Plugin{ Timeout: time.Second * 30, } - cfg.Path = "configs/.rr-proto.yaml" + cfg.Path = "../configs/.rr-proto.yaml" cfg.Prefix = rrPrefix cfg.Version = rrVersion From 05a3b6d553a831e03f119d6e8f66ff6b44313382 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 01:16:09 +0100 Subject: [PATCH 09/19] chore: small refactoring Signed-off-by: Valery Piashchynski --- go.work.sum | 1 + tests/helpers/helpers.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.work.sum b/go.work.sum index 5eae2919..b3688476 100644 --- a/go.work.sum +++ b/go.work.sum @@ -2837,6 +2837,7 @@ google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqt google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= diff --git a/tests/helpers/helpers.go b/tests/helpers/helpers.go index 94bf44dc..e6f475f4 100644 --- a/tests/helpers/helpers.go +++ b/tests/helpers/helpers.go @@ -240,10 +240,10 @@ func NewTestServerWithInterceptor(t *testing.T, stopCh chan struct{}, wg *sync.W cfg := &configImpl.Plugin{ Timeout: time.Second * 30, + Path: "../configs/.rr-proto.yaml", + Prefix: rrPrefix, + Version: rrVersion, } - cfg.Path = "../configs/.rr-proto.yaml" - cfg.Prefix = rrPrefix - cfg.Version = rrVersion err := container.RegisterAll( cfg, From f4731d67ef2be3d9ed18f1a0c723c25a89a089d2 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 01:19:15 +0100 Subject: [PATCH 10/19] chore: config and rrversion fix Signed-off-by: Valery Piashchynski --- tests/helpers/helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/helpers/helpers.go b/tests/helpers/helpers.go index e6f475f4..444eb7b0 100644 --- a/tests/helpers/helpers.go +++ b/tests/helpers/helpers.go @@ -33,7 +33,7 @@ import ( const ( rrPrefix string = "rr" - rrVersion string = "2023.3.0" + rrVersion string = "2023.3.11" ) type Configurer interface { @@ -302,7 +302,7 @@ func NewTestServerWithOtelInterceptor(t *testing.T, stopCh chan struct{}, wg *sy cfg := &configImpl.Plugin{ Timeout: time.Second * 30, } - cfg.Path = "configs/.rr-otlp.yaml" + cfg.Path = "../configs/.rr-otlp.yaml" cfg.Prefix = rrPrefix cfg.Version = rrVersion From 14024d2a0511a49cbb5c4d98dcf62f0aba5f2c3e Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 02:06:26 +0100 Subject: [PATCH 11/19] chore: update codecov Signed-off-by: Valery Piashchynski --- .github/workflows/linux.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 746e68d9..5573d5a3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -77,7 +77,7 @@ jobs: - name: Archive code coverage results uses: actions/upload-artifact@v4 with: - name: coverage_2 + name: coverage_1 path: ./tests/coverage-ci rrtemporal_test: @@ -232,7 +232,7 @@ jobs: - name: Archive code coverage results uses: actions/upload-artifact@v4 with: - name: coverage_1 + name: coverage_3 path: ./tests/coverage-ci codecov: @@ -255,9 +255,14 @@ jobs: echo 'mode: atomic' > summary.txt tail -q -n +2 *.out >> summary.txt sed -i '2,${/roadrunner/!d}' summary.txt + cd ../coverage_3 + echo 'mode: atomic' > summary.txt + tail -q -n +2 *.out >> summary.txt + sed -i '2,${/roadrunner/!d}' summary.txt - name: upload to codecov uses: codecov/codecov-action@v4 # Docs: with: - files: ./coverage_1/summary.txt,./coverage_2/summary.txt + files: ./coverage_1/summary.txt,./coverage_2/summary.txt,./coverage_3/summary.txt + fail_ci_if_error: false From 70621f766b4e6f94cd34050b0550fe91284290fb Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 15:30:54 +0100 Subject: [PATCH 12/19] chore: more tests Signed-off-by: Valery Piashchynski --- tests/env/dynamicconfig/docker.yaml | 3 + tests/updates/updates_async_test.go | 265 ++++++++++++++++++++++++++++ tests/updates/updates_test.go | 235 +++++++++++++++++++++++- 3 files changed, 496 insertions(+), 7 deletions(-) diff --git a/tests/env/dynamicconfig/docker.yaml b/tests/env/dynamicconfig/docker.yaml index bc4058d2..1cf95977 100644 --- a/tests/env/dynamicconfig/docker.yaml +++ b/tests/env/dynamicconfig/docker.yaml @@ -1,3 +1,6 @@ frontend.enableUpdateWorkflowExecution: - value: true constraints: {} +frontend.enableUpdateWorkflowExecutionAsyncAccepted: + - value: true + constraints: {} diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index de15a98b..2cb876ec 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -1 +1,266 @@ package updates + +import ( + "context" + "fmt" + "sync" + "testing" + "tests/helpers" + "time" + + "github.com/stretchr/testify/require" + "go.temporal.io/api/enums/v1" + "go.temporal.io/api/history/v1" + updatepb "go.temporal.io/api/update/v1" + "go.temporal.io/sdk/client" +) + +const ( + awaitWithTimeoutM = "awaitWithTimeout" + awaitM = "await" + resolveValueM = "resolveValue" + // signal + exitSignal = "exit" + // queryResult + getValueQuery = "getValue" + // WF names + awaitsUpdateGreetWF = "AwaitsUpdate.greet" +) + +func Test_Updates_9(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + awaitsUpdateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitWithTimeoutM, + Args: []any{"key", 1, "fallback"}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, "fallback", result.(string)) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) + require.NoError(t, err) + time.Sleep(time.Second) + + err = s.Client.GetWorkflow(ctx, w.GetID(), w.GetRunID()).Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, map[string]any{"key": "fallback"}, result.(map[string]any)) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_Updates_10(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + awaitsUpdateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + wg.Add(1) + go func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{"key"}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err2) + + var result any + err2 = handle.Get(context.Background(), &result) + require.NoError(t, err2) + require.Equal(t, "resolved", result.(string)) + wg.Done() + }() + + time.Sleep(time.Second * 3) + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + queryResult, err := s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), getValueQuery, "key") + require.NoError(t, err) + + var queryRes string + err = queryResult.Get(&queryRes) + require.NoError(t, err) + require.Equal(t, "", queryRes) + + ctx3, cancel3 := context.WithTimeout(context.Background(), time.Minute) + defer cancel3() + + handle, err := s.Client.UpdateWorkflowWithOptions(ctx3, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{"key", "resolved"}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err) + + var resultaw string + err = handle.Get(context.Background(), &resultaw) + require.NoError(t, err) + require.Equal(t, "resolved", resultaw) + wg.Done() + + queryResult2, err := s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), getValueQuery, "key") + require.NoError(t, err) + + var queryRes2 string + err = queryResult2.Get(&queryRes2) + require.NoError(t, err) + require.Equal(t, "resolved", queryRes2) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) + require.NoError(t, err) + time.Sleep(time.Second) + + var wfresult any + err = s.Client.GetWorkflow(ctx, w.GetID(), w.GetRunID()).Get(context.Background(), &wfresult) + require.NoError(t, err) + require.Equal(t, map[string]any{"key": "resolved"}, wfresult.(map[string]any)) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + + wg.Wait() +} + +func Test_Updates_11(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + awaitsUpdateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + for i := 0; i < 5; i++ { + wg.Add(1) + go func(i int) { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{fmt.Sprintf("key-%d", i)}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err2) + + var result any + err2 = handle.Get(context.Background(), &result) + require.NoError(t, err2) + require.Equal(t, "resolved", result.(string)) + wg.Done() + }(i) + } + + time.Sleep(time.Second * 3) + + for i := 0; i < 5; i++ { + wg.Add(1) + go func(i int) { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{fmt.Sprintf("key-%d", i), "resolved"}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err2) + + var result any + err2 = handle.Get(context.Background(), &result) + require.NoError(t, err2) + require.Equal(t, "resolved", result.(string)) + wg.Done() + }(i) + } + + time.Sleep(time.Second * 3) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) + require.NoError(t, err) + time.Sleep(time.Second) + + var wfresult any + err = s.Client.GetWorkflow(context.Background(), w.GetID(), w.GetRunID()).Get(context.Background(), &wfresult) + require.NoError(t, err) + res := map[string]any{"key-0": "resolved", "key-1": "resolved", "key-2": "resolved", "key-3": "resolved", "key-4": "resolved"} + require.Equal(t, res, wfresult.(map[string]any)) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + + wg.Wait() +} diff --git a/tests/updates/updates_test.go b/tests/updates/updates_test.go index 0495ff89..3b0d3f06 100644 --- a/tests/updates/updates_test.go +++ b/tests/updates/updates_test.go @@ -13,6 +13,18 @@ import ( "go.temporal.io/sdk/client" ) +const ( + addNameM = "addName" + addNameWOValidationM = "addNameWithoutValidation" + throwExcM = "throwException" + randomizeNameM = "randomizeName" + addNameViaActivityM = "addNameViaActivity" + // signal + exitSig = "exit" + // WF names + updateGreetWF = "Update.greet" +) + func Test_UpdatesInit(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} @@ -24,7 +36,7 @@ func Test_UpdatesInit(t *testing.T) { client.StartWorkflowOptions{ TaskQueue: "default", }, - "Update.greet") + updateGreetWF) require.NoError(t, err) time.Sleep(time.Second) @@ -32,7 +44,7 @@ func Test_UpdatesInit(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), "addName", "John Doe") + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "John Doe") require.NoError(t, err) var result any @@ -41,7 +53,89 @@ func Test_UpdatesInit(t *testing.T) { require.NoError(t, err) require.Equal(t, "Hello, John Doe!", result.(string)) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "exit", nil) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_Updates_2(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameWOValidationM, "John Doe 42") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, "Hello, John Doe 42!", result.(string)) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_Updates_4(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "42") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.Error(t, err) + require.Contains(t, err.Error(), "Name must not contain digits") + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) require.NoError(t, err) time.Sleep(time.Second) @@ -54,7 +148,7 @@ func Test_UpdatesInit(t *testing.T) { wg.Wait() } -func Test_UpdatesSideEffect(t *testing.T) { +func Test_Updates_5(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} wg.Add(1) @@ -65,7 +159,7 @@ func Test_UpdatesSideEffect(t *testing.T) { client.StartWorkflowOptions{ TaskQueue: "default", }, - "Update.greet") + updateGreetWF) require.NoError(t, err) time.Sleep(time.Second) @@ -73,7 +167,89 @@ func Test_UpdatesSideEffect(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), "randomizeName", 3) + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), throwExcM, "John Doe") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.Error(t, err) + require.Contains(t, err.Error(), "Test exception with John Doe") + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_Updates_6(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), randomizeNameM, 1) + require.NoError(t, err) + + var result []any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Len(t, result, 1) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + wg.Wait() +} + +func Test_Updates_7(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), randomizeNameM, 3) require.NoError(t, err) var result []any @@ -82,7 +258,7 @@ func Test_UpdatesSideEffect(t *testing.T) { require.NoError(t, err) require.Len(t, result, 3) - err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), "exit", nil) + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) require.NoError(t, err) time.Sleep(time.Second) @@ -94,3 +270,48 @@ func Test_UpdatesSideEffect(t *testing.T) { stopCh <- struct{}{} wg.Wait() } + +func Test_Updates_8(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameViaActivityM, "John Doe") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, "Hello, john doe!", result.(string)) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_ACTIVITY_TASK_COMPLETED + }) + + stopCh <- struct{}{} + wg.Wait() +} From 92be623e23a1baf8ec6985a5784912afbdeb8e6a Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 15:45:48 +0100 Subject: [PATCH 13/19] chore: more tests Signed-off-by: Valery Piashchynski --- tests/updates/updates_async_test.go | 91 ++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index 2cb876ec..c26a89b8 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -192,8 +192,8 @@ func Test_Updates_11(t *testing.T) { require.NoError(t, err) time.Sleep(time.Second) + wg.Add(10) for i := 0; i < 5; i++ { - wg.Add(1) go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() @@ -220,7 +220,6 @@ func Test_Updates_11(t *testing.T) { time.Sleep(time.Second * 3) for i := 0; i < 5; i++ { - wg.Add(1) go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() @@ -264,3 +263,91 @@ func Test_Updates_11(t *testing.T) { wg.Wait() } + +func Test_Updates_12(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + awaitsUpdateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + wg.Add(10) + for i := 0; i < 5; i++ { + go func(i int) { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{fmt.Sprintf("key-%d", i)}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err2) + + var result any + err2 = handle.Get(context.Background(), &result) + require.NoError(t, err2) + require.Equal(t, fmt.Sprintf("resolved-%d", i), result.(string)) + wg.Done() + }(i) + } + + time.Sleep(time.Second * 3) + + for i := 0; i < 5; i++ { + go func(i int) { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{fmt.Sprintf("key-%d", i), fmt.Sprintf("resolved-%d", i)}, + WaitPolicy: &updatepb.WaitPolicy{ + LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, + }, + }) + require.NoError(t, err2) + + var result any + err2 = handle.Get(context.Background(), &result) + require.NoError(t, err2) + require.Equal(t, fmt.Sprintf("resolved-%d", i), result.(string)) + wg.Done() + }(i) + } + + time.Sleep(time.Second * 3) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) + require.NoError(t, err) + time.Sleep(time.Second) + + var wfresult any + err = s.Client.GetWorkflow(context.Background(), w.GetID(), w.GetRunID()).Get(context.Background(), &wfresult) + require.NoError(t, err) + res := map[string]any{"key-0": "resolved-0", "key-1": "resolved-1", "key-2": "resolved-2", "key-3": "resolved-3", "key-4": "resolved-4"} + require.Equal(t, res, wfresult.(map[string]any)) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + stopCh <- struct{}{} + + wg.Wait() +} From b1a493e0ad3915ebecafee1cb85c2153db807dbd Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:18:13 +0100 Subject: [PATCH 14/19] fix: update Accept Signed-off-by: Valery Piashchynski --- aggregatedpool/handler.go | 7 +- go.mod | 4 +- go.sum | 10 +-- tests/go.mod | 4 +- tests/go.sum | 9 +- tests/helpers/helpers.go | 8 +- tests/updates/updates_async_test.go | 68 ++++++++++++--- tests/updates/updates_replay_test.go | 118 +++++++++++++++++++++++++++ 8 files changed, 194 insertions(+), 34 deletions(-) create mode 100644 tests/updates/updates_replay_test.go diff --git a/aggregatedpool/handler.go b/aggregatedpool/handler.go index 0176a109..1be7e555 100644 --- a/aggregatedpool/handler.go +++ b/aggregatedpool/handler.go @@ -45,16 +45,17 @@ func (wp *Workflow) handleUpdate(name string, id string, input *commonpb.Payload updatesQueueCb := func() { // validate callback wp.updateValidateCb[id] = func(msg *internal.Message) { - wp.log.Debug("validate request callback", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Any("result", msg)) + wp.log.Debug("validate request callback", zap.String("RunID", wp.env.WorkflowInfo().WorkflowExecution.RunID), zap.String("name", name), zap.String("id", id), zap.Bool("is_replaying", wp.env.IsReplaying()), zap.Any("result", msg)) if !wp.env.IsReplaying() { // before accept we have only one option - reject if msg.Failure != nil { callbacks.Reject(temporal.GetDefaultFailureConverter().FailureToError(msg.Failure)) return } - - callbacks.Accept() } + + // update should be accepted on validate + callbacks.Accept() } // execute callback diff --git a/go.mod b/go.mod index 0d6d58b7..2a143e6f 100644 --- a/go.mod +++ b/go.mod @@ -38,13 +38,13 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/common v0.49.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/goridge/v3 v3.8.1 github.com/robfig/cron v1.2.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/stretchr/objx v0.5.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect github.com/twmb/murmur3 v1.1.8 // indirect diff --git a/go.sum b/go.sum index 06593059..a8408377 100644 --- a/go.sum +++ b/go.sum @@ -154,8 +154,8 @@ github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOA github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -187,9 +187,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -197,7 +196,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= diff --git a/tests/go.mod b/tests/go.mod index aebada09..a84a4b19 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -59,7 +59,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/common v0.49.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/roadrunner-server/errors v1.4.0 // indirect github.com/roadrunner-server/tcplisten v1.4.0 // indirect @@ -72,7 +72,7 @@ require ( github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect - github.com/stretchr/objx v0.5.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index a0d16958..f76e811a 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -186,8 +186,8 @@ github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOA github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -252,8 +252,8 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= -github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -261,7 +261,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= diff --git a/tests/helpers/helpers.go b/tests/helpers/helpers.go index 444eb7b0..fb7f7cd1 100644 --- a/tests/helpers/helpers.go +++ b/tests/helpers/helpers.go @@ -96,10 +96,10 @@ func (l *log) fields(keyvals []any) []zap.Field { } func NewTestServer(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup, configPath string) *TestServer { - container := endure.New(slog.LevelDebug, endure.GracefulShutdownTimeout(time.Second*30)) + container := endure.New(slog.LevelDebug, endure.GracefulShutdownTimeout(time.Second*10)) cfg := &configImpl.Plugin{ - Timeout: time.Second * 30, + Timeout: time.Second * 10, Path: configPath, Prefix: rrPrefix, Version: rrVersion, @@ -127,10 +127,10 @@ func NewTestServer(t *testing.T, stopCh chan struct{}, wg *sync.WaitGroup, confi select { case er := <-errCh: assert.Fail(t, fmt.Sprintf("got error from vertex: %s, error: %v", er.VertexID, er.Error)) - assert.NoError(t, container.Stop()) + require.NoError(t, container.Stop()) return case <-stopCh: - assert.NoError(t, container.Stop()) + require.NoError(t, container.Stop()) return } } diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index c26a89b8..4ba81178 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -9,9 +9,11 @@ import ( "time" "github.com/stretchr/testify/require" + "go.temporal.io/api/common/v1" "go.temporal.io/api/enums/v1" "go.temporal.io/api/history/v1" updatepb "go.temporal.io/api/update/v1" + "go.temporal.io/api/workflowservice/v1" "go.temporal.io/sdk/client" ) @@ -77,12 +79,24 @@ func Test_Updates_9(t *testing.T) { stopCh <- struct{}{} wg.Wait() + + t.Cleanup(func() { + _, errd := s.Client.WorkflowService().DeleteWorkflowExecution(context.Background(), &workflowservice.DeleteWorkflowExecutionRequest{ + Namespace: "default", + WorkflowExecution: &common.WorkflowExecution{ + WorkflowId: w.GetID(), + RunId: w.GetRunID(), + }, + }) + require.NoError(t, errd) + s.Client.Close() + }) } func Test_Updates_10(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} - wg.Add(1) + wg.Add(2) s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( @@ -95,7 +109,6 @@ func Test_Updates_10(t *testing.T) { require.NoError(t, err) time.Sleep(time.Second) - wg.Add(1) go func() { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() @@ -148,7 +161,6 @@ func Test_Updates_10(t *testing.T) { err = handle.Get(context.Background(), &resultaw) require.NoError(t, err) require.Equal(t, "resolved", resultaw) - wg.Done() queryResult2, err := s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), getValueQuery, "key") require.NoError(t, err) @@ -172,14 +184,25 @@ func Test_Updates_10(t *testing.T) { }) stopCh <- struct{}{} - wg.Wait() + + t.Cleanup(func() { + _, errd := s.Client.WorkflowService().DeleteWorkflowExecution(context.Background(), &workflowservice.DeleteWorkflowExecutionRequest{ + Namespace: "default", + WorkflowExecution: &common.WorkflowExecution{ + WorkflowId: w.GetID(), + RunId: w.GetRunID(), + }, + }) + require.NoError(t, errd) + s.Client.Close() + }) } func Test_Updates_11(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} - wg.Add(1) + wg.Add(11) s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( @@ -190,9 +213,7 @@ func Test_Updates_11(t *testing.T) { awaitsUpdateGreetWF) require.NoError(t, err) - time.Sleep(time.Second) - wg.Add(10) for i := 0; i < 5; i++ { go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) @@ -217,8 +238,6 @@ func Test_Updates_11(t *testing.T) { }(i) } - time.Sleep(time.Second * 3) - for i := 0; i < 5; i++ { go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) @@ -247,6 +266,7 @@ func Test_Updates_11(t *testing.T) { err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) require.NoError(t, err) + time.Sleep(time.Second) var wfresult any @@ -260,14 +280,27 @@ func Test_Updates_11(t *testing.T) { }) stopCh <- struct{}{} - wg.Wait() + + t.Cleanup(func() { + ctxCl, cancelCl := context.WithTimeout(context.Background(), time.Second*10) + defer cancelCl() + _, errd := s.Client.WorkflowService().DeleteWorkflowExecution(ctxCl, &workflowservice.DeleteWorkflowExecutionRequest{ + Namespace: "default", + WorkflowExecution: &common.WorkflowExecution{ + WorkflowId: w.GetID(), + RunId: w.GetRunID(), + }, + }) + require.NoError(t, errd) + s.Client.Close() + }) } func Test_Updates_12(t *testing.T) { stopCh := make(chan struct{}, 1) wg := &sync.WaitGroup{} - wg.Add(1) + wg.Add(11) s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") w, err := s.Client.ExecuteWorkflow( @@ -280,7 +313,6 @@ func Test_Updates_12(t *testing.T) { require.NoError(t, err) time.Sleep(time.Second) - wg.Add(10) for i := 0; i < 5; i++ { go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) @@ -350,4 +382,16 @@ func Test_Updates_12(t *testing.T) { stopCh <- struct{}{} wg.Wait() + + t.Cleanup(func() { + _, errd := s.Client.WorkflowService().DeleteWorkflowExecution(context.Background(), &workflowservice.DeleteWorkflowExecutionRequest{ + Namespace: "default", + WorkflowExecution: &common.WorkflowExecution{ + WorkflowId: w.GetID(), + RunId: w.GetRunID(), + }, + }) + require.NoError(t, errd) + s.Client.Close() + }) } diff --git a/tests/updates/updates_replay_test.go b/tests/updates/updates_replay_test.go new file mode 100644 index 00000000..1ec17363 --- /dev/null +++ b/tests/updates/updates_replay_test.go @@ -0,0 +1,118 @@ +package updates + +import ( + "context" + "net" + "net/rpc" + "path" + "sync" + "testing" + "tests/helpers" + "time" + + protoApi "github.com/roadrunner-server/api/v4/build/temporal/v1" + goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.temporal.io/api/common/v1" + "go.temporal.io/api/enums/v1" + "go.temporal.io/api/history/v1" + "go.temporal.io/sdk/client" +) + +const ( + download string = "temporal.DownloadWorkflowHistory" + replay string = "temporal.ReplayFromJSON" +) + +func TestUpdatesReplay(t *testing.T) { + stopCh := make(chan struct{}, 1) + wg := &sync.WaitGroup{} + wg.Add(1) + s := helpers.NewTestServer(t, stopCh, wg, "../configs/.rr-proto.yaml") + + w, err := s.Client.ExecuteWorkflow( + context.Background(), + client.StartWorkflowOptions{ + TaskQueue: "default", + }, + updateGreetWF) + + require.NoError(t, err) + time.Sleep(time.Second) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "John Doe") + require.NoError(t, err) + + var result any + + err = handle.Get(context.Background(), &result) + require.NoError(t, err) + require.Equal(t, "Hello, John Doe!", result.(string)) + + err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSig, nil) + require.NoError(t, err) + + time.Sleep(time.Second) + + s.AssertContainsEvent(s.Client, t, w, func(event *history.HistoryEvent) bool { + return event.EventType == enums.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED + }) + + we, err := s.Client.DescribeWorkflowExecution(context.Background(), w.GetID(), w.GetRunID()) + assert.NoError(t, err) + assert.Equal(t, "Completed", we.WorkflowExecutionInfo.Status.String()) + + time.Sleep(time.Second) + tmp := path.Join(t.TempDir(), "replay.json") + + t.Run("downloadWFHistory", downloadWFHistory("127.0.0.1:6001", w.GetID(), w.GetRunID(), updateGreetWF, tmp)) + t.Run("replayFromJSON", replayFromJSON("127.0.0.1:6001", tmp, updateGreetWF)) + + stopCh <- struct{}{} + wg.Wait() + time.Sleep(time.Second) +} + +func downloadWFHistory(address, wid, rid, wname, path string) func(t *testing.T) { + return func(t *testing.T) { + conn, err := net.Dial("tcp", address) + require.NoError(t, err) + client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn)) + + req := &protoApi.ReplayRequest{ + SavePath: path, + WorkflowType: &common.WorkflowType{ + Name: wname, + }, + WorkflowExecution: &common.WorkflowExecution{ + WorkflowId: wid, + RunId: rid, + }, + } + resp := &protoApi.ReplayResponse{} + err = client.Call(download, req, resp) + require.NoError(t, err) + } +} + +func replayFromJSON(address, path, wname string) func(t *testing.T) { + return func(t *testing.T) { + conn, err := net.Dial("tcp", address) + require.NoError(t, err) + client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn)) + + req := &protoApi.ReplayRequest{ + SavePath: path, + WorkflowType: &common.WorkflowType{ + Name: wname, + }, + } + resp := &protoApi.ReplayResponse{} + err = client.Call(replay, req, resp) + require.NoError(t, err) + } +} From afc31e7315d25d485e53d291abd671ae1b981465 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:19:57 +0100 Subject: [PATCH 15/19] chore: PHP dev-master Signed-off-by: Valery Piashchynski --- tests/php_test_files/composer.json | 2 +- tests/php_test_files/composer.lock | 69 +++++++++++++++--------------- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/tests/php_test_files/composer.json b/tests/php_test_files/composer.json index 0b4d7358..4b1f8324 100644 --- a/tests/php_test_files/composer.json +++ b/tests/php_test_files/composer.json @@ -7,7 +7,7 @@ "nyholm/psr7": "^1.5", "spiral/roadrunner-http": "^3.0", "spiral/roadrunner-worker": "^3.0", - "temporal/sdk": "dev-updates#53f72b43ed427162ac39a33b75130472acca02f6", + "temporal/sdk": "dev-master", "spiral/tokenizer": ">=2.7", "spiral/roadrunner-metrics": "^3.0", "spiral/roadrunner-grpc": "^3.0", diff --git a/tests/php_test_files/composer.lock b/tests/php_test_files/composer.lock index c346bb6b..54d59556 100644 --- a/tests/php_test_files/composer.lock +++ b/tests/php_test_files/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "31de7ebc3708e50f7104b10b2d1d9990", + "content-hash": "7677d5f6ee1f1a9f2240a92ab1b1e271", "packages": [ { "name": "brick/math", @@ -2569,16 +2569,16 @@ }, { "name": "spiral/core", - "version": "3.11.1", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/spiral/core.git", - "reference": "8147d305a2a1e06fa498fe2d8ab32097451a6b34" + "reference": "ff67345f70c0d133978fcbc25275d4db2f7f9d29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/core/zipball/8147d305a2a1e06fa498fe2d8ab32097451a6b34", - "reference": "8147d305a2a1e06fa498fe2d8ab32097451a6b34", + "url": "https://api.github.com/repos/spiral/core/zipball/ff67345f70c0d133978fcbc25275d4db2f7f9d29", + "reference": "ff67345f70c0d133978fcbc25275d4db2f7f9d29", "shasum": "" }, "require": { @@ -2632,7 +2632,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/core" }, - "time": "2023-12-21T14:43:04+00:00" + "time": "2024-02-29T13:09:34+00:00" }, { "name": "spiral/goridge", @@ -2723,22 +2723,22 @@ }, { "name": "spiral/logger", - "version": "3.11.1", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/spiral/logger.git", - "reference": "c88f6b2286487347e6dcdaca1eaa510f68b2da20" + "reference": "e4927aa72824ce472a76ebd2091b28ec936c0f09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/logger/zipball/c88f6b2286487347e6dcdaca1eaa510f68b2da20", - "reference": "c88f6b2286487347e6dcdaca1eaa510f68b2da20", + "url": "https://api.github.com/repos/spiral/logger/zipball/e4927aa72824ce472a76ebd2091b28ec936c0f09", + "reference": "e4927aa72824ce472a76ebd2091b28ec936c0f09", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "1 - 3", - "spiral/core": "^3.11.1" + "spiral/core": "^3.12" }, "require-dev": { "mockery/mockery": "^1.5", @@ -2784,7 +2784,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/logger" }, - "time": "2023-12-29T10:41:05+00:00" + "time": "2023-12-29T10:47:42+00:00" }, { "name": "spiral/roadrunner", @@ -3384,16 +3384,16 @@ }, { "name": "spiral/roadrunner-tcp", - "version": "3.0.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/roadrunner-php/tcp.git", - "reference": "ee4a060609a7540f60bbce8843704fb915fe6b02" + "reference": "2fc2fa71aa960a45880cc88c1baffc7f94a3d0af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roadrunner-php/tcp/zipball/ee4a060609a7540f60bbce8843704fb915fe6b02", - "reference": "ee4a060609a7540f60bbce8843704fb915fe6b02", + "url": "https://api.github.com/repos/roadrunner-php/tcp/zipball/2fc2fa71aa960a45880cc88c1baffc7f94a3d0af", + "reference": "2fc2fa71aa960a45880cc88c1baffc7f94a3d0af", "shasum": "" }, "require": { @@ -3404,7 +3404,7 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "^1.0", - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^10.5", "vimeo/psalm": ">=5.8" }, "suggest": { @@ -3446,10 +3446,10 @@ "homepage": "https://roadrunner.dev/", "support": { "chat": "https://discord.gg/V6EK4he", - "docs": "https://roadrunner.dev/docs", + "docs": "https://docs.roadrunner.dev", "forum": "https://forum.roadrunner.dev/", "issues": "https://github.com/roadrunner-server/roadrunner/issues", - "source": "https://github.com/roadrunner-php/tcp/tree/3.0.0" + "source": "https://github.com/roadrunner-php/tcp/tree/v3.1.0" }, "funding": [ { @@ -3457,7 +3457,7 @@ "type": "github" } ], - "time": "2023-04-13T10:34:26+00:00" + "time": "2024-02-29T10:38:30+00:00" }, { "name": "spiral/roadrunner-worker", @@ -3546,30 +3546,30 @@ }, { "name": "spiral/tokenizer", - "version": "3.11.1", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/spiral/tokenizer.git", - "reference": "67be0d5e6493740008a2cee2cc26bea30a4a513b" + "reference": "2d90d4f72ad1fb596892c5bd0698c0cd6c888991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/tokenizer/zipball/67be0d5e6493740008a2cee2cc26bea30a4a513b", - "reference": "67be0d5e6493740008a2cee2cc26bea30a4a513b", + "url": "https://api.github.com/repos/spiral/tokenizer/zipball/2d90d4f72ad1fb596892c5bd0698c0cd6c888991", + "reference": "2d90d4f72ad1fb596892c5bd0698c0cd6c888991", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=8.1", - "spiral/core": "^3.11.1", - "spiral/logger": "^3.11.1", + "spiral/core": "^3.12", + "spiral/logger": "^3.12", "symfony/finder": "^5.3.7 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^10.1", "spiral/attributes": "^2.8|^3.0", - "spiral/boot": "^3.11.1", - "spiral/files": "^3.11.1", + "spiral/boot": "^3.12", + "spiral/files": "^3.12", "vimeo/psalm": "^5.9" }, "type": "library", @@ -3611,7 +3611,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/tokenizer" }, - "time": "2023-12-29T10:41:21+00:00" + "time": "2024-01-11T13:33:27+00:00" }, { "name": "symfony/console", @@ -5100,16 +5100,16 @@ }, { "name": "temporal/sdk", - "version": "dev-updates", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/temporalio/sdk-php.git", - "reference": "53f72b43ed427162ac39a33b75130472acca02f6" + "reference": "5e3307ba9ed97ed81e3bbdc12d0d6291b8a22f10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/53f72b43ed427162ac39a33b75130472acca02f6", - "reference": "53f72b43ed427162ac39a33b75130472acca02f6", + "url": "https://api.github.com/repos/temporalio/sdk-php/zipball/5e3307ba9ed97ed81e3bbdc12d0d6291b8a22f10", + "reference": "5e3307ba9ed97ed81e3bbdc12d0d6291b8a22f10", "shasum": "" }, "require": { @@ -5150,6 +5150,7 @@ "suggest": { "doctrine/annotations": "^1.11 for Doctrine metadata driver support" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -5186,7 +5187,7 @@ "issues": "https://github.com/temporalio/sdk-php/issues", "source": "https://github.com/temporalio/sdk-php" }, - "time": "2024-02-21T17:07:37+00:00" + "time": "2024-02-29T15:38:15+00:00" } ], "packages-dev": [], From e595427a23ce7bc05ae849e2c1ba4c75ba209cdd Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:29:11 +0100 Subject: [PATCH 16/19] chore: add some sleep for the super fast GitHub actions Signed-off-by: Valery Piashchynski --- tests/updates/updates_async_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index 4ba81178..bf9b256c 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -367,7 +367,7 @@ func Test_Updates_12(t *testing.T) { err = s.Client.SignalWorkflow(context.Background(), w.GetID(), w.GetRunID(), exitSignal, nil) require.NoError(t, err) - time.Sleep(time.Second) + time.Sleep(time.Second * 5) var wfresult any err = s.Client.GetWorkflow(context.Background(), w.GetID(), w.GetRunID()).Get(context.Background(), &wfresult) From 76802ae2589c24c3ac6cc8c589a7dccceebf53f5 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:32:47 +0100 Subject: [PATCH 17/19] chore: update query_test Signed-off-by: Valery Piashchynski --- tests/general/query_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/general/query_test.go b/tests/general/query_test.go index d4d7fbe0..7ac34fa7 100644 --- a/tests/general/query_test.go +++ b/tests/general/query_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.temporal.io/sdk/client" - "go.temporal.io/sdk/worker" ) func Test_ListQueriesProto(t *testing.T) { @@ -45,8 +44,6 @@ func Test_ListQueriesProto(t *testing.T) { assert.Equal(t, 0, r) cancel() - worker.PurgeStickyWorkflowCache() - time.Sleep(time.Millisecond * 500) workers := getWorkers(t) @@ -57,7 +54,6 @@ func Test_ListQueriesProto(t *testing.T) { _ = proc.Kill() } - worker.PurgeStickyWorkflowCache() time.Sleep(time.Second) ctx, cancel = context.WithTimeout(context.Background(), time.Minute) From 2205135e4676e8dcfbf784e15cc11cdf1452364b Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:40:20 +0100 Subject: [PATCH 18/19] chore: order in await and resolve updates Signed-off-by: Valery Piashchynski --- tests/updates/updates_async_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index bf9b256c..2dab0361 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -238,6 +238,8 @@ func Test_Updates_11(t *testing.T) { }(i) } + time.Sleep(time.Second * 5) + for i := 0; i < 5; i++ { go func(i int) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) @@ -337,7 +339,7 @@ func Test_Updates_12(t *testing.T) { }(i) } - time.Sleep(time.Second * 3) + time.Sleep(time.Second * 5) for i := 0; i < 5; i++ { go func(i int) { From beaf58fab94ef1d140380d7551ee82e517d36780 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 29 Feb 2024 17:48:33 +0100 Subject: [PATCH 19/19] chore: wait for the updates tests Signed-off-by: Valery Piashchynski --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5573d5a3..c3611c3a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -241,6 +241,7 @@ jobs: needs: - rrtemporal_test - rrtemporal_tls_test + - rrtemporal_updates_test timeout-minutes: 60 steps: