From 600bd66a68c7f0172ef50272f707f49344ae4ce0 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 12 Aug 2024 17:21:38 -0500 Subject: [PATCH 001/112] tweaks to fix some flakiness with int tests Signed-off-by: Cassandra Coyle --- .../suite/actors/reminders/scheduler/unregister.go | 4 ++-- tests/integration/suite/daprd/binding/input/appready.go | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/unregister.go b/tests/integration/suite/actors/reminders/scheduler/unregister.go index 0df5caacd5e..b8575d72633 100644 --- a/tests/integration/suite/actors/reminders/scheduler/unregister.go +++ b/tests/integration/suite/actors/reminders/scheduler/unregister.go @@ -103,7 +103,7 @@ func (u *unregister) Run(t *testing.T, ctx context.Context) { require.True(t, ok, "expected a gRPC status error, got %v", err) require.Equal(t, codes.Unavailable, st.Code(), "the only allowed error is 'Unavailable', but got %v", err) } - }, time.Second*10, time.Millisecond*50) + }, time.Second*10, time.Millisecond*10) assert.EventuallyWithT(t, func(ct *assert.CollectT) { assert.GreaterOrEqual(ct, int(u.methodcalled.Load()), 2) @@ -124,7 +124,7 @@ func (u *unregister) Run(t *testing.T, ctx context.Context) { prevLast := last last = called assert.Equal(ct, int(prevLast), int(called)) - }, time.Second*15, time.Second*2) + }, time.Second*15, time.Second*1) _, err = gclient.RegisterActorReminder(ctx, &rtv1.RegisterActorReminderRequest{ ActorType: "myactortype", diff --git a/tests/integration/suite/daprd/binding/input/appready.go b/tests/integration/suite/daprd/binding/input/appready.go index 06d670bbdc5..a0982f3897c 100644 --- a/tests/integration/suite/daprd/binding/input/appready.go +++ b/tests/integration/suite/daprd/binding/input/appready.go @@ -98,7 +98,8 @@ spec: func (a *appready) Run(t *testing.T, ctx context.Context) { a.daprd.WaitUntilRunning(t, ctx) - + a.appHealthy.Store(false) + a.bindingCalled.Store(0) gclient := a.daprd.GRPCClient(t, ctx) httpClient := client.HTTP(t) @@ -108,13 +109,12 @@ func (a *appready) Run(t *testing.T, ctx context.Context) { require.EventuallyWithT(t, func(c *assert.CollectT) { resp, err := gclient.GetMetadata(ctx, new(rtv1.GetMetadataRequest)) - require.NoError(t, err) + require.NoError(c, err) assert.Len(c, resp.GetRegisteredComponents(), 1) }, time.Second*5, time.Millisecond*10) called := a.healthCalled.Load() require.Eventually(t, func() bool { return a.healthCalled.Load() > called }, time.Second*5, time.Millisecond*10) - assert.Eventually(t, func() bool { resp, err := httpClient.Do(req) require.NoError(t, err) @@ -122,7 +122,6 @@ func (a *appready) Run(t *testing.T, ctx context.Context) { return resp.StatusCode == http.StatusInternalServerError }, time.Second*5, 10*time.Millisecond) - time.Sleep(time.Second * 2) assert.Equal(t, int64(0), a.bindingCalled.Load()) a.appHealthy.Store(true) From d4c56c7ded266cf4ac0fbce62859e70bb44fab33 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 12 Aug 2024 17:26:32 -0500 Subject: [PATCH 002/112] assert eventually for grpc/appready Signed-off-by: Cassandra Coyle --- .../suite/actors/reminders/scheduler/unregister.go | 4 ++-- .../suite/daprd/pubsub/grpc/appready.go | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/unregister.go b/tests/integration/suite/actors/reminders/scheduler/unregister.go index b8575d72633..e615d3e53a0 100644 --- a/tests/integration/suite/actors/reminders/scheduler/unregister.go +++ b/tests/integration/suite/actors/reminders/scheduler/unregister.go @@ -100,8 +100,8 @@ func (u *unregister) Run(t *testing.T, ctx context.Context) { }) if err != nil { st, ok := status.FromError(err) - require.True(t, ok, "expected a gRPC status error, got %v", err) - require.Equal(t, codes.Unavailable, st.Code(), "the only allowed error is 'Unavailable', but got %v", err) + require.True(c, ok, "expected a gRPC status error, got %v", err) + require.Equal(c, codes.Unavailable, st.Code(), "the only allowed error is 'Unavailable', but got %v", err) } }, time.Second*10, time.Millisecond*10) diff --git a/tests/integration/suite/daprd/pubsub/grpc/appready.go b/tests/integration/suite/daprd/pubsub/grpc/appready.go index 8d280df8b61..3e438c9d6bb 100644 --- a/tests/integration/suite/daprd/pubsub/grpc/appready.go +++ b/tests/integration/suite/daprd/pubsub/grpc/appready.go @@ -143,12 +143,14 @@ func (a *appready) Run(t *testing.T, ctx context.Context) { return resp.StatusCode == http.StatusOK }, time.Second*5, 10*time.Millisecond) - _, err = client.PublishEvent(ctx, &rtv1.PublishEventRequest{ - PubsubName: "mypubsub", - Topic: "mytopic", - Data: []byte(`{"status": "completed"}`), - }) - require.NoError(t, err) + require.EventuallyWithT(t, func(c *assert.CollectT) { + _, err = client.PublishEvent(ctx, &rtv1.PublishEventRequest{ + PubsubName: "mypubsub", + Topic: "mytopic", + Data: []byte(`{"status": "completed"}`), + }) + require.NoError(c, err) + }, time.Second*5, time.Millisecond*10) select { case resp := <-a.topicChan: From 090e6bfd632b14b402b44240481b0816ec4bf812 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 12 Aug 2024 17:33:57 -0500 Subject: [PATCH 003/112] rm unnecessary change Signed-off-by: Cassandra Coyle --- tests/integration/suite/daprd/binding/input/appready.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/suite/daprd/binding/input/appready.go b/tests/integration/suite/daprd/binding/input/appready.go index a0982f3897c..6cf02372fd3 100644 --- a/tests/integration/suite/daprd/binding/input/appready.go +++ b/tests/integration/suite/daprd/binding/input/appready.go @@ -98,7 +98,7 @@ spec: func (a *appready) Run(t *testing.T, ctx context.Context) { a.daprd.WaitUntilRunning(t, ctx) - a.appHealthy.Store(false) + a.bindingCalled.Store(0) gclient := a.daprd.GRPCClient(t, ctx) httpClient := client.HTTP(t) From 76bcaf3022d9d432b831833d1253cbaa46bf5e98 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 14 Aug 2024 14:16:04 -0500 Subject: [PATCH 004/112] wait for sentry for hotreload components int test Signed-off-by: Cassandra Coyle --- .../operator/informer/scopes/components.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go index 36e03f4a7b6..32dad1516ec 100644 --- a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go +++ b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go @@ -41,6 +41,7 @@ func init() { } type components struct { + sentry *sentry.Sentry daprd *daprd.Daprd store *store.Store kubeapi *kubernetes.Kubernetes @@ -49,7 +50,7 @@ type components struct { } func (c *components) Setup(t *testing.T) []framework.Option { - sentry := sentry.New(t, sentry.WithTrustDomain("integration.test.dapr.io")) + c.sentry = sentry.New(t, sentry.WithTrustDomain("integration.test.dapr.io")) c.store = store.New(metav1.GroupVersionKind{ Group: "dapr.io", @@ -60,7 +61,7 @@ func (c *components) Setup(t *testing.T) []framework.Option { kubernetes.WithBaseOperatorAPI(t, spiffeid.RequireTrustDomainFromString("integration.test.dapr.io"), "default", - sentry.Port(), + c.sentry.Port(), ), kubernetes.WithClusterDaprConfigurationList(t, &configapi.ConfigurationList{ Items: []configapi.Configuration{{ @@ -69,7 +70,7 @@ func (c *components) Setup(t *testing.T) []framework.Option { Spec: configapi.ConfigurationSpec{ MTLSSpec: &configapi.MTLSSpec{ ControlPlaneTrustDomain: "integration.test.dapr.io", - SentryAddress: sentry.Address(), + SentryAddress: c.sentry.Address(), }, Features: []configapi.FeatureSpec{{ Name: "HotReload", @@ -84,7 +85,7 @@ func (c *components) Setup(t *testing.T) []framework.Option { opts := []operator.Option{ operator.WithNamespace("default"), operator.WithKubeconfigPath(c.kubeapi.KubeconfigPath(t)), - operator.WithTrustAnchorsFile(sentry.TrustAnchorsFile(t)), + operator.WithTrustAnchorsFile(c.sentry.TrustAnchorsFile(t)), } c.operator1 = operator.New(t, opts...) c.operator2 = operator.New(t, append(opts, @@ -94,24 +95,25 @@ func (c *components) Setup(t *testing.T) []framework.Option { c.daprd = daprd.New(t, daprd.WithMode("kubernetes"), daprd.WithConfigs("daprsystem"), - daprd.WithSentryAddress(sentry.Address()), + daprd.WithSentryAddress(c.sentry.Address()), daprd.WithControlPlaneAddress(c.operator1.Address()), daprd.WithDisableK8sSecretStore(true), daprd.WithEnableMTLS(true), daprd.WithNamespace("default"), daprd.WithControlPlaneTrustDomain("integration.test.dapr.io"), daprd.WithExecOptions(exec.WithEnvVars(t, - "DAPR_TRUST_ANCHORS", string(sentry.CABundle().TrustAnchors), + "DAPR_TRUST_ANCHORS", string(c.sentry.CABundle().TrustAnchors), )), ) return []framework.Option{ - framework.WithProcesses(sentry, c.kubeapi, c.daprd), + framework.WithProcesses(c.sentry, c.kubeapi, c.daprd), } } func (c *components) Run(t *testing.T, ctx context.Context) { c.operator1.Run(t, ctx) + c.sentry.WaitUntilRunning(t, ctx) c.operator1.WaitUntilRunning(t, ctx) c.daprd.WaitUntilRunning(t, ctx) From 8c2f7ddf50415f8000e888bbbf599ea16e731b36 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 14 Aug 2024 15:12:15 -0500 Subject: [PATCH 005/112] up test time for windows being slow Signed-off-by: Cassandra Coyle --- pkg/actors/health/health_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/actors/health/health_test.go b/pkg/actors/health/health_test.go index e2fb78811b9..a774f4a79ef 100644 --- a/pkg/actors/health/health_test.go +++ b/pkg/actors/health/health_test.go @@ -185,7 +185,7 @@ func assertHealthSignal(t *testing.T, clock *clocktesting.FakeClock, ch <-chan b select { case v := <-ch: return v - case <-time.After(200 * time.Millisecond): + case <-time.After(300 * time.Millisecond): t.Fatal("did not receive a signal in 200ms") } return false From 30c432ce32fc5cb19e45db1bcad20effd4933a87 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 14 Aug 2024 16:04:12 -0500 Subject: [PATCH 006/112] pr feedback and add duetime to triggered job for stream test Signed-off-by: Cassandra Coyle --- .../integration/suite/actors/reminders/scheduler/unregister.go | 2 +- tests/integration/suite/daprd/binding/input/appready.go | 1 + tests/integration/suite/daprd/jobs/streaming/stream.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/unregister.go b/tests/integration/suite/actors/reminders/scheduler/unregister.go index e615d3e53a0..a4c361a1c89 100644 --- a/tests/integration/suite/actors/reminders/scheduler/unregister.go +++ b/tests/integration/suite/actors/reminders/scheduler/unregister.go @@ -124,7 +124,7 @@ func (u *unregister) Run(t *testing.T, ctx context.Context) { prevLast := last last = called assert.Equal(ct, int(prevLast), int(called)) - }, time.Second*15, time.Second*1) + }, time.Second*15, time.Second*2) _, err = gclient.RegisterActorReminder(ctx, &rtv1.RegisterActorReminderRequest{ ActorType: "myactortype", diff --git a/tests/integration/suite/daprd/binding/input/appready.go b/tests/integration/suite/daprd/binding/input/appready.go index 6cf02372fd3..d7e02cf7bda 100644 --- a/tests/integration/suite/daprd/binding/input/appready.go +++ b/tests/integration/suite/daprd/binding/input/appready.go @@ -122,6 +122,7 @@ func (a *appready) Run(t *testing.T, ctx context.Context) { return resp.StatusCode == http.StatusInternalServerError }, time.Second*5, 10*time.Millisecond) + time.Sleep(time.Second * 2) assert.Equal(t, int64(0), a.bindingCalled.Load()) a.appHealthy.Store(true) diff --git a/tests/integration/suite/daprd/jobs/streaming/stream.go b/tests/integration/suite/daprd/jobs/streaming/stream.go index 723a569fd87..9a5c8c6629c 100644 --- a/tests/integration/suite/daprd/jobs/streaming/stream.go +++ b/tests/integration/suite/daprd/jobs/streaming/stream.go @@ -115,6 +115,7 @@ func (s *streaming) Run(t *testing.T, ctx context.Context) { Job: &runtimev1pb.Job{ Name: "test", Schedule: ptr.Of("@every 1s"), + DueTime: ptr.Of("0s"), Repeats: ptr.Of(uint32(1)), Data: &anypb.Any{ TypeUrl: "type.googleapis.com/google.type.Expr", From f69903eef20192a1fcf3654c0628b07fba413984 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 15 Aug 2024 13:55:18 -0500 Subject: [PATCH 007/112] pr feedback Signed-off-by: Cassandra Coyle --- tests/integration/suite/daprd/binding/input/appready.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/suite/daprd/binding/input/appready.go b/tests/integration/suite/daprd/binding/input/appready.go index d7e02cf7bda..a2ac8e91858 100644 --- a/tests/integration/suite/daprd/binding/input/appready.go +++ b/tests/integration/suite/daprd/binding/input/appready.go @@ -99,7 +99,6 @@ spec: func (a *appready) Run(t *testing.T, ctx context.Context) { a.daprd.WaitUntilRunning(t, ctx) - a.bindingCalled.Store(0) gclient := a.daprd.GRPCClient(t, ctx) httpClient := client.HTTP(t) From 1f98970b48b187d9e4a8b62a371a5de7d2f76982 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 15 Aug 2024 13:59:33 -0500 Subject: [PATCH 008/112] fm assert eventually per pr feedback Signed-off-by: Cassandra Coyle --- .../suite/daprd/pubsub/grpc/appready.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/integration/suite/daprd/pubsub/grpc/appready.go b/tests/integration/suite/daprd/pubsub/grpc/appready.go index 3e438c9d6bb..8d280df8b61 100644 --- a/tests/integration/suite/daprd/pubsub/grpc/appready.go +++ b/tests/integration/suite/daprd/pubsub/grpc/appready.go @@ -143,14 +143,12 @@ func (a *appready) Run(t *testing.T, ctx context.Context) { return resp.StatusCode == http.StatusOK }, time.Second*5, 10*time.Millisecond) - require.EventuallyWithT(t, func(c *assert.CollectT) { - _, err = client.PublishEvent(ctx, &rtv1.PublishEventRequest{ - PubsubName: "mypubsub", - Topic: "mytopic", - Data: []byte(`{"status": "completed"}`), - }) - require.NoError(c, err) - }, time.Second*5, time.Millisecond*10) + _, err = client.PublishEvent(ctx, &rtv1.PublishEventRequest{ + PubsubName: "mypubsub", + Topic: "mytopic", + Data: []byte(`{"status": "completed"}`), + }) + require.NoError(t, err) select { case resp := <-a.topicChan: From 7e5f6aefa34ebd6b92de1cc10b97a774c249eea1 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Fri, 16 Aug 2024 15:53:40 +0100 Subject: [PATCH 009/112] Makes keepalive time and timeout configurable Signed-off-by: Elena Kolevska --- .../templates/dapr_placement_statefulset.yaml | 6 ++++ charts/dapr/charts/dapr_placement/values.yaml | 2 ++ cmd/injector/options/options.go | 2 +- cmd/placement/app/app.go | 11 +++--- cmd/placement/options/options.go | 10 +++++- cmd/placement/options/options_test.go | 2 ++ pkg/placement/placement.go | 35 ++++++++++++++----- 7 files changed, 53 insertions(+), 15 deletions(-) diff --git a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml index 5c4b6194e18..63fecd95ddd 100644 --- a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml +++ b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml @@ -145,6 +145,12 @@ spec: {{- if eq .Values.metadataEnabled true }} - "--metadata-enabled" {{- end }} +{{- if .Values.keepAliveTime }} + - "--keepalive-time={{ .Values.keepAliveTime }}" +{{- end }} +{{- if .Values.keepAliveTimeout }} + - "--keepalive-timeout={{ .Values.keepAliveTimeout }}" +{{- end }} {{- if eq .Values.global.prometheus.enabled true }} - "--enable-metrics" - "--replicationFactor" diff --git a/charts/dapr/charts/dapr_placement/values.yaml b/charts/dapr/charts/dapr_placement/values.yaml index 27832b39f8e..32065af3db8 100644 --- a/charts/dapr/charts/dapr_placement/values.yaml +++ b/charts/dapr/charts/dapr_placement/values.yaml @@ -25,6 +25,8 @@ ha: false maxActorApiLevel: 10 minActorApiLevel: 0 +keepAliveTime: 2 +keepAliveTimeout: 3 cluster: forceInMemoryLog: false diff --git a/cmd/injector/options/options.go b/cmd/injector/options/options.go index fd2250f2e70..1d09a617000 100644 --- a/cmd/injector/options/options.go +++ b/cmd/injector/options/options.go @@ -52,7 +52,7 @@ func New(origArgs []string) *Options { } // Create a flag set - fs := pflag.NewFlagSet("sentry", pflag.ExitOnError) + fs := pflag.NewFlagSet("injector", pflag.ExitOnError) fs.SortFlags = true fs.IntVar(&opts.HealthzPort, "healthz-port", 8080, "The port used for health checks") diff --git a/cmd/placement/app/app.go b/cmd/placement/app/app.go index cbdd663d4d3..5f59908ab3b 100644 --- a/cmd/placement/app/app.go +++ b/cmd/placement/app/app.go @@ -17,6 +17,7 @@ import ( "encoding/json" "math" "os" + "time" "github.com/dapr/dapr/cmd/placement/options" "github.com/dapr/dapr/pkg/buildinfo" @@ -93,10 +94,12 @@ func Run() { } placementOpts := placement.PlacementServiceOpts{ - Port: opts.PlacementPort, - RaftNode: raftServer, - SecProvider: secProvider, - Healthz: healthz, + Port: opts.PlacementPort, + RaftNode: raftServer, + SecProvider: secProvider, + Healthz: healthz, + KeepAliveTime: time.Duration(opts.KeepAliveTime) * time.Second, + KeepAliveTimeout: time.Duration(opts.KeepAliveTimeout) * time.Second, } if opts.MinAPILevel >= 0 && opts.MinAPILevel < math.MaxInt32 { placementOpts.MinAPILevel = uint32(opts.MinAPILevel) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 4b671659c49..62e46b3a1da 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -36,6 +36,9 @@ const ( defaultPlacementPort = 50005 defaultReplicationFactor = 100 envMetadataEnabled = "DAPR_PLACEMENT_METADATA_ENABLED" + + defaultKeepAliveTime = 2 // in seconds + defaultKeepAliveTimeout = 3 // in seconds ) type Options struct { @@ -63,6 +66,9 @@ type Options struct { ReplicationFactor int + KeepAliveTime int + KeepAliveTimeout int + // Log and metrics configurations Logger logger.Options Metrics *metrics.FlagOptions @@ -90,7 +96,7 @@ func New(origArgs []string) *Options { } // Create a flag set - fs := pflag.NewFlagSet("sentry", pflag.ExitOnError) + fs := pflag.NewFlagSet("placement", pflag.ExitOnError) fs.SortFlags = true fs.StringVar(&opts.RaftID, "id", "dapr-placement-0", "Placement server ID") @@ -106,6 +112,8 @@ func New(origArgs []string) *Options { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") + fs.IntVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time for the placement-daprd stream") + fs.IntVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout for the placement-daprd stream") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index 84043d887e9..9c2f29b8def 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -39,6 +39,8 @@ func TestAppFlag(t *testing.T) { assert.EqualValues(t, false, opts.Logger.JSONFormatEnabled) assert.EqualValues(t, true, opts.Metrics.Enabled()) assert.EqualValues(t, "9090", opts.Metrics.Port()) + assert.EqualValues(t, 2, opts.KeepAliveTime) + assert.EqualValues(t, 3, opts.KeepAliveTimeout) } func TestInitialCluster(t *testing.T) { diff --git a/pkg/placement/placement.go b/pkg/placement/placement.go index 202a46e3c56..8a4ac3eb0e8 100644 --- a/pkg/placement/placement.go +++ b/pkg/placement/placement.go @@ -126,6 +126,16 @@ type Service struct { // disseminateNextTime is the time when the hashing tables for a namespace are disseminated. disseminateNextTime haxmap.Map[string, *atomic.Int64] + // keepaliveTime sets the interval at which the placement service sends keepalive pings to daprd + // on the gRPC stream to check if the connection is still alive + // https://grpc.io/docs/guides/keepalive/ + keepAliveTime time.Duration + + // keepaliveTimeout sets the timeout period for daprd to respond to the placement service's + // keepalive pings before the placement service closes the connection + // https://grpc.io/docs/guides/keepalive/ + keepAliveTimeout time.Duration + // memberUpdateCount represents how many dapr runtimes needs to change in a namespace. // Only actor runtime's heartbeat can increase this. memberUpdateCount haxmap.Map[string, *atomic.Uint32] @@ -159,13 +169,15 @@ type Service struct { // PlacementServiceOpts contains options for the NewPlacementService method. type PlacementServiceOpts struct { - RaftNode *raft.Server - MaxAPILevel *uint32 - MinAPILevel uint32 - SecProvider security.Provider - Port int - ListenAddress string - Healthz healthz.Healthz + RaftNode *raft.Server + MaxAPILevel *uint32 + MinAPILevel uint32 + SecProvider security.Provider + Port int + ListenAddress string + Healthz healthz.Healthz + KeepAliveTime time.Duration + KeepAliveTimeout time.Duration } // NewPlacementService returns a new placement service. @@ -182,6 +194,8 @@ func NewPlacementService(opts PlacementServiceOpts) *Service { disseminateLocks: concurrency.NewMutexMap[string](), memberUpdateCount: *haxmap.New[string, *atomic.Uint32](), disseminateNextTime: *haxmap.New[string, *atomic.Int64](), + keepAliveTime: opts.KeepAliveTime, + keepAliveTimeout: opts.KeepAliveTimeout, port: opts.Port, listenAddress: opts.ListenAddress, htarget: opts.Healthz.AddTarget(), @@ -212,9 +226,12 @@ func (p *Service) Start(ctx context.Context) error { } keepaliveParams := keepalive.ServerParameters{ - Time: 2 * time.Second, - Timeout: 3 * time.Second, + Time: p.keepAliveTime, + Timeout: p.keepAliveTimeout, } + + fmt.Println("\n\n\n\n\n=========== keepAliveTime: ", p.keepAliveTime, " keepAliveTimeout: ", p.keepAliveTimeout, " ===========\n\n\n\n\n") + grpcServer := grpc.NewServer(sec.GRPCServerOptionMTLS(), grpc.KeepaliveParams(keepaliveParams)) placementv1pb.RegisterPlacementServer(grpcServer, p) From 35aa52aa40483a12b2c590db9f0e995da16b22aa Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Sat, 17 Aug 2024 16:30:17 +0100 Subject: [PATCH 010/112] Updates helm table readme Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 2 ++ .../templates/dapr_placement_statefulset.yaml | 13 +++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index c525e97f30a..ba8712ddff7 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -163,6 +163,8 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` | | `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` | | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | +| `dapr_placement.keepAliveTime` | Sets the interval (in seconds) at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `2` | +| `dapr_placement.keepAliveTimeout` | Sets the timeout period (in seconds) for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `3` | ### Dapr RBAC options: | Parameter | Description | Default | diff --git a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml index 63fecd95ddd..fad6ff9facf 100644 --- a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml +++ b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml @@ -145,20 +145,13 @@ spec: {{- if eq .Values.metadataEnabled true }} - "--metadata-enabled" {{- end }} -{{- if .Values.keepAliveTime }} + - "--replicationFactor={{ .Values.replicationFactor }}" + - "--max-api-level={{ .Values.maxActorApiLevel }}" + - "--min-api-level={{ .Values.minActorApiLevel }}" - "--keepalive-time={{ .Values.keepAliveTime }}" -{{- end }} -{{- if .Values.keepAliveTimeout }} - "--keepalive-timeout={{ .Values.keepAliveTimeout }}" -{{- end }} {{- if eq .Values.global.prometheus.enabled true }} - "--enable-metrics" - - "--replicationFactor" - - "{{ .Values.replicationFactor }}" - - "--max-api-level" - - "{{ .Values.maxActorApiLevel }}" - - "--min-api-level" - - "{{ .Values.minActorApiLevel }}" - "--metrics-port" - "{{ .Values.global.prometheus.port }}" {{- else }} From 82db16528d5578e648188d9a9ecaca39dd47c306 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Sat, 17 Aug 2024 17:21:26 +0100 Subject: [PATCH 011/112] Makes disseminateTimeout configurable Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 1 + .../templates/dapr_placement_statefulset.yaml | 1 + charts/dapr/charts/dapr_placement/values.yaml | 1 + cmd/placement/app/app.go | 15 +++--- cmd/placement/options/options.go | 18 +++++-- cmd/placement/options/options_test.go | 1 + pkg/placement/membership.go | 2 +- pkg/placement/membership_test.go | 6 +-- pkg/placement/placement.go | 48 ++++++++++--------- pkg/placement/placement_test.go | 11 +++-- 10 files changed, 61 insertions(+), 43 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index ba8712ddff7..088236b0600 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -165,6 +165,7 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | | `dapr_placement.keepAliveTime` | Sets the interval (in seconds) at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `2` | | `dapr_placement.keepAliveTimeout` | Sets the timeout period (in seconds) for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `3` | +| `dapr_placement.disseminateTimeout` | Sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts | `2` | ### Dapr RBAC options: | Parameter | Description | Default | diff --git a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml index fad6ff9facf..5f3c55fd9c5 100644 --- a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml +++ b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml @@ -150,6 +150,7 @@ spec: - "--min-api-level={{ .Values.minActorApiLevel }}" - "--keepalive-time={{ .Values.keepAliveTime }}" - "--keepalive-timeout={{ .Values.keepAliveTimeout }}" + - "--disseminate-timeout={{ .Values.disseminateTimeout }}" {{- if eq .Values.global.prometheus.enabled true }} - "--enable-metrics" - "--metrics-port" diff --git a/charts/dapr/charts/dapr_placement/values.yaml b/charts/dapr/charts/dapr_placement/values.yaml index 32065af3db8..392ac2738d3 100644 --- a/charts/dapr/charts/dapr_placement/values.yaml +++ b/charts/dapr/charts/dapr_placement/values.yaml @@ -27,6 +27,7 @@ maxActorApiLevel: 10 minActorApiLevel: 0 keepAliveTime: 2 keepAliveTimeout: 3 +disseminateTimeout: 2 cluster: forceInMemoryLog: false diff --git a/cmd/placement/app/app.go b/cmd/placement/app/app.go index 5f59908ab3b..e0b139bcdac 100644 --- a/cmd/placement/app/app.go +++ b/cmd/placement/app/app.go @@ -93,13 +93,14 @@ func Run() { log.Fatal("Failed to create raft server.") } - placementOpts := placement.PlacementServiceOpts{ - Port: opts.PlacementPort, - RaftNode: raftServer, - SecProvider: secProvider, - Healthz: healthz, - KeepAliveTime: time.Duration(opts.KeepAliveTime) * time.Second, - KeepAliveTimeout: time.Duration(opts.KeepAliveTimeout) * time.Second, + placementOpts := placement.ServiceOpts{ + Port: opts.PlacementPort, + RaftNode: raftServer, + SecProvider: secProvider, + Healthz: healthz, + KeepAliveTime: time.Duration(opts.KeepAliveTime) * time.Second, + KeepAliveTimeout: time.Duration(opts.KeepAliveTimeout) * time.Second, + DisseminateTimeout: time.Duration(opts.DisseminateTimeout) * time.Second, } if opts.MinAPILevel >= 0 && opts.MinAPILevel < math.MaxInt32 { placementOpts.MinAPILevel = uint32(opts.MinAPILevel) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 62e46b3a1da..b40f040d954 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -37,8 +37,9 @@ const ( defaultReplicationFactor = 100 envMetadataEnabled = "DAPR_PLACEMENT_METADATA_ENABLED" - defaultKeepAliveTime = 2 // in seconds - defaultKeepAliveTimeout = 3 // in seconds + defaultKeepAliveTime = 2 // in seconds + defaultKeepAliveTimeout = 3 // in seconds + defaultDisseminateTimeout = 2 // in seconds ) type Options struct { @@ -69,6 +70,14 @@ type Options struct { KeepAliveTime int KeepAliveTimeout int + // DisseminateTimeout is the timeout to disseminate hashing tables after the membership change. + // When the multiple actor service pods are deployed first, a few pods are deployed in the beginning + // and the rest of pods will be deployed gradually. disseminateNextTime is maintained to decide when + // the hashing table is disseminated. disseminateNextTime is updated whenever membership change + // is applied to raft state or each pod is deployed. If we increase disseminateTimeout, it will + // reduce the frequency of dissemination, but it will delay the table dissemination. + DisseminateTimeout int + // Log and metrics configurations Logger logger.Options Metrics *metrics.FlagOptions @@ -112,8 +121,9 @@ func New(origArgs []string) *Options { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") - fs.IntVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time for the placement-daprd stream") - fs.IntVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout for the placement-daprd stream") + fs.IntVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time (in seconds) for the placement-daprd stream") + fs.IntVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout (in seconds) for the placement-daprd stream") + fs.IntVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index 9c2f29b8def..bec69710957 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -41,6 +41,7 @@ func TestAppFlag(t *testing.T) { assert.EqualValues(t, "9090", opts.Metrics.Port()) assert.EqualValues(t, 2, opts.KeepAliveTime) assert.EqualValues(t, 3, opts.KeepAliveTimeout) + assert.EqualValues(t, 2, opts.DisseminateTimeout) } func TestInitialCluster(t *testing.T) { diff --git a/pkg/placement/membership.go b/pkg/placement/membership.go index 2f4042554c2..e017f9f6fb4 100644 --- a/pkg/placement/membership.go +++ b/pkg/placement/membership.go @@ -166,7 +166,7 @@ func (p *Service) processMembershipCommands(ctx context.Context) { // it will keep moving the time to disseminate the table, which will // reduce the unnecessary table dissemination. val, _ := p.disseminateNextTime.GetOrSet(op.host.Namespace, &atomic.Int64{}) - val.Store(p.clock.Now().Add(disseminateTimeout).UnixNano()) + val.Store(p.clock.Now().Add(p.disseminateTimeout).UnixNano()) } } <-logApplyConcurrency diff --git a/pkg/placement/membership_test.go b/pkg/placement/membership_test.go index e302d5e8ebb..29cbab70435 100644 --- a/pkg/placement/membership_test.go +++ b/pkg/placement/membership_test.go @@ -226,17 +226,17 @@ func TestMembershipChangeWorker(t *testing.T) { // going to be disseminated in the next tick ts1, ok := testServer.disseminateNextTime.Get("ns1") if assert.True(c, ok) { - assert.Equal(c, clock.Now().Add(disseminateTimeout).UnixNano(), ts1.Load()) + assert.Equal(c, clock.Now().Add(testServer.disseminateTimeout).UnixNano(), ts1.Load()) } ts2, ok := testServer.disseminateNextTime.Get("ns2") if assert.True(c, ok) { - assert.Equal(c, clock.Now().Add(disseminateTimeout).UnixNano(), ts2.Load()) + assert.Equal(c, clock.Now().Add(testServer.disseminateTimeout).UnixNano(), ts2.Load()) } }, 10*time.Second, 100*time.Millisecond) // Move the clock forward so dissemination is triggered - clock.Step(disseminateTimeout) + clock.Step(testServer.disseminateTimeout) // Wait for all three hosts to receive the updates updateMsgCnt := 0 diff --git a/pkg/placement/placement.go b/pkg/placement/placement.go index 8a4ac3eb0e8..a47d784707d 100644 --- a/pkg/placement/placement.go +++ b/pkg/placement/placement.go @@ -49,13 +49,6 @@ const ( // disseminateTimerInterval is the interval to disseminate the latest consistent hashing table. disseminateTimerInterval = 500 * time.Millisecond - // disseminateTimeout is the timeout to disseminate hashing tables after the membership change. - // When the multiple actor service pods are deployed first, a few pods are deployed in the beginning - // and the rest of pods will be deployed gradually. disseminateNextTime is maintained to decide when - // the hashing table is disseminated. disseminateNextTime is updated whenever membership change - // is applied to raft state or each pod is deployed. If we increase disseminateTimeout, it will - // reduce the frequency of dissemination, but it will delay the table dissemination. - disseminateTimeout = 2 * time.Second // faultyHostDetectDuration is the maximum duration after which a host is considered faulty. // Dapr runtime sends a heartbeat (stored in lastHeartBeat) every second. @@ -127,15 +120,24 @@ type Service struct { disseminateNextTime haxmap.Map[string, *atomic.Int64] // keepaliveTime sets the interval at which the placement service sends keepalive pings to daprd - // on the gRPC stream to check if the connection is still alive + // on the gRPC stream to check if the connection is still alive. Default is 2 seconds. // https://grpc.io/docs/guides/keepalive/ keepAliveTime time.Duration // keepaliveTimeout sets the timeout period for daprd to respond to the placement service's - // keepalive pings before the placement service closes the connection + // keepalive pings before the placement service closes the connection. Default is 3 seconds. // https://grpc.io/docs/guides/keepalive/ keepAliveTimeout time.Duration + // disseminateTimeout is the timeout to disseminate hashing tables after the membership change. + // When the multiple actor service pods are deployed first, a few pods are deployed in the beginning + // and the rest of pods will be deployed gradually. disseminateNextTime is maintained to decide when + // the hashing table is disseminated. disseminateNextTime is updated whenever membership change + // is applied to raft state or each pod is deployed. If we increase disseminateTimeout, it will + // reduce the frequency of dissemination, but it will delay the table dissemination. + // Default is 2 seconds + disseminateTimeout time.Duration + // memberUpdateCount represents how many dapr runtimes needs to change in a namespace. // Only actor runtime's heartbeat can increase this. memberUpdateCount haxmap.Map[string, *atomic.Uint32] @@ -167,21 +169,22 @@ type Service struct { wg sync.WaitGroup } -// PlacementServiceOpts contains options for the NewPlacementService method. -type PlacementServiceOpts struct { - RaftNode *raft.Server - MaxAPILevel *uint32 - MinAPILevel uint32 - SecProvider security.Provider - Port int - ListenAddress string - Healthz healthz.Healthz - KeepAliveTime time.Duration - KeepAliveTimeout time.Duration +// ServiceOpts contains options for the NewPlacementService method. +type ServiceOpts struct { + RaftNode *raft.Server + MaxAPILevel *uint32 + MinAPILevel uint32 + SecProvider security.Provider + Port int + ListenAddress string + Healthz healthz.Healthz + KeepAliveTime time.Duration + KeepAliveTimeout time.Duration + DisseminateTimeout time.Duration } // NewPlacementService returns a new placement service. -func NewPlacementService(opts PlacementServiceOpts) *Service { +func NewPlacementService(opts ServiceOpts) *Service { return &Service{ streamConnPool: newStreamConnPool(), membershipCh: make(chan hostMemberChange, membershipChangeChSize), @@ -196,6 +199,7 @@ func NewPlacementService(opts PlacementServiceOpts) *Service { disseminateNextTime: *haxmap.New[string, *atomic.Int64](), keepAliveTime: opts.KeepAliveTime, keepAliveTimeout: opts.KeepAliveTimeout, + disseminateTimeout: opts.DisseminateTimeout, port: opts.Port, listenAddress: opts.ListenAddress, htarget: opts.Healthz.AddTarget(), @@ -230,8 +234,6 @@ func (p *Service) Start(ctx context.Context) error { Timeout: p.keepAliveTimeout, } - fmt.Println("\n\n\n\n\n=========== keepAliveTime: ", p.keepAliveTime, " keepAliveTimeout: ", p.keepAliveTimeout, " ===========\n\n\n\n\n") - grpcServer := grpc.NewServer(sec.GRPCServerOptionMTLS(), grpc.KeepaliveParams(keepaliveParams)) placementv1pb.RegisterPlacementServer(grpcServer, p) diff --git a/pkg/placement/placement_test.go b/pkg/placement/placement_test.go index b17cfb4fa04..5b67aac61cb 100644 --- a/pkg/placement/placement_test.go +++ b/pkg/placement/placement_test.go @@ -45,11 +45,12 @@ func newTestPlacementServer(t *testing.T, raftServer *raft.Server) (string, *Ser port, err := freeport.GetFreePort() require.NoError(t, err) - testServer := NewPlacementService(PlacementServiceOpts{ - RaftNode: raftServer, - SecProvider: securityfake.New(), - Port: port, - Healthz: healthz.New(), + testServer := NewPlacementService(ServiceOpts{ + RaftNode: raftServer, + SecProvider: securityfake.New(), + Port: port, + Healthz: healthz.New(), + DisseminateTimeout: 2 * time.Second, }) clock := clocktesting.NewFakeClock(time.Now()) testServer.clock = clock From 3746db4940fd32fc37e94c355d7c34cda6877a99 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 27 Aug 2024 14:03:32 +0200 Subject: [PATCH 012/112] Moves keepalive and disseminate values as env variables Signed-off-by: Elena Kolevska --- .../templates/dapr_placement_statefulset.yaml | 3 - charts/dapr/charts/dapr_placement/values.yaml | 3 - cmd/placement/app/app.go | 8 +- cmd/placement/options/options.go | 49 ++++++- cmd/placement/options/options_test.go | 129 +++++++++++++++++- 5 files changed, 175 insertions(+), 17 deletions(-) diff --git a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml index 5f3c55fd9c5..37c9907660f 100644 --- a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml +++ b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml @@ -148,9 +148,6 @@ spec: - "--replicationFactor={{ .Values.replicationFactor }}" - "--max-api-level={{ .Values.maxActorApiLevel }}" - "--min-api-level={{ .Values.minActorApiLevel }}" - - "--keepalive-time={{ .Values.keepAliveTime }}" - - "--keepalive-timeout={{ .Values.keepAliveTimeout }}" - - "--disseminate-timeout={{ .Values.disseminateTimeout }}" {{- if eq .Values.global.prometheus.enabled true }} - "--enable-metrics" - "--metrics-port" diff --git a/charts/dapr/charts/dapr_placement/values.yaml b/charts/dapr/charts/dapr_placement/values.yaml index 392ac2738d3..27832b39f8e 100644 --- a/charts/dapr/charts/dapr_placement/values.yaml +++ b/charts/dapr/charts/dapr_placement/values.yaml @@ -25,9 +25,6 @@ ha: false maxActorApiLevel: 10 minActorApiLevel: 0 -keepAliveTime: 2 -keepAliveTimeout: 3 -disseminateTimeout: 2 cluster: forceInMemoryLog: false diff --git a/cmd/placement/app/app.go b/cmd/placement/app/app.go index e0b139bcdac..86714ee49b3 100644 --- a/cmd/placement/app/app.go +++ b/cmd/placement/app/app.go @@ -38,7 +38,10 @@ import ( var log = logger.NewLogger("dapr.placement") func Run() { - opts := options.New(os.Args[1:]) + opts, err := options.New(os.Args[1:]) + if err != nil { + log.Fatal(err) + } // Apply options to all loggers. if err := logger.ApplyOptionsToLoggers(&opts.Logger); err != nil { @@ -57,8 +60,7 @@ func Run() { Healthz: healthz, }) - err := monitoring.InitMetrics() - if err != nil { + if err := monitoring.InitMetrics(); err != nil { log.Fatal(err) } diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index b40f040d954..add7b5b42e0 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -16,6 +16,7 @@ package options import ( "fmt" "os" + "strconv" "strings" "github.com/spf13/pflag" @@ -37,6 +38,10 @@ const ( defaultReplicationFactor = 100 envMetadataEnabled = "DAPR_PLACEMENT_METADATA_ENABLED" + envKeepAliveTime = "DAPR_PLACEMENT_KEEPALIVE_TIME" + envKeepAliveTimeout = "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT" + envDisseminateTimeout = "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT" + defaultKeepAliveTime = 2 // in seconds defaultKeepAliveTimeout = 3 // in seconds defaultDisseminateTimeout = 2 // in seconds @@ -83,7 +88,7 @@ type Options struct { Metrics *metrics.FlagOptions } -func New(origArgs []string) *Options { +func New(origArgs []string) (*Options, error) { // We are using pflag to parse the CLI flags // pflag is a drop-in replacement for the standard library's "flag" package, however… // There's one key difference: with the stdlib's "flag" package, there are no short-hand options so options can be defined with a single slash (such as "daprd -mode"). @@ -100,8 +105,24 @@ func New(origArgs []string) *Options { } // Default options + keepAliveTime, err := getEnvIntWithRange(envKeepAliveTime, defaultKeepAliveTime, 1, 10) + if err != nil { + return nil, err + } + keepAliveTimeout, err := getEnvIntWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, 1, 10) + if err != nil { + return nil, err + } + disseminateTimeout, err := getEnvIntWithRange(envDisseminateTimeout, defaultDisseminateTimeout, 1, 5) + if err != nil { + return nil, err + } + opts := Options{ - MetadataEnabled: utils.IsTruthy(os.Getenv(envMetadataEnabled)), + MetadataEnabled: utils.IsTruthy(os.Getenv(envMetadataEnabled)), + KeepAliveTime: keepAliveTime, + KeepAliveTimeout: keepAliveTimeout, + DisseminateTimeout: disseminateTimeout, } // Create a flag set @@ -121,9 +142,6 @@ func New(origArgs []string) *Options { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") - fs.IntVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time (in seconds) for the placement-daprd stream") - fs.IntVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout (in seconds) for the placement-daprd stream") - fs.IntVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") @@ -144,7 +162,7 @@ func New(origArgs []string) *Options { opts.RaftInMemEnabled = false } - return &opts + return &opts, nil } func parsePeersFromFlag(val []string) []raft.PeerInfo { @@ -166,3 +184,22 @@ func parsePeersFromFlag(val []string) []raft.PeerInfo { return peers[:i] } + +// getEnvIntWithRange returns the integer value of the environment variable with the given name. +func getEnvIntWithRange(envVar string, defaultValue int, min int, max int) (int, error) { + v := os.Getenv(envVar) + if v == "" { + return defaultValue, nil + } + + val, err := strconv.Atoi(v) + if err != nil { + return 0, fmt.Errorf("invalid integer value for the %s env variable: %w", envVar, err) + } + + if val < min || val > max { + return 0, fmt.Errorf("invalid value for the %s env variable: value should be between %d and %d for best performance", envVar, min, max) + } + + return val, nil +} diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index bec69710957..f56c68eeb58 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -22,7 +22,8 @@ import ( ) func TestAppFlag(t *testing.T) { - opts := New([]string{}) + opts, err := New([]string{}) + assert.NoError(t, err) assert.EqualValues(t, "dapr-placement-0", opts.RaftID) assert.EqualValues(t, []raft.PeerInfo{{ID: "dapr-placement-0", Address: "127.0.0.1:8201"}}, opts.RaftPeers) assert.EqualValues(t, true, opts.RaftInMemEnabled) @@ -83,8 +84,132 @@ func TestInitialCluster(t *testing.T) { for _, tt := range peerAddressTests { t.Run(tt.name, func(t *testing.T) { - opts := New(tt.in) + opts, err := New(tt.in) + assert.NoError(t, err) assert.EqualValues(t, tt.out, opts.RaftPeers) }) } } + +func TestBadPlacementKeepAliveTimeEnvVars(t *testing.T) { + envVarTests := []struct { + name string + envVar string + envVarVal string + error string + }{ + { + "should error if keep alive time is not integer", + "DAPR_PLACEMENT_KEEPALIVE_TIME", + "0.5", + "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIME env variable", + }, + { + "should error if keep alive time is not integer", + "DAPR_PLACEMENT_KEEPALIVE_TIME", + "abc", + "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIME env variable", + }, + { + "should error if keep alive time is lower than 1", + "DAPR_PLACEMENT_KEEPALIVE_TIME", + "0", + "value should be between 1 and 10 for best performance", + }, + { + "should error if keep alive time is higher than 10", + "DAPR_PLACEMENT_KEEPALIVE_TIME", + "11", + "value should be between 1 and 10 for best performance", + }, + { + "should error if keep alive timeout is not integer", + "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", + "0.5", + "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIMEOUT env variable", + }, + { + "should error if keep alive timeout is not integer", + "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", + "abc", + "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIMEOUT env variable", + }, + { + "should error if keep alive time is lower than 1", + "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", + "0", + "value should be between 1 and 10 for best performance", + }, + { + "should error if keep alive time is higher than 10", + "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", + "11", + "value should be between 1 and 10 for best performance", + }, + { + "should error if keep alive timeout is not integer", + "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", + "0.5", + "invalid integer value for the DAPR_PLACEMENT_DISSEMINATE_TIMEOUT env variable", + }, + { + "should error if keep alive timeout is not integer", + "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", + "abc", + "invalid integer value for the DAPR_PLACEMENT_DISSEMINATE_TIMEOUT env variable", + }, + { + "should error if keep alive time is lower than 1", + "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", + "0", + "value should be between 1 and 5 for best performance", + }, + { + "should error if keep alive time is higher than 5", + "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", + "6", + "value should be between 1 and 5 for best performance", + }, + } + + for _, tt := range envVarTests { + t.Run(tt.name, func(t *testing.T) { + t.Setenv(tt.envVar, tt.envVarVal) + + opts, err := New([]string{}) + assert.Error(t, err) + assert.Nil(t, opts) + assert.ErrorContains(t, err, tt.error) + }) + } + +} + +// TestValidPlacementEnvVars tests that valid placement environment variables are accepted +// default values are not covered in this test as they are covered in the TestAppFlag test +func TestValidPlacementEnvVars(t *testing.T) { + t.Run("valid keep alive time values should be accepted", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIME", "1") + + opts, err := New([]string{}) + assert.NoError(t, err) + assert.NotNil(t, opts) + assert.EqualValues(t, 1, opts.KeepAliveTime) + }) + t.Run("valid keep alive timeout values should be accepted", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", "3") + + opts, err := New([]string{}) + assert.NoError(t, err) + assert.NotNil(t, opts) + assert.EqualValues(t, 3, opts.KeepAliveTimeout) + }) + t.Run("valid disseminate timeout values should be accepted", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", "3") + + opts, err := New([]string{}) + assert.NoError(t, err) + assert.NotNil(t, opts) + assert.EqualValues(t, 3, opts.DisseminateTimeout) + }) +} From e657f0c0c092a4f3ca7a6920c628a1cbf5873e20 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 27 Aug 2024 14:24:53 +0200 Subject: [PATCH 013/112] Removes helm values Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index 088236b0600..c525e97f30a 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -163,9 +163,6 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` | | `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` | | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | -| `dapr_placement.keepAliveTime` | Sets the interval (in seconds) at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `2` | -| `dapr_placement.keepAliveTimeout` | Sets the timeout period (in seconds) for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. [Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive. | `3` | -| `dapr_placement.disseminateTimeout` | Sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts | `2` | ### Dapr RBAC options: | Parameter | Description | Default | From b0ca2c075477a77f4a661ea84a2af690293a8332 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 27 Aug 2024 14:29:26 +0200 Subject: [PATCH 014/112] Remove duplicate comment Signed-off-by: Elena Kolevska --- cmd/placement/options/options.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index add7b5b42e0..d79957f35e6 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -72,15 +72,8 @@ type Options struct { ReplicationFactor int - KeepAliveTime int - KeepAliveTimeout int - - // DisseminateTimeout is the timeout to disseminate hashing tables after the membership change. - // When the multiple actor service pods are deployed first, a few pods are deployed in the beginning - // and the rest of pods will be deployed gradually. disseminateNextTime is maintained to decide when - // the hashing table is disseminated. disseminateNextTime is updated whenever membership change - // is applied to raft state or each pod is deployed. If we increase disseminateTimeout, it will - // reduce the frequency of dissemination, but it will delay the table dissemination. + KeepAliveTime int + KeepAliveTimeout int DisseminateTimeout int // Log and metrics configurations From 9acef6b19bb23d67a9cdf895a1b28316ec88288a Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 27 Aug 2024 16:35:50 +0200 Subject: [PATCH 015/112] Fixes linter Signed-off-by: Elena Kolevska --- cmd/placement/app/app.go | 8 +++---- cmd/placement/options/options_test.go | 30 +++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cmd/placement/app/app.go b/cmd/placement/app/app.go index 86714ee49b3..202e1b580f5 100644 --- a/cmd/placement/app/app.go +++ b/cmd/placement/app/app.go @@ -44,8 +44,8 @@ func Run() { } // Apply options to all loggers. - if err := logger.ApplyOptionsToLoggers(&opts.Logger); err != nil { - log.Fatal(err) + if e := logger.ApplyOptionsToLoggers(&opts.Logger); e != nil { + log.Fatal(e) } log.Infof("Starting Dapr Placement Service -- version %s -- commit %s", buildinfo.Version(), buildinfo.Commit()) @@ -60,8 +60,8 @@ func Run() { Healthz: healthz, }) - if err := monitoring.InitMetrics(); err != nil { - log.Fatal(err) + if e := monitoring.InitMetrics(); e != nil { + log.Fatal(e) } ctx := signals.Context() diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index f56c68eeb58..6a599e34ec7 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -17,13 +17,14 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/dapr/dapr/pkg/placement/raft" ) func TestAppFlag(t *testing.T) { opts, err := New([]string{}) - assert.NoError(t, err) + require.NoError(t, err) assert.EqualValues(t, "dapr-placement-0", opts.RaftID) assert.EqualValues(t, []raft.PeerInfo{{ID: "dapr-placement-0", Address: "127.0.0.1:8201"}}, opts.RaftPeers) assert.EqualValues(t, true, opts.RaftInMemEnabled) @@ -85,7 +86,7 @@ func TestInitialCluster(t *testing.T) { for _, tt := range peerAddressTests { t.Run(tt.name, func(t *testing.T) { opts, err := New(tt.in) - assert.NoError(t, err) + require.NoError(t, err) assert.EqualValues(t, tt.out, opts.RaftPeers) }) } @@ -177,12 +178,11 @@ func TestBadPlacementKeepAliveTimeEnvVars(t *testing.T) { t.Setenv(tt.envVar, tt.envVarVal) opts, err := New([]string{}) - assert.Error(t, err) - assert.Nil(t, opts) - assert.ErrorContains(t, err, tt.error) + require.Error(t, err) + require.Nil(t, opts) + require.ErrorContains(t, err, tt.error) }) } - } // TestValidPlacementEnvVars tests that valid placement environment variables are accepted @@ -192,24 +192,24 @@ func TestValidPlacementEnvVars(t *testing.T) { t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIME", "1") opts, err := New([]string{}) - assert.NoError(t, err) - assert.NotNil(t, opts) - assert.EqualValues(t, 1, opts.KeepAliveTime) + require.NoError(t, err) + require.NotNil(t, opts) + require.EqualValues(t, 1, opts.KeepAliveTime) }) t.Run("valid keep alive timeout values should be accepted", func(t *testing.T) { t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", "3") opts, err := New([]string{}) - assert.NoError(t, err) - assert.NotNil(t, opts) - assert.EqualValues(t, 3, opts.KeepAliveTimeout) + require.NoError(t, err) + require.NotNil(t, opts) + require.EqualValues(t, 3, opts.KeepAliveTimeout) }) t.Run("valid disseminate timeout values should be accepted", func(t *testing.T) { t.Setenv("DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", "3") opts, err := New([]string{}) - assert.NoError(t, err) - assert.NotNil(t, opts) - assert.EqualValues(t, 3, opts.DisseminateTimeout) + require.NoError(t, err) + require.NotNil(t, opts) + require.EqualValues(t, 3, opts.DisseminateTimeout) }) } From e7424df3199e0915b95cb3239de37941fb3b9ebd Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Wed, 28 Aug 2024 18:50:02 +0200 Subject: [PATCH 016/112] Moves the utility func to dapr/kit Signed-off-by: Elena Kolevska --- cmd/placement/options/options.go | 26 +----- cmd/placement/options/options_test.go | 122 -------------------------- go.mod | 3 +- go.sum | 4 +- 4 files changed, 7 insertions(+), 148 deletions(-) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index d79957f35e6..86367d9d613 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -16,7 +16,6 @@ package options import ( "fmt" "os" - "strconv" "strings" "github.com/spf13/pflag" @@ -98,15 +97,15 @@ func New(origArgs []string) (*Options, error) { } // Default options - keepAliveTime, err := getEnvIntWithRange(envKeepAliveTime, defaultKeepAliveTime, 1, 10) + keepAliveTime, err := utils.GetEnvIntWithRange(envKeepAliveTime, defaultKeepAliveTime, 1, 10) if err != nil { return nil, err } - keepAliveTimeout, err := getEnvIntWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, 1, 10) + keepAliveTimeout, err := utils.GetEnvIntWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, 1, 10) if err != nil { return nil, err } - disseminateTimeout, err := getEnvIntWithRange(envDisseminateTimeout, defaultDisseminateTimeout, 1, 5) + disseminateTimeout, err := utils.GetEnvIntWithRange(envDisseminateTimeout, defaultDisseminateTimeout, 1, 5) if err != nil { return nil, err } @@ -177,22 +176,3 @@ func parsePeersFromFlag(val []string) []raft.PeerInfo { return peers[:i] } - -// getEnvIntWithRange returns the integer value of the environment variable with the given name. -func getEnvIntWithRange(envVar string, defaultValue int, min int, max int) (int, error) { - v := os.Getenv(envVar) - if v == "" { - return defaultValue, nil - } - - val, err := strconv.Atoi(v) - if err != nil { - return 0, fmt.Errorf("invalid integer value for the %s env variable: %w", envVar, err) - } - - if val < min || val > max { - return 0, fmt.Errorf("invalid value for the %s env variable: value should be between %d and %d for best performance", envVar, min, max) - } - - return val, nil -} diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index 6a599e34ec7..38bee3acf3f 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -91,125 +91,3 @@ func TestInitialCluster(t *testing.T) { }) } } - -func TestBadPlacementKeepAliveTimeEnvVars(t *testing.T) { - envVarTests := []struct { - name string - envVar string - envVarVal string - error string - }{ - { - "should error if keep alive time is not integer", - "DAPR_PLACEMENT_KEEPALIVE_TIME", - "0.5", - "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIME env variable", - }, - { - "should error if keep alive time is not integer", - "DAPR_PLACEMENT_KEEPALIVE_TIME", - "abc", - "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIME env variable", - }, - { - "should error if keep alive time is lower than 1", - "DAPR_PLACEMENT_KEEPALIVE_TIME", - "0", - "value should be between 1 and 10 for best performance", - }, - { - "should error if keep alive time is higher than 10", - "DAPR_PLACEMENT_KEEPALIVE_TIME", - "11", - "value should be between 1 and 10 for best performance", - }, - { - "should error if keep alive timeout is not integer", - "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", - "0.5", - "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIMEOUT env variable", - }, - { - "should error if keep alive timeout is not integer", - "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", - "abc", - "invalid integer value for the DAPR_PLACEMENT_KEEPALIVE_TIMEOUT env variable", - }, - { - "should error if keep alive time is lower than 1", - "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", - "0", - "value should be between 1 and 10 for best performance", - }, - { - "should error if keep alive time is higher than 10", - "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", - "11", - "value should be between 1 and 10 for best performance", - }, - { - "should error if keep alive timeout is not integer", - "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", - "0.5", - "invalid integer value for the DAPR_PLACEMENT_DISSEMINATE_TIMEOUT env variable", - }, - { - "should error if keep alive timeout is not integer", - "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", - "abc", - "invalid integer value for the DAPR_PLACEMENT_DISSEMINATE_TIMEOUT env variable", - }, - { - "should error if keep alive time is lower than 1", - "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", - "0", - "value should be between 1 and 5 for best performance", - }, - { - "should error if keep alive time is higher than 5", - "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", - "6", - "value should be between 1 and 5 for best performance", - }, - } - - for _, tt := range envVarTests { - t.Run(tt.name, func(t *testing.T) { - t.Setenv(tt.envVar, tt.envVarVal) - - opts, err := New([]string{}) - require.Error(t, err) - require.Nil(t, opts) - require.ErrorContains(t, err, tt.error) - }) - } -} - -// TestValidPlacementEnvVars tests that valid placement environment variables are accepted -// default values are not covered in this test as they are covered in the TestAppFlag test -func TestValidPlacementEnvVars(t *testing.T) { - t.Run("valid keep alive time values should be accepted", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIME", "1") - - opts, err := New([]string{}) - require.NoError(t, err) - require.NotNil(t, opts) - require.EqualValues(t, 1, opts.KeepAliveTime) - }) - t.Run("valid keep alive timeout values should be accepted", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", "3") - - opts, err := New([]string{}) - require.NoError(t, err) - require.NotNil(t, opts) - require.EqualValues(t, 3, opts.KeepAliveTimeout) - }) - t.Run("valid disseminate timeout values should be accepted", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", "3") - - opts, err := New([]string{}) - require.NoError(t, err) - require.NotNil(t, opts) - require.EqualValues(t, 3, opts.DisseminateTimeout) - }) -} diff --git a/go.mod b/go.mod index 5cb4748503c..24e5abfaa83 100644 --- a/go.mod +++ b/go.mod @@ -489,7 +489,8 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 // Don't commit with this uncommented! // // replace github.com/dapr/components-contrib => ../components-contrib -// replace github.com/dapr/kit => ../kit +replace github.com/dapr/kit => github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e + // // Then, run `make modtidy-all` in this repository. // This ensures that go.mod and go.sum are up-to-date for each go.mod file. diff --git a/go.sum b/go.sum index 3e225fe4c09..c1f5ad10d78 100644 --- a/go.sum +++ b/go.sum @@ -447,8 +447,6 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dapr/components-contrib v1.14.0-rc.6 h1:L+1OC5AOALmF8Wd+FbCdgbR1xO9aain/LfyMC3kkOwk= github.com/dapr/components-contrib v1.14.0-rc.6/go.mod h1:h2OsxAGYLVR/chY2hThFbulEupHWPvVI3BpMQBXcJtg= -github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5 h1:FQKdGOG6Zi3gBhtnxPQmrd8QFLs8e6JTGkts+aaXba0= -github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -508,6 +506,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik= github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e h1:/Yol7y8oVLWeqWuSyyADaeJlPlKYAYFl6q+OU9sGzM8= +github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= From 57d7ef07a257cf1d256b317e884b067721a1b700 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Fri, 30 Aug 2024 14:41:48 +0200 Subject: [PATCH 017/112] Moves to time.Duration instead of int for durations Signed-off-by: Elena Kolevska --- cmd/placement/app/app.go | 7 +++-- cmd/placement/options/options.go | 19 +++++++------- cmd/placement/options/options_test.go | 38 ++++++++++++++++++++++++--- go.mod | 2 +- go.sum | 2 ++ 5 files changed, 51 insertions(+), 17 deletions(-) diff --git a/cmd/placement/app/app.go b/cmd/placement/app/app.go index 202e1b580f5..3e71e908170 100644 --- a/cmd/placement/app/app.go +++ b/cmd/placement/app/app.go @@ -17,7 +17,6 @@ import ( "encoding/json" "math" "os" - "time" "github.com/dapr/dapr/cmd/placement/options" "github.com/dapr/dapr/pkg/buildinfo" @@ -100,9 +99,9 @@ func Run() { RaftNode: raftServer, SecProvider: secProvider, Healthz: healthz, - KeepAliveTime: time.Duration(opts.KeepAliveTime) * time.Second, - KeepAliveTimeout: time.Duration(opts.KeepAliveTimeout) * time.Second, - DisseminateTimeout: time.Duration(opts.DisseminateTimeout) * time.Second, + KeepAliveTime: opts.KeepAliveTime, + KeepAliveTimeout: opts.KeepAliveTimeout, + DisseminateTimeout: opts.DisseminateTimeout, } if opts.MinAPILevel >= 0 && opts.MinAPILevel < math.MaxInt32 { placementOpts.MinAPILevel = uint32(opts.MinAPILevel) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 86367d9d613..6d2440c2568 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -17,6 +17,7 @@ import ( "fmt" "os" "strings" + "time" "github.com/spf13/pflag" @@ -41,9 +42,9 @@ const ( envKeepAliveTimeout = "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT" envDisseminateTimeout = "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT" - defaultKeepAliveTime = 2 // in seconds - defaultKeepAliveTimeout = 3 // in seconds - defaultDisseminateTimeout = 2 // in seconds + defaultKeepAliveTime = 2 * time.Second + defaultKeepAliveTimeout = 3 * time.Second + defaultDisseminateTimeout = 2 * time.Second ) type Options struct { @@ -71,9 +72,9 @@ type Options struct { ReplicationFactor int - KeepAliveTime int - KeepAliveTimeout int - DisseminateTimeout int + KeepAliveTime time.Duration + KeepAliveTimeout time.Duration + DisseminateTimeout time.Duration // Log and metrics configurations Logger logger.Options @@ -97,15 +98,15 @@ func New(origArgs []string) (*Options, error) { } // Default options - keepAliveTime, err := utils.GetEnvIntWithRange(envKeepAliveTime, defaultKeepAliveTime, 1, 10) + keepAliveTime, err := utils.GetEnvDurationWithRange(envKeepAliveTime, defaultKeepAliveTime, time.Second, 10*time.Second) if err != nil { return nil, err } - keepAliveTimeout, err := utils.GetEnvIntWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, 1, 10) + keepAliveTimeout, err := utils.GetEnvDurationWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, time.Second, 10*time.Second) if err != nil { return nil, err } - disseminateTimeout, err := utils.GetEnvIntWithRange(envDisseminateTimeout, defaultDisseminateTimeout, 1, 5) + disseminateTimeout, err := utils.GetEnvDurationWithRange(envDisseminateTimeout, defaultDisseminateTimeout, time.Second, 5*time.Second) if err != nil { return nil, err } diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index 38bee3acf3f..d2f4dbc4015 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -15,6 +15,7 @@ package options import ( "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -41,9 +42,9 @@ func TestAppFlag(t *testing.T) { assert.EqualValues(t, false, opts.Logger.JSONFormatEnabled) assert.EqualValues(t, true, opts.Metrics.Enabled()) assert.EqualValues(t, "9090", opts.Metrics.Port()) - assert.EqualValues(t, 2, opts.KeepAliveTime) - assert.EqualValues(t, 3, opts.KeepAliveTimeout) - assert.EqualValues(t, 2, opts.DisseminateTimeout) + assert.EqualValues(t, 2*time.Second, opts.KeepAliveTime) + assert.EqualValues(t, 3*time.Second, opts.KeepAliveTimeout) + assert.EqualValues(t, 2*time.Second, opts.DisseminateTimeout) } func TestInitialCluster(t *testing.T) { @@ -91,3 +92,34 @@ func TestInitialCluster(t *testing.T) { }) } } + +func TestOptsFromEnvVariables(t *testing.T) { + t.Run("metadata enabled", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_METADATA_ENABLED", "true") + + opts, err := New([]string{}) + require.NoError(t, err) + assert.True(t, opts.MetadataEnabled) + }) + t.Run("keepalive time", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIME", "4s") + + opts, err := New([]string{}) + require.NoError(t, err) + assert.Equal(t, 4*time.Second, opts.KeepAliveTime) + }) + t.Run("keepalive timeout", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", "5s") + + opts, err := New([]string{}) + require.NoError(t, err) + assert.Equal(t, 5*time.Second, opts.KeepAliveTimeout) + }) + t.Run("disseminate timeout", func(t *testing.T) { + t.Setenv("DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", "4s") + + opts, err := New([]string{}) + require.NoError(t, err) + assert.Equal(t, 4*time.Second, opts.DisseminateTimeout) + }) +} diff --git a/go.mod b/go.mod index 24e5abfaa83..1395c38803c 100644 --- a/go.mod +++ b/go.mod @@ -489,7 +489,7 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 // Don't commit with this uncommented! // // replace github.com/dapr/components-contrib => ../components-contrib -replace github.com/dapr/kit => github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e +replace github.com/dapr/kit => github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49 // // Then, run `make modtidy-all` in this repository. diff --git a/go.sum b/go.sum index c1f5ad10d78..85f1200667f 100644 --- a/go.sum +++ b/go.sum @@ -447,6 +447,7 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dapr/components-contrib v1.14.0-rc.6 h1:L+1OC5AOALmF8Wd+FbCdgbR1xO9aain/LfyMC3kkOwk= github.com/dapr/components-contrib v1.14.0-rc.6/go.mod h1:h2OsxAGYLVR/chY2hThFbulEupHWPvVI3BpMQBXcJtg= +github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -508,6 +509,7 @@ github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e h1:/Yol7y8oVLWeqWuSyyADaeJlPlKYAYFl6q+OU9sGzM8= github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= +github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= From cc2e8f73101ad1074d23597267b489c279025e65 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Fri, 30 Aug 2024 14:46:01 +0200 Subject: [PATCH 018/112] Updated go sum Signed-off-by: Elena Kolevska --- go.sum | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.sum b/go.sum index 85f1200667f..1853139763b 100644 --- a/go.sum +++ b/go.sum @@ -447,7 +447,6 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dapr/components-contrib v1.14.0-rc.6 h1:L+1OC5AOALmF8Wd+FbCdgbR1xO9aain/LfyMC3kkOwk= github.com/dapr/components-contrib v1.14.0-rc.6/go.mod h1:h2OsxAGYLVR/chY2hThFbulEupHWPvVI3BpMQBXcJtg= -github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -507,8 +506,7 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik= github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e h1:/Yol7y8oVLWeqWuSyyADaeJlPlKYAYFl6q+OU9sGzM8= -github.com/elena-kolevska/kit v0.0.0-20240828164126-51730063a14e/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= +github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49 h1:T6guijImu2BFQCa0oDMPvLFcazH89sJZrpbVh8Ym4ns= github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= From 49a4f536a4c42a03e7f515c483af62ff0c53b5bb Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 10 Sep 2024 00:22:34 +0100 Subject: [PATCH 019/112] Goes back to using cli arguments instead of env variables Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 4 ++ .../templates/dapr_placement_statefulset.yaml | 3 + charts/dapr/charts/dapr_placement/values.yaml | 3 + cmd/placement/options/options.go | 53 ++++++++------- cmd/placement/options/options_test.go | 66 +++++++++++++------ 5 files changed, 87 insertions(+), 42 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index 1a594a962f2..b75ffa68f00 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -163,6 +163,10 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` | | `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` | | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | +| `dapr_placement.keepAliveTime` | Sets the interval at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `2s` | +| `dapr_placement.keepAliveTimeout` | Sets the timeout period for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `3s` | +| `dapr_placement.disseminateTimeout` | Sets the timeout period for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts. Higher values will reduce the frequency of dissemination, but delay the table dissemination. Accepts values between `1s` and `5s` | `2s` | + ### Dapr RBAC options: | Parameter | Description | Default | diff --git a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml index 5a37f38726b..8e08f99d88f 100644 --- a/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml +++ b/charts/dapr/charts/dapr_placement/templates/dapr_placement_statefulset.yaml @@ -148,6 +148,9 @@ spec: - "--replicationFactor={{ .Values.replicationFactor }}" - "--max-api-level={{ .Values.maxActorApiLevel }}" - "--min-api-level={{ .Values.minActorApiLevel }}" + - "--keepalive-time={{ .Values.keepAliveTime }}" + - "--keepalive-timeout={{ .Values.keepAliveTimeout }}" + - "--disseminate-timeout={{ .Values.disseminateTimeout }}" {{- if eq .Values.global.prometheus.enabled true }} - "--enable-metrics" - "--metrics-port" diff --git a/charts/dapr/charts/dapr_placement/values.yaml b/charts/dapr/charts/dapr_placement/values.yaml index 27832b39f8e..771e9a430a2 100644 --- a/charts/dapr/charts/dapr_placement/values.yaml +++ b/charts/dapr/charts/dapr_placement/values.yaml @@ -25,6 +25,9 @@ ha: false maxActorApiLevel: 10 minActorApiLevel: 0 +keepAliveTime: 2s +keepAliveTimeout: 3s +disseminateTimeout: 2s cluster: forceInMemoryLog: false diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 6d2440c2568..31565d03908 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -38,13 +38,16 @@ const ( defaultReplicationFactor = 100 envMetadataEnabled = "DAPR_PLACEMENT_METADATA_ENABLED" - envKeepAliveTime = "DAPR_PLACEMENT_KEEPALIVE_TIME" - envKeepAliveTimeout = "DAPR_PLACEMENT_KEEPALIVE_TIMEOUT" - envDisseminateTimeout = "DAPR_PLACEMENT_DISSEMINATE_TIMEOUT" - defaultKeepAliveTime = 2 * time.Second defaultKeepAliveTimeout = 3 * time.Second defaultDisseminateTimeout = 2 * time.Second + + keepAliveTimeMin = 1 * time.Second + keepAliveTimeMax = 10 * time.Second + keepAliveTimeoutMin = 1 * time.Second + keepAliveTimeoutMax = 10 * time.Second + disseminateTimeoutMin = 1 * time.Second + disseminateTimeoutMax = 5 * time.Second ) type Options struct { @@ -97,25 +100,8 @@ func New(origArgs []string) (*Options, error) { } } - // Default options - keepAliveTime, err := utils.GetEnvDurationWithRange(envKeepAliveTime, defaultKeepAliveTime, time.Second, 10*time.Second) - if err != nil { - return nil, err - } - keepAliveTimeout, err := utils.GetEnvDurationWithRange(envKeepAliveTimeout, defaultKeepAliveTimeout, time.Second, 10*time.Second) - if err != nil { - return nil, err - } - disseminateTimeout, err := utils.GetEnvDurationWithRange(envDisseminateTimeout, defaultDisseminateTimeout, time.Second, 5*time.Second) - if err != nil { - return nil, err - } - opts := Options{ - MetadataEnabled: utils.IsTruthy(os.Getenv(envMetadataEnabled)), - KeepAliveTime: keepAliveTime, - KeepAliveTimeout: keepAliveTimeout, - DisseminateTimeout: disseminateTimeout, + MetadataEnabled: utils.IsTruthy(os.Getenv(envMetadataEnabled)), } // Create a flag set @@ -135,6 +121,9 @@ func New(origArgs []string) (*Options, error) { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") + fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time (in seconds) for the placement-daprd stream") + fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout (in seconds) for the placement-daprd stream") + fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") @@ -150,6 +139,10 @@ func New(origArgs []string) (*Options, error) { // Ignore errors; flagset is set for ExitOnError _ = fs.Parse(args) + if err := opts.Validate(); err != nil { + return nil, err + } + opts.RaftPeers = parsePeersFromFlag(opts.raftPeerFlag) if opts.RaftLogStorePath != "" { opts.RaftInMemEnabled = false @@ -177,3 +170,19 @@ func parsePeersFromFlag(val []string) []raft.PeerInfo { return peers[:i] } + +func (o *Options) Validate() error { + if o.KeepAliveTime < keepAliveTimeMin || o.KeepAliveTime > keepAliveTimeMax { + return fmt.Errorf("invalid value for keepalive-time: value should be between %s and %s, got %s", keepAliveTimeMin, keepAliveTimeMax, o.KeepAliveTime) + } + + if o.KeepAliveTimeout < keepAliveTimeoutMin || o.KeepAliveTimeout > keepAliveTimeoutMax { + return fmt.Errorf("invalid value for keepalive-timeout: value should be between %s and %s, got %s", keepAliveTimeoutMin, keepAliveTimeoutMax, o.KeepAliveTimeout) + } + + if o.DisseminateTimeout < disseminateTimeoutMin || o.DisseminateTimeout > disseminateTimeoutMax { + return fmt.Errorf("invalid value for disseminate-timeout: value should be between %s and %s, got %s", disseminateTimeoutMin, disseminateTimeoutMax, o.DisseminateTimeout) + } + + return nil +} diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index d2f4dbc4015..37cb8c712fc 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -14,6 +14,7 @@ limitations under the License. package options import ( + "fmt" "testing" "time" @@ -101,25 +102,50 @@ func TestOptsFromEnvVariables(t *testing.T) { require.NoError(t, err) assert.True(t, opts.MetadataEnabled) }) - t.Run("keepalive time", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIME", "4s") - - opts, err := New([]string{}) - require.NoError(t, err) - assert.Equal(t, 4*time.Second, opts.KeepAliveTime) - }) - t.Run("keepalive timeout", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_KEEPALIVE_TIMEOUT", "5s") - - opts, err := New([]string{}) - require.NoError(t, err) - assert.Equal(t, 5*time.Second, opts.KeepAliveTimeout) - }) - t.Run("disseminate timeout", func(t *testing.T) { - t.Setenv("DAPR_PLACEMENT_DISSEMINATE_TIMEOUT", "4s") +} - opts, err := New([]string{}) - require.NoError(t, err) - assert.Equal(t, 4*time.Second, opts.DisseminateTimeout) - }) +func TestValidateFlags(t *testing.T) { + testCases := []struct { + name string + arg string + value string + }{ + { + "keepalive-time too low", + "keepalive-time", + "0.5s", + }, + { + "keepalive-time too high", + "keepalive-time", + "11s", + }, + { + "keepalive-timeout too low", + "keepalive-timeout", + "0.5s", + }, + { + "keepalive-timeout too high", + "keepalive-timeout", + "11s", + }, + { + "disseminate-timeout too low", + "disseminate-timeout", + "0.5s", + }, + { + "disseminate-timeout too high", + "disseminate-timeout", + "6s", + }, + } + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + _, err := New([]string{"--" + tt.arg, tt.value}) + require.Error(t, err) + require.Contains(t, err.Error(), fmt.Sprintf("invalid value for %s", tt.arg)) + }) + } } From 48bf74722a2b5d96e42dd52566c216cda3e2d50a Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 10 Sep 2024 01:13:30 +0100 Subject: [PATCH 020/112] Removes dependency on latest kit Signed-off-by: Elena Kolevska --- go.mod | 3 +-- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 1395c38803c..5cb4748503c 100644 --- a/go.mod +++ b/go.mod @@ -489,8 +489,7 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 // Don't commit with this uncommented! // // replace github.com/dapr/components-contrib => ../components-contrib -replace github.com/dapr/kit => github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49 - +// replace github.com/dapr/kit => ../kit // // Then, run `make modtidy-all` in this repository. // This ensures that go.mod and go.sum are up-to-date for each go.mod file. diff --git a/go.sum b/go.sum index 1853139763b..3e225fe4c09 100644 --- a/go.sum +++ b/go.sum @@ -447,6 +447,8 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dapr/components-contrib v1.14.0-rc.6 h1:L+1OC5AOALmF8Wd+FbCdgbR1xO9aain/LfyMC3kkOwk= github.com/dapr/components-contrib v1.14.0-rc.6/go.mod h1:h2OsxAGYLVR/chY2hThFbulEupHWPvVI3BpMQBXcJtg= +github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5 h1:FQKdGOG6Zi3gBhtnxPQmrd8QFLs8e6JTGkts+aaXba0= +github.com/dapr/kit v0.13.1-0.20240724000121-26b564d9d0f5/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -506,8 +508,6 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.4.3 h1:2kwcUGn8seMUfWndX0hGbvH8r7crgcJguQNCyp70xik= github.com/eclipse/paho.mqtt.golang v1.4.3/go.mod h1:CSYvoAlsMkhYOXh/oKyxa8EcBci6dVkLCbo5tTC1RIE= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49 h1:T6guijImu2BFQCa0oDMPvLFcazH89sJZrpbVh8Ym4ns= -github.com/elena-kolevska/kit v0.0.0-20240830122326-7afed1b7cb49/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= From 4caa599f2152367b1e30f3a5c38c8d07e88bb18a Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Thu, 19 Sep 2024 17:28:18 +0100 Subject: [PATCH 021/112] Updates cli args description Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 2 +- cmd/placement/options/options.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index b75ffa68f00..fe1c85d4956 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -163,7 +163,7 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` | | `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` | | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | -| `dapr_placement.keepAliveTime` | Sets the interval at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `2s` | +| `dapr_placement.keepAliveTime` | Sets the interval at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `2s` | | `dapr_placement.keepAliveTimeout` | Sets the timeout period for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `3s` | | `dapr_placement.disseminateTimeout` | Sets the timeout period for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts. Higher values will reduce the frequency of dissemination, but delay the table dissemination. Accepts values between `1s` and `5s` | `2s` | diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 31565d03908..7c57e36453f 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -121,9 +121,9 @@ func New(origArgs []string) (*Options, error) { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") - fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the gRPC keepalive time (in seconds) for the placement-daprd stream") - fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the gRPC keepalive timeout (in seconds) for the placement-daprd stream") - fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period (in seconds) for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts") + fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the interval at which the placement service sends keepalive pings to daprd \non the gRPC stream to check if the connection is still alive. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") + fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the timeout period for daprd to respond to the placement service's keepalive pings \nbefore the placement service closes the connection. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") + fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period for dissemination to be delayed after actor membership change \nso as to avoid excessive dissemination during multiple pod restarts. \nHigher values will reduce the frequency of dissemination, but delay the table dissemination. \nAccepts values between 1 and 5 seconds") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") From 9413341d53f873ac5fe8907b7e6beddd53057217 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 20 Sep 2024 14:11:50 -0500 Subject: [PATCH 022/112] initial metric + int test Signed-off-by: Cassandra Coyle --- cmd/scheduler/app/app.go | 2 +- pkg/scheduler/server/api.go | 3 +- .../suite/scheduler/metrics/basic.go | 187 ++++++++++++++++++ .../integration/suite/scheduler/scheduler.go | 1 + 4 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 tests/integration/suite/scheduler/metrics/basic.go diff --git a/cmd/scheduler/app/app.go b/cmd/scheduler/app/app.go index 2efd30dff58..2f1975c0d78 100644 --- a/cmd/scheduler/app/app.go +++ b/cmd/scheduler/app/app.go @@ -23,7 +23,7 @@ import ( healthzserver "github.com/dapr/dapr/pkg/healthz/server" "github.com/dapr/dapr/pkg/metrics" "github.com/dapr/dapr/pkg/modes" - "github.com/dapr/dapr/pkg/placement/monitoring" + "github.com/dapr/dapr/pkg/scheduler/monitoring" "github.com/dapr/dapr/pkg/scheduler/server" "github.com/dapr/dapr/pkg/security" "github.com/dapr/kit/concurrency" diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index b8689eafa7f..4ce930513ff 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -24,6 +24,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/pkg/scheduler/monitoring" "github.com/dapr/dapr/pkg/scheduler/server/internal" ) @@ -62,7 +63,7 @@ func (s *Server) ScheduleJob(ctx context.Context, req *schedulerv1pb.ScheduleJob log.Errorf("error scheduling job %s: %s", req.GetName(), err) return nil, err } - + monitoring.RecordJobsScheduledCount(req.GetMetadata()) return &schedulerv1pb.ScheduleJobResponse{}, nil } diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go new file mode 100644 index 00000000000..fe223f41c3d --- /dev/null +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -0,0 +1,187 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strconv" + "strings" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + clientv3 "go.etcd.io/etcd/client/v3" + "google.golang.org/protobuf/types/known/anypb" + + schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/process/ports" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" +) + +func init() { + suite.Register(new(basic)) +} + +type basic struct { + scheduler *scheduler.Scheduler + + etcdPort int + etcdClient *clientv3.Client + idPrefix string +} + +func (b *basic) Setup(t *testing.T) []framework.Option { + uuid, err := uuid.NewUUID() + require.NoError(t, err) + b.idPrefix = uuid.String() + + fp := ports.Reserve(t, 2) + port1 := fp.Port(t) + port2 := fp.Port(t) + + b.etcdPort = port2 + + clientPorts := []string{ + "scheduler-0=" + strconv.Itoa(b.etcdPort), + } + b.scheduler = scheduler.New(t, + scheduler.WithID("scheduler-0"), + scheduler.WithInitialCluster(fmt.Sprintf("scheduler-0=http://localhost:%d", port1)), + scheduler.WithInitialClusterPorts(port1), + scheduler.WithEtcdClientPorts(clientPorts), + ) + + fp.Free(t) + return []framework.Option{ + framework.WithProcesses(fp, b.scheduler), + } +} + +func (b *basic) Run(t *testing.T, ctx context.Context) { + b.scheduler.WaitUntilRunning(t, ctx) + + var err error + b.etcdClient, err = clientv3.New(clientv3.Config{ + Endpoints: []string{fmt.Sprintf("localhost:%d", b.etcdPort)}, + DialTimeout: 5 * time.Second, + }) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, b.etcdClient.Close()) + }) + + frameworkClient := frameworkclient.HTTP(t) + client := b.scheduler.Client(t, ctx) + + t.Run("create 10 jobs, ensure metrics", func(t *testing.T) { + for i := 1; i <= 10; i++ { + name := b.idPrefix + "_" + strconv.Itoa(i) + + req := &schedulerv1.ScheduleJobRequest{ + Name: name, + Job: &schedulerv1.Job{ + Schedule: ptr.Of("@every 20s"), + Repeats: ptr.Of(uint32(1)), + Data: &anypb.Any{ + Value: []byte(b.idPrefix), + }, + Ttl: ptr.Of("30s"), + }, + Metadata: &schedulerv1.JobMetadata{ + AppId: "appid", + Namespace: "namespace", + Target: &schedulerv1.JobTargetMetadata{ + Type: new(schedulerv1.JobTargetMetadata_Job), + }, + }, + } + + _, err := client.ScheduleJob(ctx, req) + require.NoError(t, err) + + assert.True(t, b.etcdHasJob(t, ctx, name)) + + b.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", i) + } + }) +} + +func (b *basic) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { + t.Helper() + + // Get keys with prefix + resp, err := b.etcdClient.Get(ctx, "", clientv3.WithPrefix()) + require.NoError(t, err) + + for _, kv := range resp.Kvs { + if strings.HasSuffix(string(kv.Key), "||"+key) { + return true + } + } + + return false +} + +// assert the metric exists and the count is correct +func (b *basic) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { + t.Helper() + + metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", b.scheduler.MetricsPort()), nil) + require.NoError(t, err) + + resp, err := client.Do(metricReq) + require.NoError(t, err) + + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + foundMetric := false + + for _, line := range bytes.Split(respBody, []byte("\n")) { + if len(line) == 0 || line[0] == '#' { + continue + } + + split := bytes.Split(line, []byte(" ")) + if len(split) != 2 { + continue + } + + // dapr_scheduler_jobs_created_total{app_id="appid"} + metricName := string(split[0]) + metricVal := string(split[1]) + if !strings.Contains(metricName, expectedMetric) { + continue + } + if strings.Contains(metricName, expectedMetric) { + metricCount, err := strconv.Atoi(metricVal) + require.NoError(t, err) + assert.Equal(t, expectedCount, metricCount) + foundMetric = true + break + } + } + assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) +} diff --git a/tests/integration/suite/scheduler/scheduler.go b/tests/integration/suite/scheduler/scheduler.go index 389e322416b..a7899fdaf02 100644 --- a/tests/integration/suite/scheduler/scheduler.go +++ b/tests/integration/suite/scheduler/scheduler.go @@ -17,5 +17,6 @@ import ( _ "github.com/dapr/dapr/tests/integration/suite/scheduler/api" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/authz" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/helm" + _ "github.com/dapr/dapr/tests/integration/suite/scheduler/metrics" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/quorum" ) From dd5b5c5d02c4e60fb2a4b6d1259c129fa7b1a5b4 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 20 Sep 2024 15:40:20 -0500 Subject: [PATCH 023/112] add reminder metrics check for scheduler Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 85 +++++++ .../actors/reminders/scheduler/metrics.go | 210 ++++++++++++++++++ 2 files changed, 295 insertions(+) create mode 100644 pkg/scheduler/monitoring/metrics.go create mode 100644 tests/integration/suite/actors/reminders/scheduler/metrics.go diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go new file mode 100644 index 00000000000..47f24006c75 --- /dev/null +++ b/pkg/scheduler/monitoring/metrics.go @@ -0,0 +1,85 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package monitoring + +import ( + "context" + + "go.opencensus.io/stats" + "go.opencensus.io/stats/view" + "go.opencensus.io/tag" + + diagUtils "github.com/dapr/dapr/pkg/diagnostics/utils" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" +) + +const ( + appID = "app_id" +) + +var ( + sidecarsConnectedTotal = stats.Int64( + "scheduler/sidecars_connected_total", + "The total number of dapr sidecars connected to the scheduler service.", + stats.UnitDimensionless) + jobsScheduledTotal = stats.Int64( + "scheduler/jobs_created_total", + "The total number of jobs scheduled (and therefore created).", + stats.UnitDimensionless) + triggerDurationTotal = stats.Int64( + "scheduler/trigger_duration_total", + "The total time it takes to trigger a job.", + stats.UnitDimensionless) + jobsSuccessfullyTriggeredTotal = stats.Int64( + "scheduler/jobs_successfully_triggered_total", + "The total number of successfully triggered jobs.", + stats.UnitDimensionless) + + // appIDKey is a tag key for App ID. + appIDKey = tag.MustNewKey(appID) +) + +// RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service +func RecordSidecarsConnectedCount(appID string) { + stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name(), appIDKey, appID), sidecarsConnectedTotal.M(1)) +} //TODO FINISH + +// RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service +func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { + var jobType string + switch jobMetadata.GetTarget().GetType().(type) { + case *schedulerv1pb.JobTargetMetadata_Job: + jobType = "job" + case *schedulerv1pb.JobTargetMetadata_Actor: + jobType = "actor" + default: + jobType = "unknown" + } + + stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsScheduledTotal.Name(), appIDKey, jobMetadata.GetAppId(), jobType), jobsScheduledTotal.M(1)) +} + +//TODO ADD: triggerDurationTotal && jobsSuccessfullyTriggeredTotal + +// InitMetrics initialize the scheduler service metrics. +func InitMetrics() error { + err := view.Register( + diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{appIDKey}, view.Count()), + diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{appIDKey}, view.Count()), + diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Count()), + diagUtils.NewMeasureView(jobsSuccessfullyTriggeredTotal, []tag.Key{appIDKey}, view.Count()), + ) + + return err +} diff --git a/tests/integration/suite/actors/reminders/scheduler/metrics.go b/tests/integration/suite/actors/reminders/scheduler/metrics.go new file mode 100644 index 00000000000..895d08213ab --- /dev/null +++ b/tests/integration/suite/actors/reminders/scheduler/metrics.go @@ -0,0 +1,210 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package scheduler + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "os" + "path/filepath" + "strconv" + "strings" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + clientv3 "go.etcd.io/etcd/client/v3" + + runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" + "github.com/dapr/dapr/tests/integration/framework" + clients "github.com/dapr/dapr/tests/integration/framework/client" + frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/framework/process/http/app" + "github.com/dapr/dapr/tests/integration/framework/process/placement" + "github.com/dapr/dapr/tests/integration/framework/process/ports" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" +) + +func init() { + suite.Register(new(metrics)) +} + +type metrics struct { + place *placement.Placement + scheduler *scheduler.Scheduler + triggered atomic.Int64 + + daprd *daprd.Daprd + etcdPort int +} + +func (m *metrics) Setup(t *testing.T) []framework.Option { + configFile := filepath.Join(t.TempDir(), "config.yaml") + require.NoError(t, os.WriteFile(configFile, []byte(` +apiVersion: dapr.io/v1alpha1 +kind: Configuration +metadata: + name: schedulerreminders +spec: + features: + - name: SchedulerReminders + enabled: true`), 0o600)) + + fp := ports.Reserve(t, 2) + port1 := fp.Port(t) + port2 := fp.Port(t) + m.etcdPort = port2 + clientPorts := []string{ + "scheduler-0=" + strconv.Itoa(m.etcdPort), + } + m.scheduler = scheduler.New(t, + scheduler.WithID("scheduler-0"), + scheduler.WithInitialCluster(fmt.Sprintf("scheduler-0=http://localhost:%d", port1)), + scheduler.WithInitialClusterPorts(port1), + scheduler.WithEtcdClientPorts(clientPorts), + ) + + app := app.New(t, + app.WithHandlerFunc("/actors/myactortype/myactorid/method/remind/remindermethod", func(http.ResponseWriter, *http.Request) { + m.triggered.Add(1) + }), + app.WithHandlerFunc("/actors/myactortype/myactorid/method/foo", func(http.ResponseWriter, *http.Request) {}), + app.WithConfig(`{"entities": ["myactortype"]}`), + ) + + m.place = placement.New(t) + + m.daprd = daprd.New(t, + daprd.WithConfigs(configFile), + daprd.WithInMemoryActorStateStore("mystore"), + daprd.WithPlacementAddresses(m.place.Address()), + daprd.WithSchedulerAddresses(m.scheduler.Address()), + daprd.WithAppPort(app.Port()), + ) + + fp.Free(t) + return []framework.Option{ + framework.WithProcesses(app, m.scheduler, m.place, m.daprd), + } +} + +func (m *metrics) Run(t *testing.T, ctx context.Context) { + m.scheduler.WaitUntilRunning(t, ctx) + m.place.WaitUntilRunning(t, ctx) + m.daprd.WaitUntilRunning(t, ctx) + + frameworkClient := frameworkclient.HTTP(t) + + client := m.daprd.GRPCClient(t, ctx) + + etcdClient := clients.Etcd(t, clientv3.Config{ + Endpoints: []string{fmt.Sprintf("localhost:%d", m.etcdPort)}, + DialTimeout: 5 * time.Second, + }) + + // Use "path/filepath" import, it is using OS specific path separator unlike "path" + etcdKeysPrefix := filepath.Join("dapr", "jobs") + + assert.EventuallyWithT(t, func(c *assert.CollectT) { + keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + require.NoError(c, rerr) + assert.Empty(c, keys) + }, time.Second*10, 10*time.Millisecond) + + // assert false, since count is 0 here + m.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", 0) + + _, err := client.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ + ActorType: "myactortype", + ActorId: "myactorid", + Method: "foo", + }) + require.NoError(t, err) + + _, err = client.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ + ActorType: "myactortype", + ActorId: "myactorid", + Name: "remindermethod", + DueTime: "0s", + Period: "1s", + }) + require.NoError(t, err) + + assert.EventuallyWithT(t, func(c *assert.CollectT) { + keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + require.NoError(c, rerr) + assert.Len(c, keys, 1) + }, time.Second*10, 10*time.Millisecond) + + // true, since count is 1 + m.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", 1) + + assert.EventuallyWithT(t, func(c *assert.CollectT) { + assert.GreaterOrEqual(c, m.triggered.Load(), int64(1)) + }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greatrer or equal 1, actual value %d", m.triggered.Load())) +} + +// assert the metric exists and the count is correct +func (m *metrics) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { + t.Helper() + + metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", m.scheduler.MetricsPort()), nil) + require.NoError(t, err) + + resp, err := client.Do(metricReq) + require.NoError(t, err) + + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + foundMetric := false + + for _, line := range bytes.Split(respBody, []byte("\n")) { + if len(line) == 0 || line[0] == '#' { + continue + } + + split := bytes.Split(line, []byte(" ")) + if len(split) != 2 { + continue + } + + // dapr_scheduler_jobs_created_total{app_id="appid"} + metricName := string(split[0]) + metricVal := string(split[1]) + if !strings.Contains(metricName, expectedMetric) { + continue + } + if strings.Contains(metricName, expectedMetric) { + metricCount, err := strconv.Atoi(metricVal) + require.NoError(t, err) + assert.Equal(t, expectedCount, metricCount) + foundMetric = true + break + } + } + if expectedCount > 0 { + assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) + } else { + assert.False(t, foundMetric) + } +} From c6f562b2955d1e3c91d24170dba969b6a166383c Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 20 Sep 2024 16:41:34 -0500 Subject: [PATCH 024/112] add metric for sidecars connected to scheduler + int test Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 8 +- pkg/scheduler/server/api.go | 1 + .../scheduler/metrics/daprconnections.go | 129 ++++++++++++++++++ 3 files changed, 134 insertions(+), 4 deletions(-) create mode 100644 tests/integration/suite/scheduler/metrics/daprconnections.go diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 47f24006c75..bf622aec9b9 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -19,7 +19,7 @@ import ( "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" - + diagUtils "github.com/dapr/dapr/pkg/diagnostics/utils" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" ) @@ -51,9 +51,9 @@ var ( ) // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service -func RecordSidecarsConnectedCount(appID string) { - stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name(), appIDKey, appID), sidecarsConnectedTotal.M(1)) -} //TODO FINISH +func RecordSidecarsConnectedCount(ns string, appID string) { + stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name(), appIDKey, ns, appID), sidecarsConnectedTotal.M(1)) +} // RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 4ce930513ff..a283ca32973 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -146,6 +146,7 @@ func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error } s.connectionPool.Add(req.GetInitial(), stream) + monitoring.RecordSidecarsConnectedCount(req.GetInitial().GetNamespace(), req.GetInitial().GetAppId()) select { case <-s.closeCh: diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go new file mode 100644 index 00000000000..c3d291777d3 --- /dev/null +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -0,0 +1,129 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/framework/process/exec" + "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" + "github.com/dapr/dapr/tests/integration/framework/process/logline" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" +) + +func init() { + suite.Register(new(daprconnections)) +} + +type daprconnections struct { + scheduler *scheduler.Scheduler + daprd *daprd.Daprd + + connectionlogline *logline.LogLine +} + +func (c *daprconnections) Setup(t *testing.T) []framework.Option { + c.connectionlogline = logline.New(t, + logline.WithStdoutLineContains( + `Adding a Sidecar connection to Scheduler for appID: default/C`, + ), + ) + c.scheduler = scheduler.New(t, + scheduler.WithLogLevel("debug"), + scheduler.WithExecOptions( + exec.WithStdout(c.connectionlogline.Stdout()), + ), + ) + srv := app.New(t) + c.daprd = daprd.New(t, + daprd.WithSchedulerAddresses(c.scheduler.Address()), + daprd.WithAppProtocol("grpc"), + daprd.WithAppPort(srv.Port(t)), + daprd.WithAppID("C"), + ) + + return []framework.Option{ + framework.WithProcesses(c.connectionlogline, srv, c.scheduler, c.daprd), + } +} + +func (c *daprconnections) Run(t *testing.T, ctx context.Context) { + c.scheduler.WaitUntilRunning(t, ctx) + c.daprd.WaitUntilRunning(t, ctx) + + client := client.HTTP(t) + + t.Run("ensure dapr connection with scheduler metric", func(t *testing.T) { + c.assertMetricExists(t, ctx, client, "dapr_scheduler_sidecars_connected_total", 1) + }) + + c.connectionlogline.EventuallyFoundAll(t) +} + +// assert the metric exists and the count is correct +func (c *daprconnections) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { + t.Helper() + + metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", c.scheduler.MetricsPort()), nil) + require.NoError(t, err) + + resp, err := client.Do(metricReq) + require.NoError(t, err) + + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + foundMetric := false + + for _, line := range bytes.Split(respBody, []byte("\n")) { + if len(line) == 0 || line[0] == '#' { + continue + } + + split := bytes.Split(line, []byte(" ")) + if len(split) != 2 { + continue + } + + // dapr_scheduler_sidecars_connected_total{app_id="appid"} + metricName := string(split[0]) + metricVal := string(split[1]) + if !strings.Contains(metricName, expectedMetric) { + continue + } + if strings.Contains(metricName, expectedMetric) { + metricCount, err := strconv.Atoi(metricVal) + require.NoError(t, err) + assert.Equal(t, expectedCount, metricCount) + foundMetric = true + break + } + } + assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) +} From 2a92d087ad225449ed1c4e5eee8c57018bc061ba Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 20 Sep 2024 17:35:59 -0500 Subject: [PATCH 025/112] add job triggered metric + int test Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 13 +- pkg/scheduler/server/api.go | 1 + .../suite/scheduler/metrics/jobstriggered.go | 214 ++++++++++++++++++ 3 files changed, 224 insertions(+), 4 deletions(-) create mode 100644 tests/integration/suite/scheduler/metrics/jobstriggered.go diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index bf622aec9b9..798744c23f1 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -41,8 +41,8 @@ var ( "scheduler/trigger_duration_total", "The total time it takes to trigger a job.", stats.UnitDimensionless) - jobsSuccessfullyTriggeredTotal = stats.Int64( - "scheduler/jobs_successfully_triggered_total", + jobsTriggeredTotal = stats.Int64( + "scheduler/jobs_triggered_total", "The total number of successfully triggered jobs.", stats.UnitDimensionless) @@ -70,7 +70,12 @@ func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsScheduledTotal.Name(), appIDKey, jobMetadata.GetAppId(), jobType), jobsScheduledTotal.M(1)) } -//TODO ADD: triggerDurationTotal && jobsSuccessfullyTriggeredTotal +// RecordJobsTriggeredCount records the total number of jobs successfully triggered from the scheduler service +func RecordJobsTriggeredCount(ns string, appID string) { + stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsTriggeredTotal.Name(), appIDKey, ns, appID), jobsTriggeredTotal.M(1)) +} + +//TODO ADD: triggerDurationTotal // InitMetrics initialize the scheduler service metrics. func InitMetrics() error { @@ -78,7 +83,7 @@ func InitMetrics() error { diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(jobsSuccessfullyTriggeredTotal, []tag.Key{appIDKey}, view.Count()), + diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{appIDKey}, view.Count()), ) return err diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index a283ca32973..44c93578be0 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -184,6 +184,7 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { log.Errorf("Error sending job to connection stream: %s", err) } + monitoring.RecordJobsTriggeredCount(meta.GetNamespace(), meta.GetAppId()) return true } diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go new file mode 100644 index 00000000000..3b2b24ccd9a --- /dev/null +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -0,0 +1,214 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strconv" + "strings" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/wrapperspb" + + commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1" + runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" + "github.com/dapr/dapr/tests/integration/framework" + frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" + "github.com/dapr/dapr/tests/integration/framework/process/grpc/app/proto" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" +) + +func init() { + suite.Register(new(jobstriggered)) +} + +type jobstriggered struct { + daprd *daprd.Daprd + scheduler *scheduler.Scheduler + jobChan chan *runtimev1pb.JobEventRequest + jobstriggeredCount atomic.Int32 +} + +func (j *jobstriggered) Setup(t *testing.T) []framework.Option { + j.scheduler = scheduler.New(t) + + j.jobstriggeredCount.Store(0) + j.jobChan = make(chan *runtimev1pb.JobEventRequest, 1) + srv := app.New(t, + app.WithOnJobEventFn(func(ctx context.Context, in *runtimev1pb.JobEventRequest) (*runtimev1pb.JobEventResponse, error) { + j.jobstriggeredCount.Add(1) + j.jobChan <- in + return new(runtimev1pb.JobEventResponse), nil + }), + ) + + j.daprd = daprd.New(t, + daprd.WithSchedulerAddresses(j.scheduler.Address()), + daprd.WithAppPort(srv.Port(t)), + daprd.WithAppProtocol("grpc"), + ) + + return []framework.Option{ + framework.WithProcesses(j.scheduler, srv, j.daprd), + } +} + +func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { + j.scheduler.WaitUntilRunning(t, ctx) + j.daprd.WaitUntilRunning(t, ctx) + + tests := map[string]struct { + data func(t *testing.T) *anypb.Any + exp func(t *testing.T, job *runtimev1pb.JobEventRequest) + }{ + "expr": { + data: func(*testing.T) *anypb.Any { + t.Helper() + str, err := structpb.NewStruct(map[string]any{ + "expression": "val", + }) + require.NoError(t, err) + data, err := anypb.New(structpb.NewStructValue(str)) + require.NoError(t, err) + return data + }, + exp: func(t *testing.T, job *runtimev1pb.JobEventRequest) { + t.Helper() + str, err := structpb.NewStruct(map[string]any{ + "expression": "val", + }) + require.NoError(t, err) + data, err := anypb.New(structpb.NewStructValue(str)) + require.NoError(t, err) + assert.Equal(t, data, job.GetData()) + }, + }, + "bytes": { + data: func(t *testing.T) *anypb.Any { + t.Helper() + anyB, err := anypb.New(wrapperspb.Bytes([]byte("hello world"))) + require.NoError(t, err) + return anyB + }, + exp: func(t *testing.T, job *runtimev1pb.JobEventRequest) { + t.Helper() + assert.Equal(t, "type.googleapis.com/google.protobuf.BytesValue", job.GetData().GetTypeUrl()) + assert.Equal(t, []byte("hello world"), bytes.TrimSpace((job.GetData().GetValue()))) + var b wrapperspb.BytesValue + require.NoError(t, job.GetData().UnmarshalTo(&b)) + assert.Equal(t, []byte("hello world"), b.GetValue()) + }, + }, + "ping": { + data: func(t *testing.T) *anypb.Any { + anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) + require.NoError(t, err) + return anyB + }, + exp: func(t *testing.T, job *runtimev1pb.JobEventRequest) { + assert.Equal(t, "type.googleapis.com/dapr.io.testproto.PingResponse", job.GetData().GetTypeUrl()) + var ping proto.PingResponse + require.NoError(t, job.GetData().UnmarshalTo(&ping)) + assert.Equal(t, "pong", ping.GetValue()) + assert.Equal(t, int32(123), ping.GetCounter()) + }, + }, + } + + frameworkClient := frameworkclient.HTTP(t) + client := j.daprd.GRPCClient(t, ctx) + for name, test := range tests { + t.Run(name, func(t *testing.T) { + _, err := client.ScheduleJobAlpha1(ctx, &runtimev1pb.ScheduleJobRequest{ + Job: &runtimev1pb.Job{ + Name: name, + DueTime: ptr.Of("0s"), + Data: test.data(t), + }, + }) + require.NoError(t, err) + + select { + case job := <-j.jobChan: + assert.NotNil(t, job) + assert.Equal(t, "job/"+name, job.GetMethod()) + assert.Equal(t, commonv1pb.HTTPExtension_POST, job.GetHttpExtension().GetVerb()) + j.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_triggered_total", int(j.jobstriggeredCount.Load())) + test.exp(t, job) + case <-time.After(time.Second * 10): + assert.Fail(t, "timed out waiting for triggered job") + } + }) + } + assert.Equal(t, len(tests), int(j.jobstriggeredCount.Load())) +} + +// assert the metric exists and the count is correct +func (j *jobstriggered) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { + t.Helper() + + require.EventuallyWithT(t, func(c *assert.CollectT) { + metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", j.scheduler.MetricsPort()), nil) + require.NoError(t, err) + + resp, err := client.Do(metricReq) + require.NoError(t, err) + + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + foundMetric := false + + for _, line := range bytes.Split(respBody, []byte("\n")) { + if len(line) == 0 || line[0] == '#' { + continue + } + + split := bytes.Split(line, []byte(" ")) + if len(split) != 2 { + continue + } + + // dapr_scheduler_jobs_created_total{app_id="appid"} + metricName := string(split[0]) + metricVal := string(split[1]) + if !strings.Contains(metricName, expectedMetric) { + continue + } + if strings.Contains(metricName, expectedMetric) { + metricCount, err := strconv.Atoi(metricVal) + require.NoError(t, err) + assert.Equal(t, expectedCount, metricCount) + foundMetric = true + break + } + } + assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) + }, time.Second*1, time.Millisecond*10, "Expected metric %s not found or the count was incorrect", expectedMetric) +} From 3aa9b55432df4e7e8e2b6f6abddd8f06688dc949 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 09:58:55 -0500 Subject: [PATCH 026/112] add test for duration metric Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 17 +++-- pkg/scheduler/server/api.go | 2 + .../suite/scheduler/metrics/jobstriggered.go | 66 ++++++++++++++++++- 3 files changed, 78 insertions(+), 7 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 798744c23f1..80b1e12b95f 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -15,6 +15,7 @@ package monitoring import ( "context" + "time" "go.opencensus.io/stats" "go.opencensus.io/stats/view" @@ -37,14 +38,14 @@ var ( "scheduler/jobs_created_total", "The total number of jobs scheduled (and therefore created).", stats.UnitDimensionless) - triggerDurationTotal = stats.Int64( - "scheduler/trigger_duration_total", - "The total time it takes to trigger a job.", - stats.UnitDimensionless) jobsTriggeredTotal = stats.Int64( "scheduler/jobs_triggered_total", "The total number of successfully triggered jobs.", stats.UnitDimensionless) + triggerDurationTotal = stats.Float64( + "scheduler/trigger_duration_total", + "The total time it takes to trigger a job from the scheduler service.", + stats.UnitMilliseconds) // appIDKey is a tag key for App ID. appIDKey = tag.MustNewKey(appID) @@ -75,15 +76,19 @@ func RecordJobsTriggeredCount(ns string, appID string) { stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsTriggeredTotal.Name(), appIDKey, ns, appID), jobsTriggeredTotal.M(1)) } -//TODO ADD: triggerDurationTotal +// RecordTriggerDuration records the time it takes to send the job to dapr from the scheduler service +func RecordTriggerDuration(ns string, appID string, start time.Time) { + elapsed := time.Since(start).Milliseconds() + stats.RecordWithTags(context.Background(), diagUtils.WithTags(triggerDurationTotal.Name(), appIDKey, ns, appID), triggerDurationTotal.M(float64(elapsed))) +} // InitMetrics initialize the scheduler service metrics. func InitMetrics() error { err := view.Register( diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{appIDKey}, view.Count()), + diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), ) return err diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 44c93578be0..24437f3d4d4 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -174,6 +174,7 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { return true } + now := time.Now() if err := s.connectionPool.Send(ctx, &internal.JobEvent{ Name: req.GetName()[idx+2:], Data: req.GetPayload(), @@ -183,6 +184,7 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { // another long running go routine that accepts this job on a channel log.Errorf("Error sending job to connection stream: %s", err) } + monitoring.RecordTriggerDuration(meta.GetNamespace(), meta.GetAppId(), now) monitoring.RecordJobsTriggeredCount(meta.GetNamespace(), meta.GetAppId()) return true diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index 3b2b24ccd9a..b5ad501660c 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -144,6 +144,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { client := j.daprd.GRPCClient(t, ctx) for name, test := range tests { t.Run(name, func(t *testing.T) { + startTime := time.Now() _, err := client.ScheduleJobAlpha1(ctx, &runtimev1pb.ScheduleJobRequest{ Job: &runtimev1pb.Job{ Name: name, @@ -155,10 +156,23 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { select { case job := <-j.jobChan: + receivedJobElapsed := time.Since(startTime).Milliseconds() assert.NotNil(t, job) assert.Equal(t, "job/"+name, job.GetMethod()) assert.Equal(t, commonv1pb.HTTPExtension_POST, job.GetHttpExtension().GetVerb()) j.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_triggered_total", int(j.jobstriggeredCount.Load())) + + // with duration metrics, the following metrics can be found: + // dapr_scheduler_trigger_duration_total_bucket + // dapr_scheduler_trigger_duration_total_sum + triggeredElapsed := j.getMetricVal(t, ctx, frameworkClient, "dapr_scheduler_trigger_duration_total") + + // ensure the trigger duration is less than 1 second (1000 milliseconds) + assert.Less(t, triggeredElapsed, int64(1000), "Trigger duration should be less than 1 second") + + // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app + assert.Less(t, triggeredElapsed, receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") + test.exp(t, job) case <-time.After(time.Second * 10): assert.Fail(t, "timed out waiting for triggered job") @@ -195,7 +209,7 @@ func (j *jobstriggered) assertMetricExists(t *testing.T, ctx context.Context, cl continue } - // dapr_scheduler_jobs_created_total{app_id="appid"} + // dapr_scheduler_jobs_triggered_total{app_id="appid"} metricName := string(split[0]) metricVal := string(split[1]) if !strings.Contains(metricName, expectedMetric) { @@ -212,3 +226,53 @@ func (j *jobstriggered) assertMetricExists(t *testing.T, ctx context.Context, cl assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) }, time.Second*1, time.Millisecond*10, "Expected metric %s not found or the count was incorrect", expectedMetric) } + +// for duration metrics, send back the value +func (j *jobstriggered) getMetricVal(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string) int64 { + t.Helper() + + var metricValue int64 + require.EventuallyWithT(t, func(c *assert.CollectT) { + metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", j.scheduler.MetricsPort()), nil) + require.NoError(t, err) + + resp, err := client.Do(metricReq) + require.NoError(t, err) + + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + foundMetric := false + + for _, line := range bytes.Split(respBody, []byte("\n")) { + if len(line) == 0 || line[0] == '#' { + continue + } + + split := bytes.Split(line, []byte(" ")) + if len(split) != 2 { + continue + } + + metricName := string(split[0]) + metricVal := string(split[1]) + + if !strings.Contains(metricName, expectedMetric) { + continue + } + + // dapr_scheduler_trigger_duration_total_bucket + // dapr_scheduler_trigger_duration_total_sum + if strings.Contains(metricName, expectedMetric) { + metricElapsed, err := strconv.ParseFloat(metricVal, 64) + require.NoError(t, err) + metricValue = int64(metricElapsed) + foundMetric = true + + } + } + assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) + }, time.Second*1, time.Millisecond*10, "Expected metric %s not found or the value was incorrect", expectedMetric) + return metricValue +} From 0ef2a9d98fee0c1d91f39790e0e4e90cce2d8ea5 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 10:01:26 -0500 Subject: [PATCH 027/112] update metrics markdown Signed-off-by: Cassandra Coyle --- docs/development/dapr-metrics.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/development/dapr-metrics.md b/docs/development/dapr-metrics.md index 9300224aaa9..0de6c750329 100644 --- a/docs/development/dapr-metrics.md +++ b/docs/development/dapr-metrics.md @@ -9,6 +9,7 @@ Dapr metric name starts with `dapr_` prefix except for health metrics. * [Dapr Sentry metrics](#dapr-sentry-metrics) * [Dapr Runtime metrics](#dapr-runtime-metrics) * [Dapr Component metrics](#dapr-component-metrics) + * [Dapr Scheduler metrics](#dapr-scheduler-metrics) ## Dapr Common metrics @@ -54,6 +55,15 @@ Dapr uses prometheus process and go collectors by default. * dapr_sentry_issuercert_changed_total: The number of issuer cert updates, when issuer cert or key is changed * dapr_sentry_issuercert_expiry_timestamp: The unix timestamp, in seconds, when issuer/root cert will expire. +## Dapr Scheduler metrics + +[monitoring metrics](../../pkg/scheduler/monitoring/metrics.go) + +* dapr_scheduler_sidecars_connected_total: The total number of dapr sidecars connected to the scheduler service. +* dapr_scheduler_jobs_created_total: The total number of jobs scheduled (and therefore created). +* dapr_scheduler_jobs_triggered_total: The total number of successfully triggered jobs. +* dapr_scheduler_trigger_duration_total: The total time it takes to trigger a job from the scheduler service. + ## Dapr Runtime metrics ### Service related metrics From ed8fa2a881e4a683d7ec4a349a2081d533d52d54 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 10:11:59 -0500 Subject: [PATCH 028/112] update description Signed-off-by: Cassandra Coyle --- docs/development/dapr-metrics.md | 2 +- pkg/scheduler/monitoring/metrics.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/development/dapr-metrics.md b/docs/development/dapr-metrics.md index 0de6c750329..ce4022dd8df 100644 --- a/docs/development/dapr-metrics.md +++ b/docs/development/dapr-metrics.md @@ -60,7 +60,7 @@ Dapr uses prometheus process and go collectors by default. [monitoring metrics](../../pkg/scheduler/monitoring/metrics.go) * dapr_scheduler_sidecars_connected_total: The total number of dapr sidecars connected to the scheduler service. -* dapr_scheduler_jobs_created_total: The total number of jobs scheduled (and therefore created). +* dapr_scheduler_jobs_created_total: The total number of jobs scheduled. * dapr_scheduler_jobs_triggered_total: The total number of successfully triggered jobs. * dapr_scheduler_trigger_duration_total: The total time it takes to trigger a job from the scheduler service. diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 80b1e12b95f..eb0421a591b 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -36,7 +36,7 @@ var ( stats.UnitDimensionless) jobsScheduledTotal = stats.Int64( "scheduler/jobs_created_total", - "The total number of jobs scheduled (and therefore created).", + "The total number of jobs scheduled.", stats.UnitDimensionless) jobsTriggeredTotal = stats.Int64( "scheduler/jobs_triggered_total", From aaa05f402adabdba144df4ee820513cefb125f8f Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 10:16:23 -0500 Subject: [PATCH 029/112] make lint Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/metrics/jobstriggered.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index b5ad501660c..c7e1425dc89 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -269,7 +269,6 @@ func (j *jobstriggered) getMetricVal(t *testing.T, ctx context.Context, client * require.NoError(t, err) metricValue = int64(metricElapsed) foundMetric = true - } } assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) From 5d3a5027367f3ec52bfd537bf5433e2800f2c76f Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 11:27:58 -0500 Subject: [PATCH 030/112] make lint Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 2 +- .../actors/reminders/scheduler/metrics.go | 31 +++++++++---------- .../suite/scheduler/metrics/basic.go | 6 ++-- .../scheduler/metrics/daprconnections.go | 2 +- .../suite/scheduler/metrics/jobstriggered.go | 8 ++--- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index eb0421a591b..83e91995204 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -88,7 +88,7 @@ func InitMetrics() error { diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{appIDKey}, view.Count()), diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), + diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), // nolint:mnd ) return err diff --git a/tests/integration/suite/actors/reminders/scheduler/metrics.go b/tests/integration/suite/actors/reminders/scheduler/metrics.go index 895d08213ab..ac41b5d4ada 100644 --- a/tests/integration/suite/actors/reminders/scheduler/metrics.go +++ b/tests/integration/suite/actors/reminders/scheduler/metrics.go @@ -33,8 +33,7 @@ import ( runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - clients "github.com/dapr/dapr/tests/integration/framework/client" - frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/placement" @@ -66,9 +65,9 @@ metadata: spec: features: - name: SchedulerReminders - enabled: true`), 0o600)) + enabled: true`), 0o600)) // nolint:mnd - fp := ports.Reserve(t, 2) + fp := ports.Reserve(t, 2) // nolint:mnd port1 := fp.Port(t) port2 := fp.Port(t) m.etcdPort = port2 @@ -111,13 +110,13 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { m.place.WaitUntilRunning(t, ctx) m.daprd.WaitUntilRunning(t, ctx) - frameworkClient := frameworkclient.HTTP(t) + httpClient := client.HTTP(t) - client := m.daprd.GRPCClient(t, ctx) + grpcClient := m.daprd.GRPCClient(t, ctx) - etcdClient := clients.Etcd(t, clientv3.Config{ + etcdClient := client.Etcd(t, clientv3.Config{ Endpoints: []string{fmt.Sprintf("localhost:%d", m.etcdPort)}, - DialTimeout: 5 * time.Second, + DialTimeout: 5 * time.Second, // nolint:mnd }) // Use "path/filepath" import, it is using OS specific path separator unlike "path" @@ -127,19 +126,19 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) - }, time.Second*10, 10*time.Millisecond) + }, time.Second*10, 10*time.Millisecond) // nolint:mnd // assert false, since count is 0 here - m.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", 0) + m.assertMetricExists(t, ctx, httpClient, "dapr_scheduler_jobs_created_total", 0) - _, err := client.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ + _, err := grpcClient.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ ActorType: "myactortype", ActorId: "myactorid", Method: "foo", }) require.NoError(t, err) - _, err = client.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ + _, err = grpcClient.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ ActorType: "myactortype", ActorId: "myactorid", Name: "remindermethod", @@ -152,14 +151,14 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) - }, time.Second*10, 10*time.Millisecond) + }, time.Second*10, 10*time.Millisecond) // nolint:mnd // true, since count is 1 - m.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", 1) + m.assertMetricExists(t, ctx, httpClient, "dapr_scheduler_jobs_created_total", 1) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, m.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greatrer or equal 1, actual value %d", m.triggered.Load())) + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greatrer or equal 1, actual value %d", m.triggered.Load()) // nolint:mnd } // assert the metric exists and the count is correct @@ -184,7 +183,7 @@ func (m *metrics) assertMetricExists(t *testing.T, ctx context.Context, client * } split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { + if len(split) != 2 { // nolint:mnd continue } diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go index fe223f41c3d..cb483ed3039 100644 --- a/tests/integration/suite/scheduler/metrics/basic.go +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -56,7 +56,7 @@ func (b *basic) Setup(t *testing.T) []framework.Option { require.NoError(t, err) b.idPrefix = uuid.String() - fp := ports.Reserve(t, 2) + fp := ports.Reserve(t, 2) // nolint:mnd port1 := fp.Port(t) port2 := fp.Port(t) @@ -84,7 +84,7 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { var err error b.etcdClient, err = clientv3.New(clientv3.Config{ Endpoints: []string{fmt.Sprintf("localhost:%d", b.etcdPort)}, - DialTimeout: 5 * time.Second, + DialTimeout: 5 * time.Second, // nolint:mnd }) require.NoError(t, err) t.Cleanup(func() { @@ -165,7 +165,7 @@ func (b *basic) assertMetricExists(t *testing.T, ctx context.Context, client *ht } split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { + if len(split) != 2 { // nolint:mnd continue } diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index c3d291777d3..27a2b352dc7 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -107,7 +107,7 @@ func (c *daprconnections) assertMetricExists(t *testing.T, ctx context.Context, } split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { + if len(split) != 2 { // nolint:mnd continue } diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index c7e1425dc89..31dad6fd545 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -126,7 +126,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { }, "ping": { data: func(t *testing.T) *anypb.Any { - anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) + anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) // nolint:mnd require.NoError(t, err) return anyB }, @@ -135,7 +135,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { var ping proto.PingResponse require.NoError(t, job.GetData().UnmarshalTo(&ping)) assert.Equal(t, "pong", ping.GetValue()) - assert.Equal(t, int32(123), ping.GetCounter()) + assert.Equal(t, int32(123), ping.GetCounter()) // nolint:mnd }, }, } @@ -168,13 +168,13 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { triggeredElapsed := j.getMetricVal(t, ctx, frameworkClient, "dapr_scheduler_trigger_duration_total") // ensure the trigger duration is less than 1 second (1000 milliseconds) - assert.Less(t, triggeredElapsed, int64(1000), "Trigger duration should be less than 1 second") + assert.Less(t, triggeredElapsed, int64(1000), "Trigger duration should be less than 1 second") // nolint:mnd // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app assert.Less(t, triggeredElapsed, receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") test.exp(t, job) - case <-time.After(time.Second * 10): + case <-time.After(time.Second * 10): // nolint:mnd assert.Fail(t, "timed out waiting for triggered job") } }) From d94c9d7cc55eb9650d449fde1082934d1421c1b3 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 21:37:41 -0500 Subject: [PATCH 031/112] update based on pr feedback. etcd client in scheduler process Signed-off-by: Cassandra Coyle --- .../framework/process/scheduler/scheduler.go | 12 ++++++++++++ .../suite/actors/reminders/scheduler/metrics.go | 10 ++-------- .../suite/actors/reminders/scheduler/remove.go | 13 +++---------- tests/integration/suite/daprd/jobs/remove.go | 13 +++---------- .../daprd/workflow/scheduler/deletereminder.go | 13 +++---------- tests/integration/suite/scheduler/api/remove.go | 13 +++---------- 6 files changed, 26 insertions(+), 48 deletions(-) diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 5ac08538fea..9c4c6883359 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -29,6 +29,7 @@ import ( "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -215,6 +216,17 @@ func (s *Scheduler) DataDir() string { return s.dataDir } +func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { + t.Helper() + + client := client.Etcd(t, clientv3.Config{ + Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, + DialTimeout: 40 * time.Second, // nolint:mnd + }) + + return client +} + func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.SchedulerClient { //nolint:staticcheck conn, err := grpc.DialContext(ctx, s.Address(), grpc.WithBlock(), grpc.WithReturnConnectionError(), diff --git a/tests/integration/suite/actors/reminders/scheduler/metrics.go b/tests/integration/suite/actors/reminders/scheduler/metrics.go index ac41b5d4ada..62bc86ed4dd 100644 --- a/tests/integration/suite/actors/reminders/scheduler/metrics.go +++ b/tests/integration/suite/actors/reminders/scheduler/metrics.go @@ -29,7 +29,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" @@ -114,16 +113,11 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { grpcClient := m.daprd.GRPCClient(t, ctx) - etcdClient := client.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", m.etcdPort)}, - DialTimeout: 5 * time.Second, // nolint:mnd - }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := m.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) // nolint:mnd @@ -148,7 +142,7 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := m.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) // nolint:mnd diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 63bec623c4f..461996c6da6 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -26,11 +26,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - clients "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/placement" @@ -109,16 +107,11 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { client := r.daprd.GRPCClient(t, ctx) - etcdClient := clients.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", r.etcdPort)}, - DialTimeout: 5 * time.Second, - }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) @@ -140,7 +133,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) @@ -157,7 +150,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index c604fa4815b..872f177ba5a 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -24,11 +24,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - clients "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" "github.com/dapr/dapr/tests/integration/framework/process/ports" @@ -89,16 +87,11 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { client := r.daprd.GRPCClient(t, ctx) - etcdClient := clients.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", r.etcdPort)}, - DialTimeout: 5 * time.Second, - }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) @@ -114,7 +107,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) @@ -129,7 +122,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index d961ddbe902..a43361731e9 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -27,11 +27,9 @@ import ( "github.com/microsoft/durabletask-go/task" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" - + rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - clients "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/placement" @@ -82,16 +80,11 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { d.place.WaitUntilRunning(t, ctx) d.daprd.WaitUntilRunning(t, ctx) - etcdClient := clients.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%s", d.scheduler.EtcdClientPort())}, - DialTimeout: 5 * time.Second, - }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := d.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) @@ -131,7 +124,7 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { assert.Equal(t, `"Hello, Dapr!"`, metadata.SerializedOutput) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := d.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*60, time.Millisecond*10) // account for cleanup time in etcd diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index 50cc1aff9df..6531505959f 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -23,11 +23,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" - "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/ports" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" @@ -70,11 +68,6 @@ func (r *remove) Setup(t *testing.T) []framework.Option { func (r *remove) Run(t *testing.T, ctx context.Context) { r.scheduler.WaitUntilRunning(t, ctx) - etcdClient := client.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", r.etcdPort)}, - DialTimeout: 5 * time.Second, - }) - client := r.scheduler.Client(t, ctx) watch, err := client.WatchJobs(ctx) @@ -108,7 +101,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) @@ -124,7 +117,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { })) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) @@ -142,7 +135,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) From 39b43a92f110b8ed283cc35980a1e285599f2e36 Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Mon, 23 Sep 2024 21:40:35 -0500 Subject: [PATCH 032/112] Apply suggestions from code review Co-authored-by: Josh van Leeuwen Signed-off-by: Cassie Coyle --- docs/development/dapr-metrics.md | 2 +- pkg/scheduler/monitoring/metrics.go | 15 +++++---------- .../suite/actors/reminders/scheduler/metrics.go | 13 ++++++++++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/development/dapr-metrics.md b/docs/development/dapr-metrics.md index ce4022dd8df..198990591c3 100644 --- a/docs/development/dapr-metrics.md +++ b/docs/development/dapr-metrics.md @@ -62,7 +62,7 @@ Dapr uses prometheus process and go collectors by default. * dapr_scheduler_sidecars_connected_total: The total number of dapr sidecars connected to the scheduler service. * dapr_scheduler_jobs_created_total: The total number of jobs scheduled. * dapr_scheduler_jobs_triggered_total: The total number of successfully triggered jobs. -* dapr_scheduler_trigger_duration_total: The total time it takes to trigger a job from the scheduler service. +* dapr_scheduler_trigger_latency: The latency of triggering jobs from the scheduler service. ## Dapr Runtime metrics diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 83e91995204..b4f8448154e 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -25,9 +25,6 @@ import ( schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" ) -const ( - appID = "app_id" -) var ( sidecarsConnectedTotal = stats.Int64( @@ -42,18 +39,16 @@ var ( "scheduler/jobs_triggered_total", "The total number of successfully triggered jobs.", stats.UnitDimensionless) - triggerDurationTotal = stats.Float64( - "scheduler/trigger_duration_total", + triggerLatency = stats.Float64( + "scheduler/trigger_latency", "The total time it takes to trigger a job from the scheduler service.", stats.UnitMilliseconds) - // appIDKey is a tag key for App ID. - appIDKey = tag.MustNewKey(appID) ) // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service -func RecordSidecarsConnectedCount(ns string, appID string) { - stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name(), appIDKey, ns, appID), sidecarsConnectedTotal.M(1)) +func RecordSidecarsConnectedCount( { + stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name()), sidecarsConnectedTotal.M(1)) } // RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service @@ -68,7 +63,7 @@ func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { jobType = "unknown" } - stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsScheduledTotal.Name(), appIDKey, jobMetadata.GetAppId(), jobType), jobsScheduledTotal.M(1)) + stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsScheduledTotal.Name(), jobType), jobsScheduledTotal.M(1)) } // RecordJobsTriggeredCount records the total number of jobs successfully triggered from the scheduler service diff --git a/tests/integration/suite/actors/reminders/scheduler/metrics.go b/tests/integration/suite/actors/reminders/scheduler/metrics.go index 62bc86ed4dd..861b167116d 100644 --- a/tests/integration/suite/actors/reminders/scheduler/metrics.go +++ b/tests/integration/suite/actors/reminders/scheduler/metrics.go @@ -51,7 +51,6 @@ type metrics struct { triggered atomic.Int64 daprd *daprd.Daprd - etcdPort int } func (m *metrics) Setup(t *testing.T) []framework.Option { @@ -91,14 +90,22 @@ spec: m.place = placement.New(t) m.daprd = daprd.New(t, - daprd.WithConfigs(configFile), + daprd.WithConfigManifests(t, ` +apiVersion: dapr.io/v1alpha1 +kind: Configuration +metadata: + name: schedulerreminders +spec: + features: + - name: SchedulerReminders + enabled: false +`), daprd.WithInMemoryActorStateStore("mystore"), daprd.WithPlacementAddresses(m.place.Address()), daprd.WithSchedulerAddresses(m.scheduler.Address()), daprd.WithAppPort(app.Port()), ) - fp.Free(t) return []framework.Option{ framework.WithProcesses(app, m.scheduler, m.place, m.daprd), } From 6b0be8021a8c4614b44b909e7ea3a2c126e0985b Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 23 Sep 2024 22:14:55 -0500 Subject: [PATCH 033/112] updates based on feedback Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 28 ++++++++----- pkg/scheduler/server/api.go | 4 +- tests/integration/framework/client/etcd.go | 14 +++++++ .../workflow/scheduler/deletereminder.go | 2 +- tests/integration/suite/scheduler/api/jobs.go | 42 +++---------------- .../metrics/actors.go} | 21 ++-------- .../suite/scheduler/metrics/basic.go | 41 +++--------------- .../suite/scheduler/metrics/jobstriggered.go | 6 +-- 8 files changed, 54 insertions(+), 104 deletions(-) rename tests/integration/suite/{actors/reminders/scheduler/metrics.go => scheduler/metrics/actors.go} (90%) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index b4f8448154e..e2609b4e877 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -25,7 +25,6 @@ import ( schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" ) - var ( sidecarsConnectedTotal = stats.Int64( "scheduler/sidecars_connected_total", @@ -43,11 +42,10 @@ var ( "scheduler/trigger_latency", "The total time it takes to trigger a job from the scheduler service.", stats.UnitMilliseconds) - ) // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service -func RecordSidecarsConnectedCount( { +func RecordSidecarsConnectedCount() { stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name()), sidecarsConnectedTotal.M(1)) } @@ -67,23 +65,33 @@ func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { } // RecordJobsTriggeredCount records the total number of jobs successfully triggered from the scheduler service -func RecordJobsTriggeredCount(ns string, appID string) { - stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsTriggeredTotal.Name(), appIDKey, ns, appID), jobsTriggeredTotal.M(1)) +func RecordJobsTriggeredCount(jobMetadata *schedulerv1pb.JobMetadata) { + var jobType string + switch jobMetadata.GetTarget().GetType().(type) { + case *schedulerv1pb.JobTargetMetadata_Job: + jobType = "job" + case *schedulerv1pb.JobTargetMetadata_Actor: + jobType = "actor" + default: + jobType = "unknown" + } + + stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsTriggeredTotal.Name(), jobType), jobsTriggeredTotal.M(1)) } // RecordTriggerDuration records the time it takes to send the job to dapr from the scheduler service func RecordTriggerDuration(ns string, appID string, start time.Time) { elapsed := time.Since(start).Milliseconds() - stats.RecordWithTags(context.Background(), diagUtils.WithTags(triggerDurationTotal.Name(), appIDKey, ns, appID), triggerDurationTotal.M(float64(elapsed))) + stats.RecordWithTags(context.Background(), diagUtils.WithTags(triggerLatency.Name(), ns, appID), triggerLatency.M(float64(elapsed))) } // InitMetrics initialize the scheduler service metrics. func InitMetrics() error { err := view.Register( - diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{appIDKey}, view.Count()), - diagUtils.NewMeasureView(triggerDurationTotal, []tag.Key{appIDKey}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), // nolint:mnd + diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{}, view.Count()), + diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), + diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), + diagUtils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), // nolint:mnd ) return err diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 24437f3d4d4..7986ed09772 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -146,7 +146,7 @@ func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error } s.connectionPool.Add(req.GetInitial(), stream) - monitoring.RecordSidecarsConnectedCount(req.GetInitial().GetNamespace(), req.GetInitial().GetAppId()) + monitoring.RecordSidecarsConnectedCount() select { case <-s.closeCh: @@ -186,7 +186,7 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { } monitoring.RecordTriggerDuration(meta.GetNamespace(), meta.GetAppId(), now) - monitoring.RecordJobsTriggeredCount(meta.GetNamespace(), meta.GetAppId()) + monitoring.RecordJobsTriggeredCount(&meta) return true } diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index d36068d1ae7..7b82022dec2 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -64,3 +64,17 @@ func (c *EtcdClient) ListAllKeys(ctx context.Context, prefix string) ([]string, return r, nil } + +func (c *EtcdClient) Get(ctx context.Context, prefix string, opts ...clientv3.OpOption) ([]string, error) { + resp, err := c.client.Get(ctx, prefix, opts...) + if err != nil { + return nil, err + } + + var keys []string + for _, kv := range resp.Kvs { + keys = append(keys, string(kv.Key)) + } + + return keys, nil +} diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index a43361731e9..869fa4781d3 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -27,7 +27,7 @@ import ( "github.com/microsoft/durabletask-go/task" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - + rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/daprd" diff --git a/tests/integration/suite/scheduler/api/jobs.go b/tests/integration/suite/scheduler/api/jobs.go index 747f487f53e..d657a526292 100644 --- a/tests/integration/suite/scheduler/api/jobs.go +++ b/tests/integration/suite/scheduler/api/jobs.go @@ -15,11 +15,9 @@ package api import ( "context" - "fmt" "strconv" "strings" "testing" - "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" @@ -29,7 +27,6 @@ import ( schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" - "github.com/dapr/dapr/tests/integration/framework/process/ports" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" "github.com/dapr/kit/ptr" @@ -43,9 +40,7 @@ func init() { type jobs struct { scheduler *scheduler.Scheduler - etcdPort int - etcdClient *clientv3.Client - idPrefix string + idPrefix string } func (j *jobs) Setup(t *testing.T) []framework.Option { @@ -53,41 +48,16 @@ func (j *jobs) Setup(t *testing.T) []framework.Option { require.NoError(t, err) j.idPrefix = uuid.String() - fp := ports.Reserve(t, 2) - port1 := fp.Port(t) - port2 := fp.Port(t) + j.scheduler = scheduler.New(t) - j.etcdPort = port2 - - clientPorts := []string{ - "scheduler-0=" + strconv.Itoa(j.etcdPort), - } - j.scheduler = scheduler.New(t, - scheduler.WithID("scheduler-0"), - scheduler.WithInitialCluster(fmt.Sprintf("scheduler-0=http://localhost:%d", port1)), - scheduler.WithInitialClusterPorts(port1), - scheduler.WithEtcdClientPorts(clientPorts), - ) - - fp.Free(t) return []framework.Option{ - framework.WithProcesses(fp, j.scheduler), + framework.WithProcesses(j.scheduler), } } func (j *jobs) Run(t *testing.T, ctx context.Context) { j.scheduler.WaitUntilRunning(t, ctx) - var err error - j.etcdClient, err = clientv3.New(clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", j.etcdPort)}, - DialTimeout: 5 * time.Second, - }) - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, j.etcdClient.Close()) - }) - client := j.scheduler.Client(t, ctx) t.Run("CRUD 10 jobs", func(t *testing.T) { @@ -161,11 +131,11 @@ func (j *jobs) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { t.Helper() // Get keys with prefix - resp, err := j.etcdClient.Get(ctx, "", clientv3.WithPrefix()) + keys, err := j.scheduler.ETCDClient(t).Get(ctx, "", clientv3.WithPrefix()) require.NoError(t, err) - for _, kv := range resp.Kvs { - if strings.HasSuffix(string(kv.Key), "||"+key) { + for _, k := range keys { + if strings.HasSuffix(k, "||"+key) { return true } } diff --git a/tests/integration/suite/actors/reminders/scheduler/metrics.go b/tests/integration/suite/scheduler/metrics/actors.go similarity index 90% rename from tests/integration/suite/actors/reminders/scheduler/metrics.go rename to tests/integration/suite/scheduler/metrics/actors.go index 861b167116d..ca69395c53d 100644 --- a/tests/integration/suite/actors/reminders/scheduler/metrics.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package scheduler +package metrics import ( "bytes" @@ -36,7 +36,6 @@ import ( "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/placement" - "github.com/dapr/dapr/tests/integration/framework/process/ports" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" ) @@ -50,7 +49,7 @@ type metrics struct { scheduler *scheduler.Scheduler triggered atomic.Int64 - daprd *daprd.Daprd + daprd *daprd.Daprd } func (m *metrics) Setup(t *testing.T) []framework.Option { @@ -65,19 +64,7 @@ spec: - name: SchedulerReminders enabled: true`), 0o600)) // nolint:mnd - fp := ports.Reserve(t, 2) // nolint:mnd - port1 := fp.Port(t) - port2 := fp.Port(t) - m.etcdPort = port2 - clientPorts := []string{ - "scheduler-0=" + strconv.Itoa(m.etcdPort), - } - m.scheduler = scheduler.New(t, - scheduler.WithID("scheduler-0"), - scheduler.WithInitialCluster(fmt.Sprintf("scheduler-0=http://localhost:%d", port1)), - scheduler.WithInitialClusterPorts(port1), - scheduler.WithEtcdClientPorts(clientPorts), - ) + m.scheduler = scheduler.New(t) app := app.New(t, app.WithHandlerFunc("/actors/myactortype/myactorid/method/remind/remindermethod", func(http.ResponseWriter, *http.Request) { @@ -159,7 +146,7 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, m.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greatrer or equal 1, actual value %d", m.triggered.Load()) // nolint:mnd + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", m.triggered.Load()) // nolint:mnd } // assert the metric exists and the count is correct diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go index cb483ed3039..a849bda07e1 100644 --- a/tests/integration/suite/scheduler/metrics/basic.go +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -22,7 +22,6 @@ import ( "strconv" "strings" "testing" - "time" "github.com/google/uuid" "github.com/stretchr/testify/assert" @@ -33,7 +32,6 @@ import ( schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" - "github.com/dapr/dapr/tests/integration/framework/process/ports" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" "github.com/dapr/kit/ptr" @@ -46,9 +44,7 @@ func init() { type basic struct { scheduler *scheduler.Scheduler - etcdPort int - etcdClient *clientv3.Client - idPrefix string + idPrefix string } func (b *basic) Setup(t *testing.T) []framework.Option { @@ -56,41 +52,16 @@ func (b *basic) Setup(t *testing.T) []framework.Option { require.NoError(t, err) b.idPrefix = uuid.String() - fp := ports.Reserve(t, 2) // nolint:mnd - port1 := fp.Port(t) - port2 := fp.Port(t) + b.scheduler = scheduler.New(t) - b.etcdPort = port2 - - clientPorts := []string{ - "scheduler-0=" + strconv.Itoa(b.etcdPort), - } - b.scheduler = scheduler.New(t, - scheduler.WithID("scheduler-0"), - scheduler.WithInitialCluster(fmt.Sprintf("scheduler-0=http://localhost:%d", port1)), - scheduler.WithInitialClusterPorts(port1), - scheduler.WithEtcdClientPorts(clientPorts), - ) - - fp.Free(t) return []framework.Option{ - framework.WithProcesses(fp, b.scheduler), + framework.WithProcesses(b.scheduler), } } func (b *basic) Run(t *testing.T, ctx context.Context) { b.scheduler.WaitUntilRunning(t, ctx) - var err error - b.etcdClient, err = clientv3.New(clientv3.Config{ - Endpoints: []string{fmt.Sprintf("localhost:%d", b.etcdPort)}, - DialTimeout: 5 * time.Second, // nolint:mnd - }) - require.NoError(t, err) - t.Cleanup(func() { - require.NoError(t, b.etcdClient.Close()) - }) - frameworkClient := frameworkclient.HTTP(t) client := b.scheduler.Client(t, ctx) @@ -131,11 +102,11 @@ func (b *basic) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { t.Helper() // Get keys with prefix - resp, err := b.etcdClient.Get(ctx, "", clientv3.WithPrefix()) + keys, err := b.scheduler.ETCDClient(t).Get(ctx, "", clientv3.WithPrefix()) require.NoError(t, err) - for _, kv := range resp.Kvs { - if strings.HasSuffix(string(kv.Key), "||"+key) { + for _, k := range keys { + if strings.HasSuffix(k, "||"+key) { return true } } diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index 31dad6fd545..799afe54c72 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -165,7 +165,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { // with duration metrics, the following metrics can be found: // dapr_scheduler_trigger_duration_total_bucket // dapr_scheduler_trigger_duration_total_sum - triggeredElapsed := j.getMetricVal(t, ctx, frameworkClient, "dapr_scheduler_trigger_duration_total") + triggeredElapsed := j.getMetricVal(t, ctx, frameworkClient, "dapr_scheduler_trigger_latency") // ensure the trigger duration is less than 1 second (1000 milliseconds) assert.Less(t, triggeredElapsed, int64(1000), "Trigger duration should be less than 1 second") // nolint:mnd @@ -262,8 +262,8 @@ func (j *jobstriggered) getMetricVal(t *testing.T, ctx context.Context, client * continue } - // dapr_scheduler_trigger_duration_total_bucket - // dapr_scheduler_trigger_duration_total_sum + // dapr_scheduler_trigger_latency_bucket + // dapr_scheduler_trigger_latency_sum if strings.Contains(metricName, expectedMetric) { metricElapsed, err := strconv.ParseFloat(metricVal, 64) require.NoError(t, err) From e8e557e9427b1a5063e4d77a27e9081d74265bb2 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 30 Sep 2024 14:32:18 -0500 Subject: [PATCH 034/112] move Metrics() to int/scheduler dir and cleanup tests by using it. fix actor config test Signed-off-by: Cassandra Coyle --- .../framework/process/scheduler/scheduler.go | 66 ++++++++- .../suite/scheduler/metrics/actors.go | 118 ++++------------ .../suite/scheduler/metrics/basic.go | 54 +------- .../scheduler/metrics/daprconnections.go | 58 +------- .../suite/scheduler/metrics/jobstriggered.go | 130 +++--------------- 5 files changed, 111 insertions(+), 315 deletions(-) diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 9c4c6883359..01e0f35f3dc 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -26,6 +26,7 @@ import ( "time" "github.com/google/uuid" + "github.com/prometheus/common/expfmt" "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,9 +48,10 @@ import ( ) type Scheduler struct { - exec process.Interface - ports *ports.Ports - running atomic.Bool + exec process.Interface + ports *ports.Ports + running atomic.Bool + httpClient *http.Client port int healthzPort int @@ -140,6 +142,7 @@ func New(t *testing.T, fopts ...Option) *Scheduler { ))..., ), ports: fp, + httpClient: client.HTTP(t), id: opts.id, port: opts.port, healthzPort: opts.healthzPort, @@ -277,3 +280,60 @@ func (s *Scheduler) ClientMTLS(t *testing.T, ctx context.Context, appID string) return schedulerv1pb.NewSchedulerClient(conn) } + +func (s *Scheduler) ipPort(port int) string { + return "127.0.0.1:" + strconv.Itoa(port) +} + +func (s *Scheduler) MetricsAddress() string { + return s.ipPort(s.MetricsPort()) +} + +// Metrics returns a subset of metrics scraped from the metrics endpoint +func (s *Scheduler) Metrics(t *testing.T, ctx context.Context) map[string]float64 { + t.Helper() + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://%s/metrics", s.MetricsAddress()), nil) + require.NoError(t, err) + + resp, err := s.httpClient.Do(req) + require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode) + + // Extract the metrics + parser := expfmt.TextParser{} + metricFamilies, err := parser.TextToMetricFamilies(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + + metrics := make(map[string]float64) + for _, mf := range metricFamilies { + for _, m := range mf.GetMetric() { + metricName := mf.GetName() + labels := "" + for _, l := range m.GetLabel() { + labels += "|" + l.GetName() + ":" + l.GetValue() + } + if counter := m.GetCounter(); counter != nil { + metrics[metricName+labels] = counter.GetValue() + continue + } + if gauge := m.GetGauge(); gauge != nil { + metrics[metricName+labels] = gauge.GetValue() + continue + } + h := m.GetHistogram() + if h == nil { + continue + } + for _, b := range h.GetBucket() { + bucketKey := metricName + "_bucket" + labels + "|le:" + strconv.FormatUint(uint64(b.GetUpperBound()), 10) + metrics[bucketKey] = float64(b.GetCumulativeCount()) + } + metrics[metricName+"_count"+labels] = float64(h.GetSampleCount()) + metrics[metricName+"_sum"+labels] = h.GetSampleSum() + } + } + + return metrics +} diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index ca69395c53d..beaad0b362f 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -14,15 +14,9 @@ limitations under the License. package metrics import ( - "bytes" "context" - "fmt" - "io" "net/http" - "os" "path/filepath" - "strconv" - "strings" "sync/atomic" "testing" "time" @@ -32,7 +26,6 @@ import ( runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/placement" @@ -41,10 +34,10 @@ import ( ) func init() { - suite.Register(new(metrics)) + suite.Register(new(actors)) } -type metrics struct { +type actors struct { place *placement.Placement scheduler *scheduler.Scheduler triggered atomic.Int64 @@ -52,31 +45,19 @@ type metrics struct { daprd *daprd.Daprd } -func (m *metrics) Setup(t *testing.T) []framework.Option { - configFile := filepath.Join(t.TempDir(), "config.yaml") - require.NoError(t, os.WriteFile(configFile, []byte(` -apiVersion: dapr.io/v1alpha1 -kind: Configuration -metadata: - name: schedulerreminders -spec: - features: - - name: SchedulerReminders - enabled: true`), 0o600)) // nolint:mnd - - m.scheduler = scheduler.New(t) +func (a *actors) Setup(t *testing.T) []framework.Option { + a.scheduler = scheduler.New(t) app := app.New(t, app.WithHandlerFunc("/actors/myactortype/myactorid/method/remind/remindermethod", func(http.ResponseWriter, *http.Request) { - m.triggered.Add(1) + a.triggered.Add(1) }), app.WithHandlerFunc("/actors/myactortype/myactorid/method/foo", func(http.ResponseWriter, *http.Request) {}), app.WithConfig(`{"entities": ["myactortype"]}`), ) - m.place = placement.New(t) - - m.daprd = daprd.New(t, + a.place = placement.New(t) + a.daprd = daprd.New(t, daprd.WithConfigManifests(t, ` apiVersion: dapr.io/v1alpha1 kind: Configuration @@ -85,39 +66,37 @@ metadata: spec: features: - name: SchedulerReminders - enabled: false + enabled: true `), daprd.WithInMemoryActorStateStore("mystore"), - daprd.WithPlacementAddresses(m.place.Address()), - daprd.WithSchedulerAddresses(m.scheduler.Address()), + daprd.WithPlacementAddresses(a.place.Address()), + daprd.WithSchedulerAddresses(a.scheduler.Address()), daprd.WithAppPort(app.Port()), ) return []framework.Option{ - framework.WithProcesses(app, m.scheduler, m.place, m.daprd), + framework.WithProcesses(app, a.scheduler, a.place, a.daprd), } } -func (m *metrics) Run(t *testing.T, ctx context.Context) { - m.scheduler.WaitUntilRunning(t, ctx) - m.place.WaitUntilRunning(t, ctx) - m.daprd.WaitUntilRunning(t, ctx) +func (a *actors) Run(t *testing.T, ctx context.Context) { + a.scheduler.WaitUntilRunning(t, ctx) + a.place.WaitUntilRunning(t, ctx) + a.daprd.WaitUntilRunning(t, ctx) - httpClient := client.HTTP(t) - - grpcClient := m.daprd.GRPCClient(t, ctx) + grpcClient := a.daprd.GRPCClient(t, ctx) // Use "path/filepath" import, it is using OS specific path separator unlike "path" etcdKeysPrefix := filepath.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := m.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) }, time.Second*10, 10*time.Millisecond) // nolint:mnd - // assert false, since count is 0 here - m.assertMetricExists(t, ctx, httpClient, "dapr_scheduler_jobs_created_total", 0) + metrics := a.scheduler.Metrics(t, ctx) + assert.Equal(t, 0, int(metrics["dapr_scheduler_jobs_created_total"])) _, err := grpcClient.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ ActorType: "myactortype", @@ -135,63 +114,16 @@ func (m *metrics) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) + metrics = a.scheduler.Metrics(t, ctx) + assert.Equal(t, 1, int(metrics["dapr_scheduler_jobs_created_total"])) + assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := m.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) + keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) }, time.Second*10, 10*time.Millisecond) // nolint:mnd - // true, since count is 1 - m.assertMetricExists(t, ctx, httpClient, "dapr_scheduler_jobs_created_total", 1) - assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.GreaterOrEqual(c, m.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", m.triggered.Load()) // nolint:mnd -} - -// assert the metric exists and the count is correct -func (m *metrics) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { - t.Helper() - - metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", m.scheduler.MetricsPort()), nil) - require.NoError(t, err) - - resp, err := client.Do(metricReq) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - foundMetric := false - - for _, line := range bytes.Split(respBody, []byte("\n")) { - if len(line) == 0 || line[0] == '#' { - continue - } - - split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { // nolint:mnd - continue - } - - // dapr_scheduler_jobs_created_total{app_id="appid"} - metricName := string(split[0]) - metricVal := string(split[1]) - if !strings.Contains(metricName, expectedMetric) { - continue - } - if strings.Contains(metricName, expectedMetric) { - metricCount, err := strconv.Atoi(metricVal) - require.NoError(t, err) - assert.Equal(t, expectedCount, metricCount) - foundMetric = true - break - } - } - if expectedCount > 0 { - assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) - } else { - assert.False(t, foundMetric) - } + assert.GreaterOrEqual(c, a.triggered.Load(), int64(1)) + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", a.triggered.Load()) // nolint:mnd } diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go index a849bda07e1..87448a3f204 100644 --- a/tests/integration/suite/scheduler/metrics/basic.go +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -14,11 +14,7 @@ limitations under the License. package metrics import ( - "bytes" "context" - "fmt" - "io" - "net/http" "strconv" "strings" "testing" @@ -31,7 +27,6 @@ import ( schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" - frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" "github.com/dapr/kit/ptr" @@ -61,8 +56,6 @@ func (b *basic) Setup(t *testing.T) []framework.Option { func (b *basic) Run(t *testing.T, ctx context.Context) { b.scheduler.WaitUntilRunning(t, ctx) - - frameworkClient := frameworkclient.HTTP(t) client := b.scheduler.Client(t, ctx) t.Run("create 10 jobs, ensure metrics", func(t *testing.T) { @@ -92,8 +85,8 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.True(t, b.etcdHasJob(t, ctx, name)) - - b.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_created_total", i) + metrics := b.scheduler.Metrics(t, ctx) + assert.Equal(t, i, int(metrics["dapr_scheduler_jobs_created_total"])) } }) } @@ -113,46 +106,3 @@ func (b *basic) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { return false } - -// assert the metric exists and the count is correct -func (b *basic) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { - t.Helper() - - metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", b.scheduler.MetricsPort()), nil) - require.NoError(t, err) - - resp, err := client.Do(metricReq) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - foundMetric := false - - for _, line := range bytes.Split(respBody, []byte("\n")) { - if len(line) == 0 || line[0] == '#' { - continue - } - - split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { // nolint:mnd - continue - } - - // dapr_scheduler_jobs_created_total{app_id="appid"} - metricName := string(split[0]) - metricVal := string(split[1]) - if !strings.Contains(metricName, expectedMetric) { - continue - } - if strings.Contains(metricName, expectedMetric) { - metricCount, err := strconv.Atoi(metricVal) - require.NoError(t, err) - assert.Equal(t, expectedCount, metricCount) - foundMetric = true - break - } - } - assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) -} diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 27a2b352dc7..0bd86650e04 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -14,20 +14,12 @@ limitations under the License. package metrics import ( - "bytes" "context" - "fmt" - "io" - "net/http" - "strconv" - "strings" "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - + "github.com/dapr/dapr/tests/integration/framework" - "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/exec" "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" @@ -76,54 +68,10 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.scheduler.WaitUntilRunning(t, ctx) c.daprd.WaitUntilRunning(t, ctx) - client := client.HTTP(t) - t.Run("ensure dapr connection with scheduler metric", func(t *testing.T) { - c.assertMetricExists(t, ctx, client, "dapr_scheduler_sidecars_connected_total", 1) + metrics := c.scheduler.Metrics(t, ctx) + assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) }) c.connectionlogline.EventuallyFoundAll(t) } - -// assert the metric exists and the count is correct -func (c *daprconnections) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { - t.Helper() - - metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", c.scheduler.MetricsPort()), nil) - require.NoError(t, err) - - resp, err := client.Do(metricReq) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - foundMetric := false - - for _, line := range bytes.Split(respBody, []byte("\n")) { - if len(line) == 0 || line[0] == '#' { - continue - } - - split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { // nolint:mnd - continue - } - - // dapr_scheduler_sidecars_connected_total{app_id="appid"} - metricName := string(split[0]) - metricVal := string(split[1]) - if !strings.Contains(metricName, expectedMetric) { - continue - } - if strings.Contains(metricName, expectedMetric) { - metricCount, err := strconv.Atoi(metricVal) - require.NoError(t, err) - assert.Equal(t, expectedCount, metricCount) - foundMetric = true - break - } - } - assert.True(t, foundMetric, "Expected metric %s not found", expectedMetric) -} diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index 799afe54c72..78510aca1fd 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -16,11 +16,6 @@ package metrics import ( "bytes" "context" - "fmt" - "io" - "net/http" - "strconv" - "strings" "sync/atomic" "testing" "time" @@ -34,7 +29,6 @@ import ( commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" "github.com/dapr/dapr/tests/integration/framework" - frameworkclient "github.com/dapr/dapr/tests/integration/framework/client" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" "github.com/dapr/dapr/tests/integration/framework/process/grpc/app/proto" @@ -48,8 +42,9 @@ func init() { } type jobstriggered struct { - daprd *daprd.Daprd - scheduler *scheduler.Scheduler + daprd *daprd.Daprd + scheduler *scheduler.Scheduler + jobChan chan *runtimev1pb.JobEventRequest jobstriggeredCount atomic.Int32 } @@ -140,7 +135,6 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { }, } - frameworkClient := frameworkclient.HTTP(t) client := j.daprd.GRPCClient(t, ctx) for name, test := range tests { t.Run(name, func(t *testing.T) { @@ -160,18 +154,24 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { assert.NotNil(t, job) assert.Equal(t, "job/"+name, job.GetMethod()) assert.Equal(t, commonv1pb.HTTPExtension_POST, job.GetHttpExtension().GetVerb()) - j.assertMetricExists(t, ctx, frameworkClient, "dapr_scheduler_jobs_triggered_total", int(j.jobstriggeredCount.Load())) - // with duration metrics, the following metrics can be found: - // dapr_scheduler_trigger_duration_total_bucket - // dapr_scheduler_trigger_duration_total_sum - triggeredElapsed := j.getMetricVal(t, ctx, frameworkClient, "dapr_scheduler_trigger_latency") + assert.EventuallyWithT(t, func(c *assert.CollectT) { + metrics := j.scheduler.Metrics(t, ctx) + assert.Equal(t, int(j.jobstriggeredCount.Load()), int(metrics["dapr_scheduler_jobs_triggered_total"])) + + // with duration metrics, the following metrics can be found: + // dapr_scheduler_trigger_duration_total_bucket + // dapr_scheduler_trigger_duration_total_sum + // dapr_scheduler_trigger_latency_count + avgTriggerLatency := metrics["dapr_scheduler_trigger_latency_sum"] / metrics["dapr_scheduler_trigger_latency_count"] + assert.Equal(t, int(j.jobstriggeredCount.Load()), int(metrics["dapr_scheduler_trigger_latency_count"])) - // ensure the trigger duration is less than 1 second (1000 milliseconds) - assert.Less(t, triggeredElapsed, int64(1000), "Trigger duration should be less than 1 second") // nolint:mnd + // ensure the trigger duration is less than 1 second (1000 milliseconds) + assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") // nolint:mnd - // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app - assert.Less(t, triggeredElapsed, receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") + // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app + assert.Less(t, int64(avgTriggerLatency), receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") + }, time.Second*3, 10*time.Millisecond) // nolint:mnd test.exp(t, job) case <-time.After(time.Second * 10): // nolint:mnd @@ -181,97 +181,3 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { } assert.Equal(t, len(tests), int(j.jobstriggeredCount.Load())) } - -// assert the metric exists and the count is correct -func (j *jobstriggered) assertMetricExists(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string, expectedCount int) { - t.Helper() - - require.EventuallyWithT(t, func(c *assert.CollectT) { - metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", j.scheduler.MetricsPort()), nil) - require.NoError(t, err) - - resp, err := client.Do(metricReq) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - foundMetric := false - - for _, line := range bytes.Split(respBody, []byte("\n")) { - if len(line) == 0 || line[0] == '#' { - continue - } - - split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { - continue - } - - // dapr_scheduler_jobs_triggered_total{app_id="appid"} - metricName := string(split[0]) - metricVal := string(split[1]) - if !strings.Contains(metricName, expectedMetric) { - continue - } - if strings.Contains(metricName, expectedMetric) { - metricCount, err := strconv.Atoi(metricVal) - require.NoError(t, err) - assert.Equal(t, expectedCount, metricCount) - foundMetric = true - break - } - } - assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) - }, time.Second*1, time.Millisecond*10, "Expected metric %s not found or the count was incorrect", expectedMetric) -} - -// for duration metrics, send back the value -func (j *jobstriggered) getMetricVal(t *testing.T, ctx context.Context, client *http.Client, expectedMetric string) int64 { - t.Helper() - - var metricValue int64 - require.EventuallyWithT(t, func(c *assert.CollectT) { - metricReq, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/metrics", j.scheduler.MetricsPort()), nil) - require.NoError(t, err) - - resp, err := client.Do(metricReq) - require.NoError(t, err) - - respBody, err := io.ReadAll(resp.Body) - require.NoError(t, err) - require.NoError(t, resp.Body.Close()) - - foundMetric := false - - for _, line := range bytes.Split(respBody, []byte("\n")) { - if len(line) == 0 || line[0] == '#' { - continue - } - - split := bytes.Split(line, []byte(" ")) - if len(split) != 2 { - continue - } - - metricName := string(split[0]) - metricVal := string(split[1]) - - if !strings.Contains(metricName, expectedMetric) { - continue - } - - // dapr_scheduler_trigger_latency_bucket - // dapr_scheduler_trigger_latency_sum - if strings.Contains(metricName, expectedMetric) { - metricElapsed, err := strconv.ParseFloat(metricVal, 64) - require.NoError(t, err) - metricValue = int64(metricElapsed) - foundMetric = true - } - } - assert.True(c, foundMetric, "Expected metric %s not found", expectedMetric) - }, time.Second*1, time.Millisecond*10, "Expected metric %s not found or the value was incorrect", expectedMetric) - return metricValue -} From 08c1fd12821018be7943d4f7188d48cd7b5bea57 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 30 Sep 2024 14:33:58 -0500 Subject: [PATCH 035/112] fix typo Signed-off-by: Cassandra Coyle --- tests/integration/suite/actors/reminders/scheduler/remove.go | 2 +- tests/integration/suite/scheduler/metrics/daprconnections.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 461996c6da6..3c0aee5eff1 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -140,7 +140,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, r.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greatrer or equal 1, actual value %d", r.triggered.Load())) + }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greater or equal 1, actual value %d", r.triggered.Load())) _, err = client.UnregisterActorReminder(ctx, &runtimev1pb.UnregisterActorReminderRequest{ ActorType: "myactortype", diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 0bd86650e04..3ad5b490981 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -18,7 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - + "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/exec" From fde72c71e6d7605da715f503b58c481b9d82d41d Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 30 Sep 2024 15:29:27 -0500 Subject: [PATCH 036/112] update daprconnections test to rm logline Signed-off-by: Cassandra Coyle --- .../scheduler/metrics/daprconnections.go | 71 +++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 3ad5b490981..c3e1831636b 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -16,14 +16,13 @@ package metrics import ( "context" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/daprd" - "github.com/dapr/dapr/tests/integration/framework/process/exec" "github.com/dapr/dapr/tests/integration/framework/process/grpc/app" - "github.com/dapr/dapr/tests/integration/framework/process/logline" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" ) @@ -34,25 +33,30 @@ func init() { type daprconnections struct { scheduler *scheduler.Scheduler - daprd *daprd.Daprd - - connectionlogline *logline.LogLine + daprdA *daprd.Daprd + daprdB *daprd.Daprd + daprdC *daprd.Daprd } func (c *daprconnections) Setup(t *testing.T) []framework.Option { - c.connectionlogline = logline.New(t, - logline.WithStdoutLineContains( - `Adding a Sidecar connection to Scheduler for appID: default/C`, - ), + c.scheduler = scheduler.New(t) + srv := app.New(t) + + c.daprdA = daprd.New(t, + daprd.WithSchedulerAddresses(c.scheduler.Address()), + daprd.WithAppProtocol("grpc"), + daprd.WithAppPort(srv.Port(t)), + daprd.WithAppID("A"), ) - c.scheduler = scheduler.New(t, - scheduler.WithLogLevel("debug"), - scheduler.WithExecOptions( - exec.WithStdout(c.connectionlogline.Stdout()), - ), + + c.daprdB = daprd.New(t, + daprd.WithSchedulerAddresses(c.scheduler.Address()), + daprd.WithAppProtocol("grpc"), + daprd.WithAppPort(srv.Port(t)), + daprd.WithAppID("B"), ) - srv := app.New(t) - c.daprd = daprd.New(t, + + c.daprdC = daprd.New(t, daprd.WithSchedulerAddresses(c.scheduler.Address()), daprd.WithAppProtocol("grpc"), daprd.WithAppPort(srv.Port(t)), @@ -60,18 +64,43 @@ func (c *daprconnections) Setup(t *testing.T) []framework.Option { ) return []framework.Option{ - framework.WithProcesses(c.connectionlogline, srv, c.scheduler, c.daprd), + framework.WithProcesses(srv, c.scheduler), } } func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.scheduler.WaitUntilRunning(t, ctx) - c.daprd.WaitUntilRunning(t, ctx) t.Run("ensure dapr connection with scheduler metric", func(t *testing.T) { + // 0 sidecars connected metrics := c.scheduler.Metrics(t, ctx) - assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) - }) + assert.Equal(t, 0, int(metrics["dapr_scheduler_sidecars_connected_total"])) + + // 1 sidecar connected + c.daprdA.Run(t, ctx) + t.Cleanup(func() { c.daprdA.Cleanup(t) }) + c.daprdA.WaitUntilRunning(t, ctx) + metrics = c.scheduler.Metrics(t, ctx) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) + }, 10*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") // nolint:mnd - c.connectionlogline.EventuallyFoundAll(t) + // 2 sidecars connected + c.daprdB.Run(t, ctx) + t.Cleanup(func() { c.daprdB.Cleanup(t) }) + c.daprdB.WaitUntilRunning(t, ctx) + metrics = c.scheduler.Metrics(t, ctx) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + assert.Equal(t, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) + }, 10*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") // nolint:mnd + + // 3 sidecars connected + c.daprdC.Run(t, ctx) + t.Cleanup(func() { c.daprdC.Cleanup(t) }) + c.daprdC.WaitUntilRunning(t, ctx) + metrics = c.scheduler.Metrics(t, ctx) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + assert.Equal(t, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) + }, 10*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") // nolint:mnd + }) } From f4fc307a9da953d79c30536a54ca37d4ff91a90b Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 13:01:20 -0500 Subject: [PATCH 037/112] fix some lint issues Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 2 +- .../framework/process/scheduler/scheduler.go | 4 ++-- .../suite/actors/reminders/scheduler/remove.go | 2 +- tests/integration/suite/scheduler/metrics/actors.go | 6 +++--- .../suite/scheduler/metrics/daprconnections.go | 10 +++++----- .../suite/scheduler/metrics/jobstriggered.go | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index e2609b4e877..a177851054f 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -91,7 +91,7 @@ func InitMetrics() error { diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{}, view.Count()), diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), - diagUtils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), // nolint:mnd + diagUtils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), //nolint:mnd ) return err diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 01e0f35f3dc..302460cd01c 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -223,8 +223,8 @@ func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { t.Helper() client := client.Etcd(t, clientv3.Config{ - Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, - DialTimeout: 40 * time.Second, // nolint:mnd + Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, + DialTimeout: 40 * time.Second, //nolint:mnd }) return client diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 3c0aee5eff1..6562498f10e 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -140,7 +140,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, r.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greater or equal 1, actual value %d", r.triggered.Load())) + }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greater or equal 1, actual value %d", r.triggered.Load())) //nolint:mnd _, err = client.UnregisterActorReminder(ctx, &runtimev1pb.UnregisterActorReminderRequest{ ActorType: "myactortype", diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index beaad0b362f..2806c064370 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -93,7 +93,7 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) - }, time.Second*10, 10*time.Millisecond) // nolint:mnd + }, time.Second*10, 10*time.Millisecond) //nolint:mnd metrics := a.scheduler.Metrics(t, ctx) assert.Equal(t, 0, int(metrics["dapr_scheduler_jobs_created_total"])) @@ -121,9 +121,9 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) - }, time.Second*10, 10*time.Millisecond) // nolint:mnd + }, time.Second*10, 10*time.Millisecond) //nolint:mnd assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, a.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", a.triggered.Load()) // nolint:mnd + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", a.triggered.Load()) //nolint:mnd } diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index c3e1831636b..7936dc656b7 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -83,7 +83,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) - }, 10*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") // nolint:mnd + }, 10*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd // 2 sidecars connected c.daprdB.Run(t, ctx) @@ -91,8 +91,8 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.daprdB.WaitUntilRunning(t, ctx) metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.Equal(t, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) - }, 10*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") // nolint:mnd + assert.Equal(t, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + }, 10*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd // 3 sidecars connected c.daprdC.Run(t, ctx) @@ -100,7 +100,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.daprdC.WaitUntilRunning(t, ctx) metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.Equal(t, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) - }, 10*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") // nolint:mnd + assert.Equal(t, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + }, 10*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd }) } diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index 78510aca1fd..b697855730b 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -121,7 +121,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { }, "ping": { data: func(t *testing.T) *anypb.Any { - anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) // nolint:mnd + anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) //nolint:mnd require.NoError(t, err) return anyB }, @@ -130,7 +130,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { var ping proto.PingResponse require.NoError(t, job.GetData().UnmarshalTo(&ping)) assert.Equal(t, "pong", ping.GetValue()) - assert.Equal(t, int32(123), ping.GetCounter()) // nolint:mnd + assert.Equal(t, int32(123), ping.GetCounter()) //nolint:mnd }, }, } @@ -167,14 +167,14 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { assert.Equal(t, int(j.jobstriggeredCount.Load()), int(metrics["dapr_scheduler_trigger_latency_count"])) // ensure the trigger duration is less than 1 second (1000 milliseconds) - assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") // nolint:mnd + assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") //nolint:mnd // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app assert.Less(t, int64(avgTriggerLatency), receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") - }, time.Second*3, 10*time.Millisecond) // nolint:mnd + }, time.Second*3, 10*time.Millisecond) //nolint:mnd test.exp(t, job) - case <-time.After(time.Second * 10): // nolint:mnd + case <-time.After(time.Second * 10): //nolint:mnd assert.Fail(t, "timed out waiting for triggered job") } }) From 4ef54e7868c6a6def388c606d09675a72dfc006a Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 13:28:52 -0500 Subject: [PATCH 038/112] prealloc slice Signed-off-by: Cassandra Coyle --- tests/integration/framework/client/etcd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index 7b82022dec2..09ad81e77f1 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -71,7 +71,7 @@ func (c *EtcdClient) Get(ctx context.Context, prefix string, opts ...clientv3.Op return nil, err } - var keys []string + keys := make([]string, len(resp.Kvs)) for _, kv := range resp.Kvs { keys = append(keys, string(kv.Key)) } From d39328ec4dba0e616c58655e95d64958abe96b3c Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 13:47:41 -0500 Subject: [PATCH 039/112] hopefully last lint fix Signed-off-by: Cassandra Coyle --- tests/integration/framework/client/etcd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index 09ad81e77f1..34958e43c11 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -72,8 +72,8 @@ func (c *EtcdClient) Get(ctx context.Context, prefix string, opts ...clientv3.Op } keys := make([]string, len(resp.Kvs)) - for _, kv := range resp.Kvs { - keys = append(keys, string(kv.Key)) + for i, kv := range resp.Kvs { + keys[i] = string(kv.Key) } return keys, nil From 05781ad58c18f90fb2b94e53f10bfa887eb30b86 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 18:17:28 -0500 Subject: [PATCH 040/112] up windows test time Signed-off-by: Cassandra Coyle --- .../daprd/hotreload/operator/informer/scopes/components.go | 2 +- tests/integration/suite/daprd/workflow/scheduler/basic.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go index 36e03f4a7b6..a4b0f1baeb3 100644 --- a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go +++ b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go @@ -139,7 +139,7 @@ func (c *components) Run(t *testing.T, ctx context.Context) { c.kubeapi.Informer().Modify(t, &comp) require.EventuallyWithT(t, func(ct *assert.CollectT) { assert.Len(ct, c.daprd.GetMetaRegisteredComponents(ct, ctx), 1) - }, time.Second*10, time.Millisecond*10) + }, time.Second*15, time.Millisecond*10) comp.Scopes = []string{"foo"} c.operator1.Cleanup(t) diff --git a/tests/integration/suite/daprd/workflow/scheduler/basic.go b/tests/integration/suite/daprd/workflow/scheduler/basic.go index 33e887d78c2..8c1201b07e6 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/basic.go +++ b/tests/integration/suite/daprd/workflow/scheduler/basic.go @@ -200,7 +200,7 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { } } return true - }, 2*time.Second, 10*time.Millisecond) + }, 3*time.Second, 10*time.Millisecond) // Terminate the root orchestration b.terminateWorkflow(t, ctx, string(id)) From 89e99a20a676869fe263a9e0535c4e9eb3e840b3 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 18:31:24 -0500 Subject: [PATCH 041/112] filepath -> path import Signed-off-by: Cassandra Coyle --- go.mod | 2 +- go.sum | 4 ++-- .../integration/suite/actors/reminders/scheduler/remove.go | 5 +++-- tests/integration/suite/daprd/jobs/remove.go | 6 +++--- .../suite/daprd/workflow/scheduler/deletereminder.go | 5 +++-- tests/integration/suite/scheduler/api/remove.go | 6 +++--- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 5640e9cde03..576ed3ab699 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/cloudevents/sdk-go/v2 v2.15.2 github.com/dapr/components-contrib v1.14.1-0.20240919155322-be7c19b742b1 github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb - github.com/diagridio/go-etcd-cron v0.2.3 + github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 github.com/evanphx/json-patch/v5 v5.9.0 github.com/go-chi/chi/v5 v5.0.11 github.com/go-chi/cors v1.2.1 diff --git a/go.sum b/go.sum index 5e10802ac8c..6bfc1231240 100644 --- a/go.sum +++ b/go.sum @@ -475,8 +475,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/diagridio/go-etcd-cron v0.2.3 h1:HvB9zEd8eRvf5jnJxSKrDgY9qFeZLijzm5APCUD7J7Y= -github.com/diagridio/go-etcd-cron v0.2.3/go.mod h1:yYzzG6/Qgq4jlRi/ZIri2zgKkxhghxiA8u7a4Q7tIYQ= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 h1:GhQpbKFdNd8oGw3S2otAyiB8PqVn3anqzIypV4s7Sfo= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8/go.mod h1:yYzzG6/Qgq4jlRi/ZIri2zgKkxhghxiA8u7a4Q7tIYQ= github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog= github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 63bec623c4f..fd45b61e93a 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -18,6 +18,7 @@ import ( "fmt" "net/http" "os" + "path" "path/filepath" "strconv" "sync/atomic" @@ -114,8 +115,8 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" - etcdKeysPrefix := filepath.Join("dapr", "jobs") + // Use "path" import, to have the same path separator across OS + etcdKeysPrefix := path.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index c604fa4815b..98b144bedf2 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -16,7 +16,7 @@ package jobs import ( "context" "fmt" - "path/filepath" + "path" "strconv" "sync/atomic" "testing" @@ -94,8 +94,8 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" - etcdKeysPrefix := filepath.Join("dapr", "jobs") + // Use "path" import, to have the same path separator across OS + etcdKeysPrefix := path.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index d961ddbe902..6251397a5c5 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -17,6 +17,7 @@ import ( "context" "fmt" "os" + "path" "path/filepath" "testing" "time" @@ -87,8 +88,8 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" - etcdKeysPrefix := filepath.Join("dapr", "jobs") + // Use "path" import, to have the same path separator across OS + etcdKeysPrefix := path.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index 50cc1aff9df..a9c10cd2d67 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -16,7 +16,7 @@ package api import ( "context" "fmt" - "path/filepath" + "path" "strconv" "testing" "time" @@ -104,8 +104,8 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" - etcdKeysPrefix := filepath.Join("dapr", "jobs") + // Use "path" import, to have the same path separator across OS + etcdKeysPrefix := path.Join("dapr", "jobs") assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) From db74a099c7912b84e7d7f5698193482f45c3e3a0 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 1 Oct 2024 18:34:27 -0500 Subject: [PATCH 042/112] make lint Signed-off-by: Cassandra Coyle --- .../daprd/hotreload/operator/informer/scopes/components.go | 2 +- tests/integration/suite/daprd/workflow/scheduler/basic.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go index a4b0f1baeb3..a711ecfaab4 100644 --- a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go +++ b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go @@ -139,7 +139,7 @@ func (c *components) Run(t *testing.T, ctx context.Context) { c.kubeapi.Informer().Modify(t, &comp) require.EventuallyWithT(t, func(ct *assert.CollectT) { assert.Len(ct, c.daprd.GetMetaRegisteredComponents(ct, ctx), 1) - }, time.Second*15, time.Millisecond*10) + }, time.Second*15, time.Millisecond*10) //nolint:mnd comp.Scopes = []string{"foo"} c.operator1.Cleanup(t) diff --git a/tests/integration/suite/daprd/workflow/scheduler/basic.go b/tests/integration/suite/daprd/workflow/scheduler/basic.go index 8c1201b07e6..0e2befb82ed 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/basic.go +++ b/tests/integration/suite/daprd/workflow/scheduler/basic.go @@ -200,7 +200,7 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { } } return true - }, 3*time.Second, 10*time.Millisecond) + }, 3*time.Second, 10*time.Millisecond) //nolint:mnd // Terminate the root orchestration b.terminateWorkflow(t, ctx, string(id)) From 126a4b6b416190f0dcc8bb94d2596c93ab92a111 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 2 Oct 2024 08:28:37 -0500 Subject: [PATCH 043/112] add time for windows being slow Signed-off-by: Cassandra Coyle --- .../integration/suite/scheduler/metrics/daprconnections.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 7936dc656b7..2926486df0e 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -83,7 +83,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) - }, 10*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd // 2 sidecars connected c.daprdB.Run(t, ctx) @@ -92,7 +92,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.Equal(t, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd - }, 10*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd // 3 sidecars connected c.daprdC.Run(t, ctx) @@ -101,6 +101,6 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { metrics = c.scheduler.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.Equal(t, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd - }, 10*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd }) } From b5562cdf4ece9bc88440e0227f03e7d4fe042031 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 2 Oct 2024 08:34:04 -0500 Subject: [PATCH 044/112] fix last test job key path Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/quorum/notls.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/integration/suite/scheduler/quorum/notls.go b/tests/integration/suite/scheduler/quorum/notls.go index 992248bf313..6766a5f6958 100644 --- a/tests/integration/suite/scheduler/quorum/notls.go +++ b/tests/integration/suite/scheduler/quorum/notls.go @@ -17,7 +17,7 @@ import ( "context" "fmt" "math/rand" - "runtime" + "path" "strconv" "testing" "time" @@ -147,12 +147,8 @@ func (n *notls) Run(t *testing.T, ctx context.Context) { func (n *notls) checkKeysForJobName(t *testing.T, jobName string, keys []*mvccpb.KeyValue) { t.Helper() - var jobPrefix string - if runtime.GOOS == "windows" { - jobPrefix = "dapr\\jobs\\app" - } else { - jobPrefix = "dapr/jobs/app" - } + // Use "path" import, to have the same path separator across OS + jobPrefix := path.Join("dapr", "jobs") found := false for _, kv := range keys { From c1ad839c726a68e4899eb8662cedfbcee508848f Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 2 Oct 2024 15:23:49 +0100 Subject: [PATCH 045/112] proto: updates protoc to 25.4 Signed-off-by: joshvanl --- .github/workflows/dapr.yml | 4 ++-- Makefile | 4 ++-- pkg/proto/common/v1/common.pb.go | 2 +- pkg/proto/components/v1/bindings.pb.go | 2 +- pkg/proto/components/v1/bindings_grpc.pb.go | 2 +- pkg/proto/components/v1/common.pb.go | 2 +- pkg/proto/components/v1/pubsub.pb.go | 2 +- pkg/proto/components/v1/pubsub_grpc.pb.go | 2 +- pkg/proto/components/v1/secretstore.pb.go | 2 +- pkg/proto/components/v1/secretstore_grpc.pb.go | 2 +- pkg/proto/components/v1/state.pb.go | 2 +- pkg/proto/components/v1/state_grpc.pb.go | 2 +- pkg/proto/internals/v1/apiversion.pb.go | 2 +- pkg/proto/internals/v1/jobs.pb.go | 2 +- pkg/proto/internals/v1/reminders.pb.go | 2 +- pkg/proto/internals/v1/service_invocation.pb.go | 2 +- pkg/proto/internals/v1/service_invocation_grpc.pb.go | 2 +- pkg/proto/internals/v1/status.pb.go | 2 +- pkg/proto/operator/v1/operator.pb.go | 2 +- pkg/proto/operator/v1/operator_grpc.pb.go | 2 +- pkg/proto/placement/v1/placement.pb.go | 2 +- pkg/proto/placement/v1/placement_grpc.pb.go | 2 +- pkg/proto/runtime/v1/appcallback.pb.go | 2 +- pkg/proto/runtime/v1/appcallback_grpc.pb.go | 2 +- pkg/proto/runtime/v1/dapr.pb.go | 2 +- pkg/proto/runtime/v1/dapr_grpc.pb.go | 2 +- pkg/proto/scheduler/v1/scheduler.pb.go | 2 +- pkg/proto/scheduler/v1/scheduler_grpc.pb.go | 2 +- pkg/proto/sentry/v1/sentry.pb.go | 2 +- pkg/proto/sentry/v1/sentry_grpc.pb.go | 2 +- 30 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/dapr.yml b/.github/workflows/dapr.yml index f8fe29d5156..67e22f4a795 100644 --- a/.github/workflows/dapr.yml +++ b/.github/workflows/dapr.yml @@ -42,7 +42,7 @@ jobs: target_arch: ["amd64"] env: GOLANGCILINT_VER: "v1.61.0" - PROTOC_VERSION: "24.4" + PROTOC_VERSION: "25.4" GOOS: "${{ matrix.target_os }}" GOARCH: "${{ matrix.target_arch }}" GOPROXY: "https://proxy.golang.org" @@ -743,4 +743,4 @@ jobs: git config --global user.email "github-actions@github.com" git add config/dapr_runtime.version git commit -m "Updates dapr runtime version to ${REL_VERSION}" - git push \ No newline at end of file + git push diff --git a/Makefile b/Makefile index 28ecb94d143..934298d83ed 100644 --- a/Makefile +++ b/Makefile @@ -46,8 +46,8 @@ PROTOC ?=protoc # Version of "protoc" to use # We must also specify a protobuf "suite" version from https://github.com/protocolbuffers/protobuf/releases -PROTOC_VERSION = 24.4 -PROTOBUF_SUITE_VERSION = 24.4 +PROTOC_VERSION = 25.4 +PROTOBUF_SUITE_VERSION = 25.4 # name of protoc-gen-go when protoc-gen-go --version is run. PROTOC_GEN_GO_NAME = "protoc-gen-go" diff --git a/pkg/proto/common/v1/common.pb.go b/pkg/proto/common/v1/common.pb.go index ae95888e619..b5f92c4dedb 100644 --- a/pkg/proto/common/v1/common.pb.go +++ b/pkg/proto/common/v1/common.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/common/v1/common.proto package common diff --git a/pkg/proto/components/v1/bindings.pb.go b/pkg/proto/components/v1/bindings.pb.go index 42a047cacf8..de86ee3fe27 100644 --- a/pkg/proto/components/v1/bindings.pb.go +++ b/pkg/proto/components/v1/bindings.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/components/v1/bindings.proto package components diff --git a/pkg/proto/components/v1/bindings_grpc.pb.go b/pkg/proto/components/v1/bindings_grpc.pb.go index 24a1b7fa2f3..f16ae441a85 100644 --- a/pkg/proto/components/v1/bindings_grpc.pb.go +++ b/pkg/proto/components/v1/bindings_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/components/v1/bindings.proto package components diff --git a/pkg/proto/components/v1/common.pb.go b/pkg/proto/components/v1/common.pb.go index 9e6d34289c5..6362d625d28 100644 --- a/pkg/proto/components/v1/common.pb.go +++ b/pkg/proto/components/v1/common.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/components/v1/common.proto package components diff --git a/pkg/proto/components/v1/pubsub.pb.go b/pkg/proto/components/v1/pubsub.pb.go index 10de7ef33c2..94ebe902aa5 100644 --- a/pkg/proto/components/v1/pubsub.pb.go +++ b/pkg/proto/components/v1/pubsub.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/components/v1/pubsub.proto package components diff --git a/pkg/proto/components/v1/pubsub_grpc.pb.go b/pkg/proto/components/v1/pubsub_grpc.pb.go index 6b4800861a4..4574eb76860 100644 --- a/pkg/proto/components/v1/pubsub_grpc.pb.go +++ b/pkg/proto/components/v1/pubsub_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/components/v1/pubsub.proto package components diff --git a/pkg/proto/components/v1/secretstore.pb.go b/pkg/proto/components/v1/secretstore.pb.go index d79b0cb12de..93ceb8c6f31 100644 --- a/pkg/proto/components/v1/secretstore.pb.go +++ b/pkg/proto/components/v1/secretstore.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/components/v1/secretstore.proto package components diff --git a/pkg/proto/components/v1/secretstore_grpc.pb.go b/pkg/proto/components/v1/secretstore_grpc.pb.go index ee4c3989b5b..06c432d7f0f 100644 --- a/pkg/proto/components/v1/secretstore_grpc.pb.go +++ b/pkg/proto/components/v1/secretstore_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/components/v1/secretstore.proto package components diff --git a/pkg/proto/components/v1/state.pb.go b/pkg/proto/components/v1/state.pb.go index 53406c3023b..8a8e0007561 100644 --- a/pkg/proto/components/v1/state.pb.go +++ b/pkg/proto/components/v1/state.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/components/v1/state.proto package components diff --git a/pkg/proto/components/v1/state_grpc.pb.go b/pkg/proto/components/v1/state_grpc.pb.go index 7d1a23f0170..57834b439ff 100644 --- a/pkg/proto/components/v1/state_grpc.pb.go +++ b/pkg/proto/components/v1/state_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/components/v1/state.proto package components diff --git a/pkg/proto/internals/v1/apiversion.pb.go b/pkg/proto/internals/v1/apiversion.pb.go index 6edb41de938..cba0c864250 100644 --- a/pkg/proto/internals/v1/apiversion.pb.go +++ b/pkg/proto/internals/v1/apiversion.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/internals/v1/apiversion.proto package internals diff --git a/pkg/proto/internals/v1/jobs.pb.go b/pkg/proto/internals/v1/jobs.pb.go index a9863ad24b3..a494112a64a 100644 --- a/pkg/proto/internals/v1/jobs.pb.go +++ b/pkg/proto/internals/v1/jobs.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/internals/v1/jobs.proto package internals diff --git a/pkg/proto/internals/v1/reminders.pb.go b/pkg/proto/internals/v1/reminders.pb.go index ac98cc50160..0b705e8246d 100644 --- a/pkg/proto/internals/v1/reminders.pb.go +++ b/pkg/proto/internals/v1/reminders.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/internals/v1/reminders.proto package internals diff --git a/pkg/proto/internals/v1/service_invocation.pb.go b/pkg/proto/internals/v1/service_invocation.pb.go index e5cfe1766cb..694648079ec 100644 --- a/pkg/proto/internals/v1/service_invocation.pb.go +++ b/pkg/proto/internals/v1/service_invocation.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/internals/v1/service_invocation.proto package internals diff --git a/pkg/proto/internals/v1/service_invocation_grpc.pb.go b/pkg/proto/internals/v1/service_invocation_grpc.pb.go index 7d644cf0384..733d7c0f734 100644 --- a/pkg/proto/internals/v1/service_invocation_grpc.pb.go +++ b/pkg/proto/internals/v1/service_invocation_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/internals/v1/service_invocation.proto package internals diff --git a/pkg/proto/internals/v1/status.pb.go b/pkg/proto/internals/v1/status.pb.go index 6c22bcb3184..96395b86c56 100644 --- a/pkg/proto/internals/v1/status.pb.go +++ b/pkg/proto/internals/v1/status.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/internals/v1/status.proto package internals diff --git a/pkg/proto/operator/v1/operator.pb.go b/pkg/proto/operator/v1/operator.pb.go index 8e0b308ae53..f7ba1aa61a7 100644 --- a/pkg/proto/operator/v1/operator.pb.go +++ b/pkg/proto/operator/v1/operator.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/operator/v1/operator.proto package operator diff --git a/pkg/proto/operator/v1/operator_grpc.pb.go b/pkg/proto/operator/v1/operator_grpc.pb.go index 9f05fd2d064..36eb6771764 100644 --- a/pkg/proto/operator/v1/operator_grpc.pb.go +++ b/pkg/proto/operator/v1/operator_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/operator/v1/operator.proto package operator diff --git a/pkg/proto/placement/v1/placement.pb.go b/pkg/proto/placement/v1/placement.pb.go index 070f572f1f2..1ea434d7bda 100644 --- a/pkg/proto/placement/v1/placement.pb.go +++ b/pkg/proto/placement/v1/placement.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/placement/v1/placement.proto package placement diff --git a/pkg/proto/placement/v1/placement_grpc.pb.go b/pkg/proto/placement/v1/placement_grpc.pb.go index a8ae6e32454..df4372d5c32 100644 --- a/pkg/proto/placement/v1/placement_grpc.pb.go +++ b/pkg/proto/placement/v1/placement_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/placement/v1/placement.proto package placement diff --git a/pkg/proto/runtime/v1/appcallback.pb.go b/pkg/proto/runtime/v1/appcallback.pb.go index ff7bc0130ef..3bd818a655c 100644 --- a/pkg/proto/runtime/v1/appcallback.pb.go +++ b/pkg/proto/runtime/v1/appcallback.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/runtime/v1/appcallback.proto package runtime diff --git a/pkg/proto/runtime/v1/appcallback_grpc.pb.go b/pkg/proto/runtime/v1/appcallback_grpc.pb.go index fdede696621..205212bdb52 100644 --- a/pkg/proto/runtime/v1/appcallback_grpc.pb.go +++ b/pkg/proto/runtime/v1/appcallback_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/runtime/v1/appcallback.proto package runtime diff --git a/pkg/proto/runtime/v1/dapr.pb.go b/pkg/proto/runtime/v1/dapr.pb.go index 0530392e83f..d62c15d5ba7 100644 --- a/pkg/proto/runtime/v1/dapr.pb.go +++ b/pkg/proto/runtime/v1/dapr.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/runtime/v1/dapr.proto package runtime diff --git a/pkg/proto/runtime/v1/dapr_grpc.pb.go b/pkg/proto/runtime/v1/dapr_grpc.pb.go index 82793c5ffdb..7c5753f609a 100644 --- a/pkg/proto/runtime/v1/dapr_grpc.pb.go +++ b/pkg/proto/runtime/v1/dapr_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/runtime/v1/dapr.proto package runtime diff --git a/pkg/proto/scheduler/v1/scheduler.pb.go b/pkg/proto/scheduler/v1/scheduler.pb.go index 9f7d07c4069..bd8c10752ee 100644 --- a/pkg/proto/scheduler/v1/scheduler.pb.go +++ b/pkg/proto/scheduler/v1/scheduler.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/scheduler/v1/scheduler.proto package scheduler diff --git a/pkg/proto/scheduler/v1/scheduler_grpc.pb.go b/pkg/proto/scheduler/v1/scheduler_grpc.pb.go index 16694880d76..62733c62d09 100644 --- a/pkg/proto/scheduler/v1/scheduler_grpc.pb.go +++ b/pkg/proto/scheduler/v1/scheduler_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/scheduler/v1/scheduler.proto package scheduler diff --git a/pkg/proto/sentry/v1/sentry.pb.go b/pkg/proto/sentry/v1/sentry.pb.go index 748af9ca0fd..5ae82449da3 100644 --- a/pkg/proto/sentry/v1/sentry.pb.go +++ b/pkg/proto/sentry/v1/sentry.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/sentry/v1/sentry.proto package sentry diff --git a/pkg/proto/sentry/v1/sentry_grpc.pb.go b/pkg/proto/sentry/v1/sentry_grpc.pb.go index 2c99bf67898..d896a08d3db 100644 --- a/pkg/proto/sentry/v1/sentry_grpc.pb.go +++ b/pkg/proto/sentry/v1/sentry_grpc.pb.go @@ -13,7 +13,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/sentry/v1/sentry.proto package sentry From fa94398ac64c4883518511629574cc5f63b58012 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 2 Oct 2024 10:19:32 -0500 Subject: [PATCH 046/112] fix quorum/notls test Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/quorum/notls.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/suite/scheduler/quorum/notls.go b/tests/integration/suite/scheduler/quorum/notls.go index 6766a5f6958..3a8653fc135 100644 --- a/tests/integration/suite/scheduler/quorum/notls.go +++ b/tests/integration/suite/scheduler/quorum/notls.go @@ -148,8 +148,7 @@ func (n *notls) checkKeysForJobName(t *testing.T, jobName string, keys []*mvccpb t.Helper() // Use "path" import, to have the same path separator across OS - jobPrefix := path.Join("dapr", "jobs") - + jobPrefix := path.Join("dapr", "jobs", "app") found := false for _, kv := range keys { if string(kv.Key) == fmt.Sprintf("%s||%s||%s||%s", jobPrefix, "ns", "appid", jobName) { From 201506f8c8f82c55efd118aacef86dd81cfb33cf Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 2 Oct 2024 17:05:35 +0100 Subject: [PATCH 047/112] Updates references in /dapr & /docker Signed-off-by: joshvanl --- dapr/README.md | 2 +- dapr/proto/common/v1/README.md | 2 +- dapr/proto/components/v1/README.md | 2 +- dapr/proto/internals/v1/README.md | 2 +- dapr/proto/operator/v1/README.md | 2 +- dapr/proto/placement/v1/README.md | 2 +- dapr/proto/runtime/v1/README.md | 2 +- dapr/proto/sentry/v1/README.md | 2 +- docker/Dockerfile-dev | 2 +- docker/README.md | 2 +- docker/custom-scripts/install-dapr-tools.sh | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dapr/README.md b/dapr/README.md index 5f385d35266..c3fb9ba194c 100644 --- a/dapr/README.md +++ b/dapr/README.md @@ -12,7 +12,7 @@ ## Proto client generation -1. Install protoc version: [v24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v24.4) +1. Install protoc version: [v25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/common/v1/README.md b/dapr/proto/common/v1/README.md index 3b3a23d45cb..1805e57023c 100644 --- a/dapr/proto/common/v1/README.md +++ b/dapr/proto/common/v1/README.md @@ -5,7 +5,7 @@ This folder is intended for the Common protos amongst the packages in the `dapr/ ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/components/v1/README.md b/dapr/proto/components/v1/README.md index 7956468da7c..22571ebfffe 100644 --- a/dapr/proto/components/v1/README.md +++ b/dapr/proto/components/v1/README.md @@ -7,7 +7,7 @@ These protos are for a feature of Dapr which allows users to write their own com ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/internals/v1/README.md b/dapr/proto/internals/v1/README.md index 2555771ff99..42cdf3e4b2e 100644 --- a/dapr/proto/internals/v1/README.md +++ b/dapr/proto/internals/v1/README.md @@ -5,7 +5,7 @@ This folder is intended for the Internal APIs that the `daprd` sidecars use to c ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/operator/v1/README.md b/dapr/proto/operator/v1/README.md index 239ad6beb70..f2c5e136320 100644 --- a/dapr/proto/operator/v1/README.md +++ b/dapr/proto/operator/v1/README.md @@ -5,7 +5,7 @@ This folder is intended for the `operator` service APIs that manage the componen ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/placement/v1/README.md b/dapr/proto/placement/v1/README.md index a124cad54d5..44537d467d1 100644 --- a/dapr/proto/placement/v1/README.md +++ b/dapr/proto/placement/v1/README.md @@ -5,7 +5,7 @@ This folder is intended for `placement` service APIs that the `daprd` sidecars u ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/runtime/v1/README.md b/dapr/proto/runtime/v1/README.md index ab7e6421491..e69bde06c84 100644 --- a/dapr/proto/runtime/v1/README.md +++ b/dapr/proto/runtime/v1/README.md @@ -8,7 +8,7 @@ This folder is intended for user-facing APIs. ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/dapr/proto/sentry/v1/README.md b/dapr/proto/sentry/v1/README.md index 1d61c156e18..5c2883cbe07 100644 --- a/dapr/proto/sentry/v1/README.md +++ b/dapr/proto/sentry/v1/README.md @@ -5,7 +5,7 @@ This folder is intended for `sentry` service APIs that the `daprd` sidecars use ## Proto client generation Pre-requisites: -1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4) +1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4) 2. Install protoc-gen-go and protoc-gen-go-grpc diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev index 7e977cefcdc..9052680d7d9 100644 --- a/docker/Dockerfile-dev +++ b/docker/Dockerfile-dev @@ -12,7 +12,7 @@ ARG KUBECTL_VERSION="latest" ARG HELM_VERSION="latest" ARG MINIKUBE_VERSION="latest" ARG DAPR_CLI_VERSION="latest" -ARG PROTOC_VERSION="24.4" +ARG PROTOC_VERSION="25.4" ARG PROTOC_GEN_GO_VERSION="1.32.0" ARG PROTOC_GEN_GO_GRPC_VERSION="1.3.0" ARG GOLANGCI_LINT_VERSION="1.61.0" diff --git a/docker/README.md b/docker/README.md index 949da93ca7f..f30a51874d0 100644 --- a/docker/README.md +++ b/docker/README.md @@ -18,7 +18,7 @@ The Dev Container can be rebuilt with custom options. Relevant args (and their d * `HELM_VERSION` (default: `latest`) * `MINIKUBE_VERSION` (default: `latest`) * `DAPR_CLI_VERSION` (default: `latest`) -* `PROTOC_VERSION` (default: `24.4`) +* `PROTOC_VERSION` (default: `25.4`) * `PROTOC_GEN_GO_VERSION` (default: `1.32`) * `PROTOC_GEN_GO_GRPC_VERSION` (default: `1.3`) * `GOLANGCI_LINT_VERSION` (default: `1.45.2`) diff --git a/docker/custom-scripts/install-dapr-tools.sh b/docker/custom-scripts/install-dapr-tools.sh index 29633a0098e..b2a31de7922 100644 --- a/docker/custom-scripts/install-dapr-tools.sh +++ b/docker/custom-scripts/install-dapr-tools.sh @@ -18,7 +18,7 @@ USERNAME=${1:-"dapr"} GOROOT=${2:-"/usr/local/go"} GOPATH=${3:-"/go"} DAPR_CLI_VERSION=${4:-""} -PROTOC_VERSION=${5:-"24.4"} +PROTOC_VERSION=${5:-"25.4"} PROTOC_GEN_GO_VERSION=${6:-"1.32.0"} PROTOC_GEN_GO_GRPC_VERSION=${7:-"1.3.0"} GOLANGCI_LINT_VERSION=${8:-"1.61.0"} From f87e04f662f4de22c4c4dd98d21d261766def69f Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 2 Oct 2024 11:32:16 -0500 Subject: [PATCH 048/112] move metrics call into assert eventually Signed-off-by: Cassandra Coyle --- .../suite/scheduler/metrics/daprconnections.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 2926486df0e..4cec04dfae6 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -80,27 +80,27 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.daprdA.Run(t, ctx) t.Cleanup(func() { c.daprdA.Cleanup(t) }) c.daprdA.WaitUntilRunning(t, ctx) - metrics = c.scheduler.Metrics(t, ctx) - assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.Equal(t, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + metrics = c.scheduler.Metrics(t, ctx) + assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd // 2 sidecars connected c.daprdB.Run(t, ctx) t.Cleanup(func() { c.daprdB.Cleanup(t) }) c.daprdB.WaitUntilRunning(t, ctx) - metrics = c.scheduler.Metrics(t, ctx) - assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.Equal(t, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + metrics = c.scheduler.Metrics(t, ctx) + assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd // 3 sidecars connected c.daprdC.Run(t, ctx) t.Cleanup(func() { c.daprdC.Cleanup(t) }) c.daprdC.WaitUntilRunning(t, ctx) - metrics = c.scheduler.Metrics(t, ctx) - assert.EventuallyWithT(t, func(c *assert.CollectT) { - assert.Equal(t, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + metrics = c.scheduler.Metrics(t, ctx) + assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd }) } From 295747b9df5c099ab36ce074ec505fd6e369f873 Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Thu, 3 Oct 2024 08:46:55 -0500 Subject: [PATCH 049/112] Apply suggestions from code review Co-authored-by: Josh van Leeuwen Signed-off-by: Cassie Coyle --- pkg/scheduler/monitoring/metrics.go | 2 +- tests/integration/framework/client/etcd.go | 9 ++++----- .../integration/framework/process/scheduler/scheduler.go | 2 +- tests/integration/suite/scheduler/metrics/actors.go | 6 ------ 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index a177851054f..8e233c8b7e9 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -21,7 +21,7 @@ import ( "go.opencensus.io/stats/view" "go.opencensus.io/tag" - diagUtils "github.com/dapr/dapr/pkg/diagnostics/utils" + "github.com/dapr/dapr/pkg/diagnostics/utils" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" ) diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index 34958e43c11..e8cf33bcf02 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -65,16 +65,15 @@ func (c *EtcdClient) ListAllKeys(ctx context.Context, prefix string) ([]string, return r, nil } -func (c *EtcdClient) Get(ctx context.Context, prefix string, opts ...clientv3.OpOption) ([]string, error) { +func (c *EtcdClient) Get(t *testing.T, ctx context.Context, prefix string, opts ...clientv3.OpOption) error { + t.Helper() resp, err := c.client.Get(ctx, prefix, opts...) - if err != nil { - return nil, err - } + require.NoError(t, err) keys := make([]string, len(resp.Kvs)) for i, kv := range resp.Kvs { keys[i] = string(kv.Key) } - return keys, nil + return keys } diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 302460cd01c..a0468fac77b 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -222,7 +222,7 @@ func (s *Scheduler) DataDir() string { func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { t.Helper() - client := client.Etcd(t, clientv3.Config{ + return client.Etcd(t, clientv3.Config{ Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, DialTimeout: 40 * time.Second, //nolint:mnd }) diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index 2806c064370..1f2b1551276 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -98,12 +98,6 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { metrics := a.scheduler.Metrics(t, ctx) assert.Equal(t, 0, int(metrics["dapr_scheduler_jobs_created_total"])) - _, err := grpcClient.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ - ActorType: "myactortype", - ActorId: "myactorid", - Method: "foo", - }) - require.NoError(t, err) _, err = grpcClient.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ ActorType: "myactortype", From e644b0d8aa8be508a65b6f71b512a7c9275dba02 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 3 Oct 2024 08:56:47 -0500 Subject: [PATCH 050/112] fixes after adding PR feedback Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 18 +++++++++--------- tests/integration/framework/client/etcd.go | 2 +- .../framework/process/scheduler/scheduler.go | 2 -- tests/integration/suite/scheduler/api/jobs.go | 4 +--- .../suite/scheduler/metrics/actors.go | 3 +-- .../suite/scheduler/metrics/basic.go | 4 +--- 6 files changed, 13 insertions(+), 20 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 8e233c8b7e9..3336adb3bfc 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -21,7 +21,7 @@ import ( "go.opencensus.io/stats/view" "go.opencensus.io/tag" - "github.com/dapr/dapr/pkg/diagnostics/utils" + "github.com/dapr/dapr/pkg/diagnostics/utils" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" ) @@ -46,7 +46,7 @@ var ( // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service func RecordSidecarsConnectedCount() { - stats.RecordWithTags(context.Background(), diagUtils.WithTags(sidecarsConnectedTotal.Name()), sidecarsConnectedTotal.M(1)) + stats.RecordWithTags(context.Background(), utils.WithTags(sidecarsConnectedTotal.Name()), sidecarsConnectedTotal.M(1)) } // RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service @@ -61,7 +61,7 @@ func RecordJobsScheduledCount(jobMetadata *schedulerv1pb.JobMetadata) { jobType = "unknown" } - stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsScheduledTotal.Name(), jobType), jobsScheduledTotal.M(1)) + stats.RecordWithTags(context.Background(), utils.WithTags(jobsScheduledTotal.Name(), jobType), jobsScheduledTotal.M(1)) } // RecordJobsTriggeredCount records the total number of jobs successfully triggered from the scheduler service @@ -76,22 +76,22 @@ func RecordJobsTriggeredCount(jobMetadata *schedulerv1pb.JobMetadata) { jobType = "unknown" } - stats.RecordWithTags(context.Background(), diagUtils.WithTags(jobsTriggeredTotal.Name(), jobType), jobsTriggeredTotal.M(1)) + stats.RecordWithTags(context.Background(), utils.WithTags(jobsTriggeredTotal.Name(), jobType), jobsTriggeredTotal.M(1)) } // RecordTriggerDuration records the time it takes to send the job to dapr from the scheduler service func RecordTriggerDuration(ns string, appID string, start time.Time) { elapsed := time.Since(start).Milliseconds() - stats.RecordWithTags(context.Background(), diagUtils.WithTags(triggerLatency.Name(), ns, appID), triggerLatency.M(float64(elapsed))) + stats.RecordWithTags(context.Background(), utils.WithTags(triggerLatency.Name(), ns, appID), triggerLatency.M(float64(elapsed))) } // InitMetrics initialize the scheduler service metrics. func InitMetrics() error { err := view.Register( - diagUtils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{}, view.Count()), - diagUtils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), - diagUtils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), - diagUtils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), //nolint:mnd + utils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{}, view.Count()), + utils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), + utils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), + utils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), //nolint:mnd ) return err diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index e8cf33bcf02..2ee89275a4f 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -65,7 +65,7 @@ func (c *EtcdClient) ListAllKeys(ctx context.Context, prefix string) ([]string, return r, nil } -func (c *EtcdClient) Get(t *testing.T, ctx context.Context, prefix string, opts ...clientv3.OpOption) error { +func (c *EtcdClient) Get(t *testing.T, ctx context.Context, prefix string, opts ...clientv3.OpOption) []string { t.Helper() resp, err := c.client.Get(ctx, prefix, opts...) require.NoError(t, err) diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index a0468fac77b..953d48143a0 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -226,8 +226,6 @@ func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, DialTimeout: 40 * time.Second, //nolint:mnd }) - - return client } func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.SchedulerClient { diff --git a/tests/integration/suite/scheduler/api/jobs.go b/tests/integration/suite/scheduler/api/jobs.go index d657a526292..d2e267a7316 100644 --- a/tests/integration/suite/scheduler/api/jobs.go +++ b/tests/integration/suite/scheduler/api/jobs.go @@ -131,9 +131,7 @@ func (j *jobs) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { t.Helper() // Get keys with prefix - keys, err := j.scheduler.ETCDClient(t).Get(ctx, "", clientv3.WithPrefix()) - require.NoError(t, err) - + keys := j.scheduler.ETCDClient(t).Get(t, ctx, "", clientv3.WithPrefix()) for _, k := range keys { if strings.HasSuffix(k, "||"+key) { return true diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index 1f2b1551276..fd284e6f228 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -98,8 +98,7 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { metrics := a.scheduler.Metrics(t, ctx) assert.Equal(t, 0, int(metrics["dapr_scheduler_jobs_created_total"])) - - _, err = grpcClient.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ + _, err := grpcClient.RegisterActorReminder(ctx, &runtimev1pb.RegisterActorReminderRequest{ ActorType: "myactortype", ActorId: "myactorid", Name: "remindermethod", diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go index 87448a3f204..b2931b65b23 100644 --- a/tests/integration/suite/scheduler/metrics/basic.go +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -95,9 +95,7 @@ func (b *basic) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { t.Helper() // Get keys with prefix - keys, err := b.scheduler.ETCDClient(t).Get(ctx, "", clientv3.WithPrefix()) - require.NoError(t, err) - + keys := b.scheduler.ETCDClient(t).Get(t, ctx, "", clientv3.WithPrefix()) for _, k := range keys { if strings.HasSuffix(k, "||"+key) { return true From bf7be8aca63643ba061ab424af2341684eddbeb6 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 3 Oct 2024 08:59:14 -0500 Subject: [PATCH 051/112] rm dapr appID since its no longer needed Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/metrics/daprconnections.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 4cec04dfae6..796dc3501d2 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -46,21 +46,18 @@ func (c *daprconnections) Setup(t *testing.T) []framework.Option { daprd.WithSchedulerAddresses(c.scheduler.Address()), daprd.WithAppProtocol("grpc"), daprd.WithAppPort(srv.Port(t)), - daprd.WithAppID("A"), ) c.daprdB = daprd.New(t, daprd.WithSchedulerAddresses(c.scheduler.Address()), daprd.WithAppProtocol("grpc"), daprd.WithAppPort(srv.Port(t)), - daprd.WithAppID("B"), ) c.daprdC = daprd.New(t, daprd.WithSchedulerAddresses(c.scheduler.Address()), daprd.WithAppProtocol("grpc"), daprd.WithAppPort(srv.Port(t)), - daprd.WithAppID("C"), ) return []framework.Option{ From c20ba9ff62419de89b6f5225cd7232902b2b7b07 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Thu, 3 Oct 2024 15:10:02 +0100 Subject: [PATCH 052/112] Linter Signed-off-by: Elena Kolevska --- cmd/placement/options/options_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/placement/options/options_test.go b/cmd/placement/options/options_test.go index a5eb7f02f7f..bba4e98b69d 100644 --- a/cmd/placement/options/options_test.go +++ b/cmd/placement/options/options_test.go @@ -14,7 +14,6 @@ limitations under the License. package options import ( - "fmt" "testing" "time" @@ -145,7 +144,7 @@ func TestValidateFlags(t *testing.T) { t.Run(tt.name, func(t *testing.T) { _, err := New([]string{"--" + tt.arg, tt.value}) require.Error(t, err) - require.Contains(t, err.Error(), fmt.Sprintf("invalid value for %s", tt.arg)) + require.Contains(t, err.Error(), "invalid value for "+tt.arg) }) } } From b4160c3f8256d9097138cef2369d45ab0e34a51b Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 4 Oct 2024 09:32:53 -0500 Subject: [PATCH 053/112] cumulative -> last val for daprconnections to decrement as well Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 15 +++--- pkg/scheduler/server/api.go | 3 +- .../scheduler/metrics/daprconnections.go | 49 ++++++++++++++++--- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 3336adb3bfc..dd678393542 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -26,9 +26,11 @@ import ( ) var ( - sidecarsConnectedTotal = stats.Int64( - "scheduler/sidecars_connected_total", - "The total number of dapr sidecars connected to the scheduler service.", + sidecarConnectionCount int64 = 0 + + sidecarsConnectedGauge = stats.Int64( + "scheduler/sidecars_connected", + "The number of dapr sidecars actively connected to the scheduler service.", stats.UnitDimensionless) jobsScheduledTotal = stats.Int64( "scheduler/jobs_created_total", @@ -45,8 +47,9 @@ var ( ) // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service -func RecordSidecarsConnectedCount() { - stats.RecordWithTags(context.Background(), utils.WithTags(sidecarsConnectedTotal.Name()), sidecarsConnectedTotal.M(1)) +func RecordSidecarsConnectedCount(change int) { + sidecarConnectionCount += int64(change) + stats.RecordWithTags(context.Background(), utils.WithTags(sidecarsConnectedGauge.Name()), sidecarsConnectedGauge.M(int64(sidecarConnectionCount))) } // RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service @@ -88,7 +91,7 @@ func RecordTriggerDuration(ns string, appID string, start time.Time) { // InitMetrics initialize the scheduler service metrics. func InitMetrics() error { err := view.Register( - utils.NewMeasureView(sidecarsConnectedTotal, []tag.Key{}, view.Count()), + utils.NewMeasureView(sidecarsConnectedGauge, []tag.Key{}, view.LastValue()), utils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), utils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), utils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), //nolint:mnd diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 7986ed09772..ca7e7928fd5 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -146,8 +146,9 @@ func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error } s.connectionPool.Add(req.GetInitial(), stream) - monitoring.RecordSidecarsConnectedCount() + monitoring.RecordSidecarsConnectedCount(1) + defer monitoring.RecordSidecarsConnectedCount(-1) select { case <-s.closeCh: return errors.New("server is closing") diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 796dc3501d2..93b1096584d 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -15,6 +15,7 @@ package metrics import ( "context" + "sync" "testing" "time" @@ -36,6 +37,8 @@ type daprconnections struct { daprdA *daprd.Daprd daprdB *daprd.Daprd daprdC *daprd.Daprd + + metricsMu sync.Mutex } func (c *daprconnections) Setup(t *testing.T) []framework.Option { @@ -70,34 +73,66 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { t.Run("ensure dapr connection with scheduler metric", func(t *testing.T) { // 0 sidecars connected + c.metricsMu.Lock() metrics := c.scheduler.Metrics(t, ctx) - assert.Equal(t, 0, int(metrics["dapr_scheduler_sidecars_connected_total"])) + assert.Equal(t, 0, int(metrics["dapr_scheduler_sidecars_connected"])) + c.metricsMu.Unlock() // 1 sidecar connected c.daprdA.Run(t, ctx) - t.Cleanup(func() { c.daprdA.Cleanup(t) }) c.daprdA.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected_total"])) + assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd // 2 sidecars connected c.daprdB.Run(t, ctx) - t.Cleanup(func() { c.daprdB.Cleanup(t) }) c.daprdB.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd // 3 sidecars connected c.daprdC.Run(t, ctx) - t.Cleanup(func() { c.daprdC.Cleanup(t) }) c.daprdC.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected_total"])) //nolint:mnd + assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd + + // 2 sidecars connected + c.daprdA.Cleanup(t) + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + metrics = c.scheduler.Metrics(t, ctx) + defer c.metricsMu.Unlock() + assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't disconnect from Scheduler in time") //nolint:mnd + + // 1 sidecar connected + c.daprdB.Cleanup(t) + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + metrics = c.scheduler.Metrics(t, ctx) + defer c.metricsMu.Unlock() + assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't disconnect from Scheduler in time") //nolint:mnd + + // 0 sidecars connected + c.daprdC.Cleanup(t) + assert.EventuallyWithT(t, func(ct *assert.CollectT) { + c.metricsMu.Lock() + metrics = c.scheduler.Metrics(t, ctx) + defer c.metricsMu.Unlock() + assert.Equal(ct, 0, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't disconnect from Scheduler in time") //nolint:mnd }) } From f1b81aa0bbac9e3aefb98b5686b6d8eb3539c756 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 4 Oct 2024 09:43:36 -0500 Subject: [PATCH 054/112] rm mutex. use atomic int Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 5 +++-- .../suite/scheduler/metrics/daprconnections.go | 17 ----------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index dd678393542..bcaee7a6cb4 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -15,6 +15,7 @@ package monitoring import ( "context" + "sync/atomic" "time" "go.opencensus.io/stats" @@ -48,8 +49,8 @@ var ( // RecordSidecarsConnectedCount records the number of dapr sidecars connected to the scheduler service func RecordSidecarsConnectedCount(change int) { - sidecarConnectionCount += int64(change) - stats.RecordWithTags(context.Background(), utils.WithTags(sidecarsConnectedGauge.Name()), sidecarsConnectedGauge.M(int64(sidecarConnectionCount))) + current := atomic.AddInt64(&sidecarConnectionCount, int64(change)) + stats.RecordWithTags(context.Background(), utils.WithTags(sidecarsConnectedGauge.Name()), sidecarsConnectedGauge.M(current)) } // RecordJobsScheduledCount records the number of jobs scheduled to the scheduler service diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 93b1096584d..0ae815528e2 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -15,7 +15,6 @@ package metrics import ( "context" - "sync" "testing" "time" @@ -37,8 +36,6 @@ type daprconnections struct { daprdA *daprd.Daprd daprdB *daprd.Daprd daprdC *daprd.Daprd - - metricsMu sync.Mutex } func (c *daprconnections) Setup(t *testing.T) []framework.Option { @@ -73,17 +70,13 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { t.Run("ensure dapr connection with scheduler metric", func(t *testing.T) { // 0 sidecars connected - c.metricsMu.Lock() metrics := c.scheduler.Metrics(t, ctx) assert.Equal(t, 0, int(metrics["dapr_scheduler_sidecars_connected"])) - c.metricsMu.Unlock() // 1 sidecar connected c.daprdA.Run(t, ctx) c.daprdA.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() - defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd @@ -92,8 +85,6 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.daprdB.Run(t, ctx) c.daprdB.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() - defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd @@ -102,8 +93,6 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { c.daprdC.Run(t, ctx) c.daprdC.WaitUntilRunning(t, ctx) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() - defer c.metricsMu.Unlock() metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd @@ -111,27 +100,21 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { // 2 sidecars connected c.daprdA.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() metrics = c.scheduler.Metrics(t, ctx) - defer c.metricsMu.Unlock() assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't disconnect from Scheduler in time") //nolint:mnd // 1 sidecar connected c.daprdB.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() metrics = c.scheduler.Metrics(t, ctx) - defer c.metricsMu.Unlock() assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't disconnect from Scheduler in time") //nolint:mnd // 0 sidecars connected c.daprdC.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { - c.metricsMu.Lock() metrics = c.scheduler.Metrics(t, ctx) - defer c.metricsMu.Unlock() assert.Equal(ct, 0, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't disconnect from Scheduler in time") //nolint:mnd }) From a9ee0a1032e66eac70a782a90e2d5a247182bdc9 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Fri, 4 Oct 2024 09:53:07 -0500 Subject: [PATCH 055/112] rm sprintf to fix lint Signed-off-by: Cassandra Coyle --- tests/integration/suite/actors/reminders/scheduler/remove.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 6562498f10e..b0775bdce27 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -140,7 +140,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, r.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, fmt.Sprintf("failed to wait for 'triggered' to be greater or equal 1, actual value %d", r.triggered.Load())) //nolint:mnd + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value "+strconv.FormatInt(r.triggered.Load(), 10)) //nolint:mnd _, err = client.UnregisterActorReminder(ctx, &runtimev1pb.UnregisterActorReminderRequest{ ActorType: "myactortype", From bd0428b94b759b529d2f1a520896de70dc54d229 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Mon, 7 Oct 2024 18:40:01 +0100 Subject: [PATCH 056/112] Changes max disseminate delay to 3 seconds Signed-off-by: Elena Kolevska --- cmd/placement/options/options.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 7c57e36453f..3befbca806a 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -38,16 +38,17 @@ const ( defaultReplicationFactor = 100 envMetadataEnabled = "DAPR_PLACEMENT_METADATA_ENABLED" - defaultKeepAliveTime = 2 * time.Second - defaultKeepAliveTimeout = 3 * time.Second - defaultDisseminateTimeout = 2 * time.Second - - keepAliveTimeMin = 1 * time.Second - keepAliveTimeMax = 10 * time.Second - keepAliveTimeoutMin = 1 * time.Second - keepAliveTimeoutMax = 10 * time.Second - disseminateTimeoutMin = 1 * time.Second - disseminateTimeoutMax = 5 * time.Second + keepAliveTimeDefault = 2 * time.Second + keepAliveTimeMin = 1 * time.Second + keepAliveTimeMax = 10 * time.Second + + keepAliveTimeoutDefault = 3 * time.Second + keepAliveTimeoutMin = 1 * time.Second + keepAliveTimeoutMax = 10 * time.Second + + disseminateTimeoutDefault = 2 * time.Second + disseminateTimeoutMin = 1 * time.Second + disseminateTimeoutMax = 3 * time.Second ) type Options struct { @@ -121,9 +122,9 @@ func New(origArgs []string) (*Options, error) { fs.IntVar(&opts.MaxAPILevel, "max-api-level", 10, "If set to >= 0, causes the reported 'api-level' in the cluster to never exceed this value") fs.IntVar(&opts.MinAPILevel, "min-api-level", 0, "Enforces a minimum 'api-level' in the cluster") fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") - fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", defaultKeepAliveTime, "sets the interval at which the placement service sends keepalive pings to daprd \non the gRPC stream to check if the connection is still alive. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") - fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", defaultKeepAliveTimeout, "sets the timeout period for daprd to respond to the placement service's keepalive pings \nbefore the placement service closes the connection. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") - fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", defaultDisseminateTimeout, "sets the timeout period for dissemination to be delayed after actor membership change \nso as to avoid excessive dissemination during multiple pod restarts. \nHigher values will reduce the frequency of dissemination, but delay the table dissemination. \nAccepts values between 1 and 5 seconds") + fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", keepAliveTimeDefault, "sets the interval at which the placement service sends keepalive pings to daprd \non the gRPC stream to check if the connection is still alive. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") + fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", keepAliveTimeoutDefault, "sets the timeout period for daprd to respond to the placement service's keepalive pings \nbefore the placement service closes the connection. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") + fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", disseminateTimeoutDefault, "sets the timeout period for dissemination to be delayed after actor membership change \nso as to avoid excessive dissemination during multiple pod restarts. \nHigher values will reduce the frequency of dissemination, but delay the table dissemination. \nAccepts values between 1 and 5 seconds") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") From 8b92cf55e1c75b875988e28425493e74cbe9b491 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Mon, 7 Oct 2024 18:41:52 +0100 Subject: [PATCH 057/112] updates docs Signed-off-by: Elena Kolevska --- charts/dapr/README.md | 2 +- cmd/placement/options/options.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index 77754a5249b..f5e69d65a58 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -165,7 +165,7 @@ The Helm chart has the follow configuration options that can be supplied: | `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` | | `dapr_placement.keepAliveTime` | Sets the interval at which the placement service sends keepalive pings to daprd on the gRPC stream to check if the connection is still alive. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `2s` | | `dapr_placement.keepAliveTimeout` | Sets the timeout period for daprd to respond to the placement service's keepalive pings before the placement service closes the connection. Lower values will lead to shorter actor rebalancing time in case of pod loss/restart, but higher network traffic during normal operation. Accepts values between `1s` and `10s`.
[Мore info](https://grpc.io/docs/guides/keepalive/) on gRPC keepalive | `3s` | -| `dapr_placement.disseminateTimeout` | Sets the timeout period for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts. Higher values will reduce the frequency of dissemination, but delay the table dissemination. Accepts values between `1s` and `5s` | `2s` | +| `dapr_placement.disseminateTimeout` | Sets the timeout period for dissemination to be delayed after actor membership change (usually related to pod restarts) so as to avoid excessive dissemination during multiple pod restarts. Higher values will reduce the frequency of dissemination, but delay the table dissemination. Accepts values between `1s` and `3s` | `2s` | ### Dapr RBAC options: diff --git a/cmd/placement/options/options.go b/cmd/placement/options/options.go index 3befbca806a..9bea2e4f418 100644 --- a/cmd/placement/options/options.go +++ b/cmd/placement/options/options.go @@ -124,7 +124,7 @@ func New(origArgs []string) (*Options, error) { fs.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes") fs.DurationVar(&opts.KeepAliveTime, "keepalive-time", keepAliveTimeDefault, "sets the interval at which the placement service sends keepalive pings to daprd \non the gRPC stream to check if the connection is still alive. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") fs.DurationVar(&opts.KeepAliveTimeout, "keepalive-timeout", keepAliveTimeoutDefault, "sets the timeout period for daprd to respond to the placement service's keepalive pings \nbefore the placement service closes the connection. \nLower values will lead to shorter actor rebalancing time in case of pod loss/restart, \nbut higher network traffic during normal operation. \nAccepts values between 1 and 10 seconds") - fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", disseminateTimeoutDefault, "sets the timeout period for dissemination to be delayed after actor membership change \nso as to avoid excessive dissemination during multiple pod restarts. \nHigher values will reduce the frequency of dissemination, but delay the table dissemination. \nAccepts values between 1 and 5 seconds") + fs.DurationVar(&opts.DisseminateTimeout, "disseminate-timeout", disseminateTimeoutDefault, "sets the timeout period for dissemination to be delayed after actor membership change \nso as to avoid excessive dissemination during multiple pod restarts. \nHigher values will reduce the frequency of dissemination, but delay the table dissemination. \nAccepts values between 1 and 3 seconds") fs.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane") fs.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") From 94328207b17fca8938eefc8f34548fdb7458d380 Mon Sep 17 00:00:00 2001 From: Artur Souza Date: Tue, 8 Oct 2024 19:27:55 -0700 Subject: [PATCH 058/112] Set permissions to all workflows (try and error) (#8177) Signed-off-by: Artur Souza --- .github/workflows/create-release.yaml | 6 +++ .github/workflows/dapr-3rdparty-images.yaml | 5 +++ .github/workflows/dapr-base-containers.yaml | 6 +++ .github/workflows/dapr-bot-schedule.yml | 10 +++++ .github/workflows/dapr-bot.yml | 7 ++++ .github/workflows/dapr-dev-container.yml | 5 +++ .github/workflows/dapr-perf-components.yml | 12 ++++++ .github/workflows/dapr-perf.yml | 11 ++++++ .github/workflows/dapr-release-notes.yml | 5 +++ .../workflows/dapr-standalone-validation.yml | 4 ++ .../workflows/dapr-sync-feature-branches.yml | 37 ------------------- .github/workflows/dapr-test-azure-cleanup.yml | 2 + .github/workflows/dapr-test-cache-clean.yml | 2 + .github/workflows/dapr-test-sdk.yml | 14 +++++++ .github/workflows/dapr-test.yml | 12 ++++++ .github/workflows/dapr.yml | 19 ++++++++++ .github/workflows/fossa.yml | 5 +++ .github/workflows/kind-e2e.yaml | 4 ++ .github/workflows/test-tooling.yml | 4 ++ .github/workflows/version-skew.yaml | 8 ++++ 20 files changed, 141 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/dapr-sync-feature-branches.yml diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index bbb4a7c2f21..946fdddd515 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -21,10 +21,14 @@ on: required: true type: string +permissions: {} + jobs: create-release: name: Creates release branch and tag runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Check out code uses: actions/checkout@v4 @@ -47,6 +51,8 @@ jobs: name: Triggers the Dapr runtime build runs-on: ubuntu-latest needs: create-release + permissions: + actions: write steps: - name: Triggers the build env: diff --git a/.github/workflows/dapr-3rdparty-images.yaml b/.github/workflows/dapr-3rdparty-images.yaml index 56292168376..fb80b8cdd27 100644 --- a/.github/workflows/dapr-3rdparty-images.yaml +++ b/.github/workflows/dapr-3rdparty-images.yaml @@ -5,9 +5,14 @@ on: - cron: '0 0 1 * *' # trigger on the 1st of every month at midnight workflow_dispatch: +permissions: {} + jobs: mirror: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout diff --git a/.github/workflows/dapr-base-containers.yaml b/.github/workflows/dapr-base-containers.yaml index f1f2f0124d2..08268a0264a 100644 --- a/.github/workflows/dapr-base-containers.yaml +++ b/.github/workflows/dapr-base-containers.yaml @@ -19,6 +19,9 @@ on: # Dispatch on external events repository_dispatch: types: [windows-base] + +permissions: {} + jobs: build: strategy: @@ -30,6 +33,9 @@ jobs: windows-version: "ltsc2022" name: Build base Windows images runs-on: ${{ matrix.os }} + permissions: + contents: read + packages: write env: WINDOWS_VERSION: ${{ matrix.windows-version }} TARGET_OS: windows diff --git a/.github/workflows/dapr-bot-schedule.yml b/.github/workflows/dapr-bot-schedule.yml index 14db252876f..0ad2a418ae9 100644 --- a/.github/workflows/dapr-bot-schedule.yml +++ b/.github/workflows/dapr-bot-schedule.yml @@ -17,11 +17,17 @@ on: schedule: - cron: '*/10 * * * *' workflow_dispatch: + +permissions: {} + jobs: automerge: if: github.repository_owner == 'dapr' name: Automerge and update PRs. runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Checkout repo uses: actions/checkout@v4 @@ -35,6 +41,10 @@ jobs: prune_stale: name: Prune Stale runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write steps: - name: Prune Stale uses: actions/stale@v7.0.0 diff --git a/.github/workflows/dapr-bot.yml b/.github/workflows/dapr-bot.yml index 375507094bc..e3938f99ffe 100644 --- a/.github/workflows/dapr-bot.yml +++ b/.github/workflows/dapr-bot.yml @@ -6,10 +6,17 @@ on: issues: types: [labeled] +permissions: {} + jobs: daprbot: name: bot-processor runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + actions: write steps: - name: Checkout code uses: actions/checkout@v4 # required to make the script available for next step diff --git a/.github/workflows/dapr-dev-container.yml b/.github/workflows/dapr-dev-container.yml index c69b98f96e7..14094844d07 100644 --- a/.github/workflows/dapr-dev-container.yml +++ b/.github/workflows/dapr-dev-container.yml @@ -19,10 +19,15 @@ on: # Run weekly on Tuesdays - cron: "22 03 * * 2" +permissions: {} + jobs: build: name: build dev container runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write env: DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} steps: diff --git a/.github/workflows/dapr-perf-components.yml b/.github/workflows/dapr-perf-components.yml index fb6ed4ff64b..8361a0038b9 100644 --- a/.github/workflows/dapr-perf-components.yml +++ b/.github/workflows/dapr-perf-components.yml @@ -30,6 +30,9 @@ on: # Dispatch on external events repository_dispatch: types: [components-perf-test] + +permissions: {} + env: # Configure proxy for Go modules GOPROXY: https://proxy.golang.org @@ -50,6 +53,9 @@ jobs: deploy-infrastructure: name: Deploy test infrastructure runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Set up for scheduled test if: github.event_name != 'repository_dispatch' @@ -184,6 +190,9 @@ jobs: build: name: Build runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: GOOS: linux GOARCH: amd64 @@ -313,6 +322,9 @@ jobs: - build - deploy-infrastructure runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: GOOS: linux GOARCH: amd64 diff --git a/.github/workflows/dapr-perf.yml b/.github/workflows/dapr-perf.yml index 93e300f20d8..08c772152b5 100644 --- a/.github/workflows/dapr-perf.yml +++ b/.github/workflows/dapr-perf.yml @@ -37,6 +37,8 @@ on: repository_dispatch: types: [perf-test] +permissions: {} + env: # Configure proxy for Go modules GOPROXY: https://proxy.golang.org @@ -57,6 +59,9 @@ jobs: deploy-infrastructure: name: Deploy test infrastructure runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Set up for manual runs if: github.event_name == 'workflow_dispatch' @@ -198,6 +203,9 @@ jobs: build: name: Build runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: GOOS: linux GOARCH: amd64 @@ -333,6 +341,9 @@ jobs: - build - deploy-infrastructure runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: GOOS: linux GOARCH: amd64 diff --git a/.github/workflows/dapr-release-notes.yml b/.github/workflows/dapr-release-notes.yml index bfc6567ea7f..b5f9544ab4d 100644 --- a/.github/workflows/dapr-release-notes.yml +++ b/.github/workflows/dapr-release-notes.yml @@ -15,10 +15,15 @@ name: dapr-release-notes on: workflow_dispatch: + +permissions: {} + jobs: build: name: Generate release notes runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout repo uses: actions/checkout@v4 diff --git a/.github/workflows/dapr-standalone-validation.yml b/.github/workflows/dapr-standalone-validation.yml index 05ea5962801..bc7ec04c6f1 100644 --- a/.github/workflows/dapr-standalone-validation.yml +++ b/.github/workflows/dapr-standalone-validation.yml @@ -29,10 +29,14 @@ on: - release-* - feature/* +permissions: {} + jobs: validate-virt-mem: name: Standalone validations runs-on: ubuntu-latest + permissions: + contents: read env: GOOS: linux GOARCH: amd64 diff --git a/.github/workflows/dapr-sync-feature-branches.yml b/.github/workflows/dapr-sync-feature-branches.yml deleted file mode 100644 index 171eaec8585..00000000000 --- a/.github/workflows/dapr-sync-feature-branches.yml +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright 2022 The Dapr Authors -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -name: dapr-sync-feature-branches - -on: - workflow_dispatch: - push: - branches: - - master -jobs: - merge: - name: Merge master into feature branches - runs-on: ubuntu-latest - strategy: - matrix: - branch: [feature/workflows] - steps: - - name: Merge master -> ${{ matrix.branch }} - # artursouza/merge-branch is a fork of devmasx/merge-branch - # to minimize risk of a 3rd party repo running arbitrary code with our creds - uses: artursouza/merge-branch@v1.4.0 - with: - type: now - from_branch: master - target_branch: ${{ matrix.branch }} - github_token: ${{ secrets.DAPR_BOT_TOKEN }} diff --git a/.github/workflows/dapr-test-azure-cleanup.yml b/.github/workflows/dapr-test-azure-cleanup.yml index 28780b3d997..7a550647a6b 100644 --- a/.github/workflows/dapr-test-azure-cleanup.yml +++ b/.github/workflows/dapr-test-azure-cleanup.yml @@ -23,6 +23,8 @@ on: # Manual trigger workflow_dispatch: +permissions: {} + jobs: cleanup: runs-on: ubuntu-latest diff --git a/.github/workflows/dapr-test-cache-clean.yml b/.github/workflows/dapr-test-cache-clean.yml index 1c0673f2f48..f93b73c5e4a 100644 --- a/.github/workflows/dapr-test-cache-clean.yml +++ b/.github/workflows/dapr-test-cache-clean.yml @@ -22,6 +22,8 @@ on: # Manual trigger workflow_dispatch: +permissions: {} + jobs: cleanup: runs-on: ubuntu-22.04 diff --git a/.github/workflows/dapr-test-sdk.yml b/.github/workflows/dapr-test-sdk.yml index 4ed0ffbaf2b..a94b528b1df 100644 --- a/.github/workflows/dapr-test-sdk.yml +++ b/.github/workflows/dapr-test-sdk.yml @@ -34,6 +34,8 @@ env: GOARCH: amd64 GOPROXY: https://proxy.golang.org +permissions: {} + # Job(s) can be triggered with the following commands: # /test-sdk-all # /test-sdk-python @@ -52,6 +54,9 @@ jobs: ) name: "Python SDK verification tests" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Set up for scheduled test if: github.event_name != 'repository_dispatch' @@ -178,6 +183,9 @@ jobs: ) name: "Java SDK verification tests" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: JDK_VER: 11 JAVA_SPRING_BOOT_VERSION: 2.7.8 @@ -340,6 +348,9 @@ jobs: ) name: "JS SDK verification tests" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: NODE_VER: 18 services: @@ -481,6 +492,9 @@ jobs: ) name: "Go SDK verification tests" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Set up for scheduled test if: github.event_name != 'repository_dispatch' diff --git a/.github/workflows/dapr-test.yml b/.github/workflows/dapr-test.yml index 4fe5fecaec2..0abfa6db38e 100644 --- a/.github/workflows/dapr-test.yml +++ b/.github/workflows/dapr-test.yml @@ -33,6 +33,9 @@ on: # Dispatch on external events repository_dispatch: types: [e2e-test] + +permissions: {} + env: # Configure proxy for Go modules GOPROXY: https://proxy.golang.org @@ -71,6 +74,9 @@ jobs: deploy-infrastructure: name: Deploy test infrastructure runs-on: ubuntu-22.04 + permissions: + contents: read + pull-requests: write steps: - name: Set up for manual runs if: github.event_name == 'workflow_dispatch' @@ -217,6 +223,9 @@ jobs: build: name: Build for ${{ matrix.target_os }} on ${{ matrix.target_arch }} runs-on: ${{ matrix.os }} + permissions: + contents: read + pull-requests: write env: GOOS: ${{ matrix.target_os }} GOARCH: ${{ matrix.target_arch }} @@ -390,6 +399,9 @@ jobs: - deploy-infrastructure # Always run on Linux as the local OS is irrelevant and this is faster runs-on: ubuntu-22.04 + permissions: + contents: read + pull-requests: write env: TARGET_OS: ${{ matrix.target_os }} TARGET_ARCH: ${{ matrix.target_arch }} diff --git a/.github/workflows/dapr.yml b/.github/workflows/dapr.yml index 4245cdf66f3..33191c775b1 100644 --- a/.github/workflows/dapr.yml +++ b/.github/workflows/dapr.yml @@ -31,10 +31,15 @@ on: - master - release-* - feature/* + +permissions: {} + jobs: lint: name: lint & proto validation runs-on: ubuntu-latest + permissions: + contents: read strategy: fail-fast: false matrix: @@ -105,6 +110,8 @@ jobs: name: Unit tests needs: lint runs-on: "${{ matrix.os }}" + permissions: + contents: read strategy: fail-fast: false matrix: @@ -150,6 +157,8 @@ jobs: name: Integration tests needs: lint runs-on: "${{ matrix.os }}" + permissions: + contents: read strategy: fail-fast: false matrix: @@ -189,6 +198,8 @@ jobs: build: name: "Build artifacts on ${{ matrix.job_name }} - ${{ matrix.sidecar_flavor }}" runs-on: "${{ matrix.os }}" + permissions: + contents: read needs: [unit-tests, integration-tests] env: GOOS: "${{ matrix.target_os }}" @@ -377,6 +388,8 @@ jobs: ARTIFACT_DIR: ./release DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -477,6 +490,8 @@ jobs: DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} LATEST_TAG: latest runs-on: ubuntu-latest + permissions: + contents: read strategy: fail-fast: false matrix: @@ -585,6 +600,8 @@ jobs: DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} HELMVER: v3.13.2 runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Set up Helm ${{ env.HELMVER }} uses: azure/setup-helm@v3 @@ -692,6 +709,8 @@ jobs: name: Update the dapr version in long haul tests needs: helmpublish runs-on: ubuntu-latest + permissions: + contents: write if: startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'dapr' env: LONG_HAUL_REPO: test-infra diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index edc753ea6a3..eba09c25be7 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -26,10 +26,15 @@ on: - release-* - feature/* workflow_dispatch: {} + +permissions: {} + jobs: fossa-scan: if: github.repository_owner == 'dapr' # FOSSA is not intended to run on forks. runs-on: ubuntu-latest + permissions: + contents: read env: FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed. steps: diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index e369a31ec3b..1a4d340ce0f 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -27,6 +27,8 @@ defaults: run: shell: bash +permissions: {} + jobs: # This workflow runs our e2e tests in a local KinD cluster. Since it # does not required a paid cluster and special credentials, it does @@ -44,6 +46,8 @@ jobs: e2e: name: e2e runs-on: ubuntu-latest + permissions: + contents: read env: REGISTRY_PORT: 5000 REGISTRY_NAME: kind-registry diff --git a/.github/workflows/test-tooling.yml b/.github/workflows/test-tooling.yml index 8f927d2c4d6..75b6e129ab4 100644 --- a/.github/workflows/test-tooling.yml +++ b/.github/workflows/test-tooling.yml @@ -12,6 +12,8 @@ on: - ".github/workflows/test-tooling.yml" - ".build-tools/*" +permissions: {} + jobs: lint: name: Test (${{ matrix.os}}) @@ -24,6 +26,8 @@ jobs: - "windows-latest" - "macos-latest" runs-on: ${{ matrix.os }} + permissions: + contents: read env: GOLANGCILINT_VER: "v1.61.0" # Make sure to bump /.build-tools/check-lint-version/main_test.go diff --git a/.github/workflows/version-skew.yaml b/.github/workflows/version-skew.yaml index 7488200905c..a1145c6a58f 100644 --- a/.github/workflows/version-skew.yaml +++ b/.github/workflows/version-skew.yaml @@ -27,6 +27,8 @@ defaults: run: shell: bash +permissions: {} + # Jobs can be triggered with the `/test-version-skew` command. You can also # supply a specific version to test against, overriding the current latest # release, e.g. `/test-version-skew 1.10.5`. This is useful for testing @@ -46,6 +48,9 @@ jobs: integration-version-skew: name: integration-version-skew runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write strategy: fail-fast: false # Keep running if one leg fails. matrix: @@ -213,6 +218,9 @@ jobs: e2e-version-skew: name: e2e-version-skew runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write env: REGISTRY_PORT: 5000 REGISTRY_NAME: kind-registry From 30e0e59057a023cae42ffc59cda7e3e782adf92c Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Wed, 9 Oct 2024 09:56:36 -0500 Subject: [PATCH 059/112] Apply suggestions from code review Co-authored-by: Josh van Leeuwen Signed-off-by: Cassie Coyle --- tests/integration/suite/actors/reminders/scheduler/remove.go | 2 +- tests/integration/suite/daprd/jobs/remove.go | 2 +- .../suite/daprd/workflow/scheduler/deletereminder.go | 2 +- tests/integration/suite/scheduler/api/remove.go | 2 +- tests/integration/suite/scheduler/quorum/notls.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 22d08c5796a..59b5c6fcfef 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -116,7 +116,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { }) // Use "path" import, to have the same path separator across OS - etcdKeysPrefix := path.Join("dapr", "jobs") + etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index 98b144bedf2..436009ac991 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -95,7 +95,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { }) // Use "path" import, to have the same path separator across OS - etcdKeysPrefix := path.Join("dapr", "jobs") + etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index a34ff5b7e8d..7e43b253306 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -89,7 +89,7 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { }) // Use "path" import, to have the same path separator across OS - etcdKeysPrefix := path.Join("dapr", "jobs") + etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index a9c10cd2d67..c3b26b8d65c 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -105,7 +105,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) // Use "path" import, to have the same path separator across OS - etcdKeysPrefix := path.Join("dapr", "jobs") + etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := etcdClient.ListAllKeys(ctx, etcdKeysPrefix) diff --git a/tests/integration/suite/scheduler/quorum/notls.go b/tests/integration/suite/scheduler/quorum/notls.go index a7b5f1febeb..1c865f41044 100644 --- a/tests/integration/suite/scheduler/quorum/notls.go +++ b/tests/integration/suite/scheduler/quorum/notls.go @@ -148,7 +148,7 @@ func (n *notls) checkKeysForJobName(t *testing.T, jobName string, keys []*mvccpb t.Helper() // Use "path" import, to have the same path separator across OS - jobPrefix := path.Join("dapr", "jobs", "app") + jobPrefix := "dapr/jobs/app" found := false for _, kv := range keys { if string(kv.Key) == fmt.Sprintf("%s||%s||%s||%s", jobPrefix, "ns", "appid", jobName) { From 1f01043efa8dc13a14d6012a9f557fd4a0e7d5aa Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Wed, 9 Oct 2024 17:27:25 +0100 Subject: [PATCH 060/112] Adds golang/govulncheck-action@v1 PR action (#8179) * Adds golang/govulncheck-action@v1 PR action Signed-off-by: joshvanl * Adds dep check Signed-off-by: joshvanl * Try adding build tags to govul action Signed-off-by: joshvanl * Run govun manually to enable build tags Signed-off-by: joshvanl * Fix tags Signed-off-by: joshvanl * Fix tags again Signed-off-by: joshvanl * Remove the build tags from `pkg/security/fake/fake.go` to make govulncheck work Signed-off-by: joshvanl * Updates github.com/open-policy-agent/opa v0.55.0 -> v0.68.0 Signed-off-by: joshvanl --------- Signed-off-by: joshvanl --- .github/workflows/dapr.yml | 20 +++ go.mod | 66 ++++--- go.sum | 167 +++++++++--------- pkg/security/fake/fake.go | 3 - tests/apps/resiliencyapp/go.mod | 12 +- tests/apps/resiliencyapp/go.sum | 24 +-- tests/apps/resiliencyapp_grpc/go.mod | 12 +- tests/apps/resiliencyapp_grpc/go.sum | 24 +-- .../go.mod | 12 +- .../go.sum | 24 +-- 10 files changed, 186 insertions(+), 178 deletions(-) diff --git a/.github/workflows/dapr.yml b/.github/workflows/dapr.yml index 33191c775b1..32cbeb36962 100644 --- a/.github/workflows/dapr.yml +++ b/.github/workflows/dapr.yml @@ -106,6 +106,26 @@ jobs: rm -r protoc protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip make init-proto make gen-proto check-proto-diff + + depcheck: + name: "Dependency Review" + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Dependency review + uses: actions/dependency-review-action@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + - name: Install govulncheck + run: go install golang.org/x/vuln/cmd/govulncheck@latest + - name: Run govulncheck + run: govulncheck -C '.' -format text --tags=uint,allcomponents,integration ./... + shell: bash + unit-tests: name: Unit tests needs: lint diff --git a/go.mod b/go.mod index 603d92cfb86..e90cb8eb7f8 100644 --- a/go.mod +++ b/go.mod @@ -41,9 +41,9 @@ require ( github.com/microsoft/durabletask-go v0.5.0 github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 - github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/client_model v0.5.0 - github.com/prometheus/common v0.45.0 + github.com/prometheus/client_golang v1.20.2 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.55.0 github.com/redis/go-redis/v9 v9.2.1 github.com/sony/gobreaker v0.5.0 github.com/spf13/cast v1.6.0 @@ -56,22 +56,22 @@ require ( go.etcd.io/etcd/server/v3 v3.5.13 go.mongodb.org/mongo-driver v1.12.1 go.opencensus.io v0.24.0 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 go.opentelemetry.io/otel/exporters/zipkin v1.26.0 - go.opentelemetry.io/otel/sdk v1.26.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 go.uber.org/automaxprocs v1.5.3 go.uber.org/ratelimit v0.3.0 - golang.org/x/crypto v0.24.0 + golang.org/x/crypto v0.26.0 golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 - golang.org/x/net v0.26.0 - golang.org/x/sync v0.7.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d - google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d - google.golang.org/grpc v1.64.1 + golang.org/x/net v0.28.0 + golang.org/x/sync v0.8.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 + google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.30.2 @@ -90,8 +90,7 @@ require ( require ( cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute v1.25.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/datastore v1.15.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/pubsub v1.36.1 // indirect @@ -180,7 +179,7 @@ require ( github.com/bytedance/gopkg v0.0.0-20240711085056-a03554c296f8 // indirect github.com/camunda/zeebe/clients/go/v8 v8.2.12 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chebyrash/promise v0.0.0-20230709133807-42ec49ba1459 // indirect github.com/choleraehyq/pid v0.0.19 // indirect github.com/clbanning/mxj/v2 v2.5.6 // indirect @@ -218,7 +217,6 @@ require ( github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-kit/kit v0.10.0 // indirect @@ -265,7 +263,7 @@ require ( github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/hamba/avro/v2 v2.20.1 // indirect @@ -302,7 +300,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/k0kubun/pp v3.0.1+incompatible // indirect - github.com/klauspost/compress v1.17.7 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/knadh/koanf v1.4.1 // indirect github.com/kubemq-io/kubemq-go v1.7.9 // indirect github.com/kubemq-io/protobuf v1.3.1 // indirect @@ -318,15 +316,14 @@ require ( github.com/linkedin/goavro/v2 v2.12.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/machinebox/graphql v0.2.2 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/marusama/semaphore/v2 v2.5.0 // indirect github.com/matoous/go-nanoid/v2 v2.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/microsoft/go-mssqldb v1.6.0 // indirect - github.com/miekg/dns v1.1.43 // indirect + github.com/miekg/dns v1.1.57 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -346,7 +343,7 @@ require ( github.com/nats-io/nkeys v0.4.6 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect - github.com/open-policy-agent/opa v0.55.0 // indirect + github.com/open-policy-agent/opa v0.68.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/oracle/oci-go-sdk/v54 v54.0.0 // indirect @@ -360,7 +357,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/puzpuzpuz/xsync/v3 v3.0.0 // indirect github.com/rabbitmq/amqp091-go v1.8.1 // indirect @@ -379,7 +376,7 @@ require ( github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/stealthrocket/wasi-go v0.8.1-0.20230912180546-8efbab50fb58 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -417,24 +414,23 @@ require ( go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect go.etcd.io/etcd/raft/v3 v3.5.13 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.10.0 // indirect golang.org/x/mod v0.18.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.6.0 // indirect golang.org/x/tools v0.22.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.169.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect diff --git a/go.sum b/go.sum index 118b608a303..6409e89aaf4 100644 --- a/go.sum +++ b/go.sum @@ -21,10 +21,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= -cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= @@ -356,8 +354,8 @@ 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.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chebyrash/promise v0.0.0-20230709133807-42ec49ba1459 h1:s7UrE2T8jRoriLIddT8fW5+Wf2sXcOgfteXUKD74SaU= github.com/chebyrash/promise v0.0.0-20230709133807-42ec49ba1459/go.mod h1:CQthfPdCoGmlBJAG/sP9Km5nfK1/jGpDf1RiG/LUxXw= github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= @@ -434,7 +432,7 @@ github.com/couchbaselabs/gocbconnstr v1.0.5 h1:e0JokB5qbcz7rfnxEhNRTKz8q1svoRvDo github.com/couchbaselabs/gocbconnstr v1.0.5/go.mod h1:KV3fnIKMi8/AzX0O9zOrO9rofEqrRF1d2rG7qqjxC7o= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -551,8 +549,8 @@ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzP github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= -github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= +github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= +github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= @@ -569,8 +567,6 @@ github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= -github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= @@ -704,8 +700,8 @@ github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EO github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -859,8 +855,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= 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= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1064,8 +1060,8 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= @@ -1132,8 +1128,9 @@ github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0Q github.com/machinebox/graphql v0.2.2 h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkBZfo= github.com/machinebox/graphql v0.2.2/go.mod h1:F+kbVMHuwrQ5tYgU9JXlnskM8nOaFxCAEolaQybkjWA= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -1168,8 +1165,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/microcosm-cc/bluemonday v1.0.24 h1:NGQoPtwGVcbGkKfvyYk1yRqknzBuoMiUrO6R7uFTPlw= github.com/microcosm-cc/bluemonday v1.0.24/go.mod h1:ArQySAMps0790cHSkdPEJ7bGkF2VePWH773hsJNSHf8= github.com/microsoft/durabletask-go v0.5.0 h1:4DWBgg05wnkV/VwakaiPqZ4cARvATP74ZQJFcXVMC18= @@ -1180,8 +1175,8 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= +github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1312,8 +1307,8 @@ github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3 github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/open-policy-agent/opa v0.55.0 h1:s7Vm4ph6zDqqP/KzvUSw9fsKVsm9lhbTZhYGxxTK7mo= -github.com/open-policy-agent/opa v0.55.0/go.mod h1:2Vh8fj/bXCqSwGMbBiHGrw+O8yrho6T/fdaHt5ROmaQ= +github.com/open-policy-agent/opa v0.68.0 h1:Jl3U2vXRjwk7JrHmS19U3HZO5qxQRinQbJ2eCJYSqJQ= +github.com/open-policy-agent/opa v0.68.0/go.mod h1:5E5SvaPwTpwt2WM177I9Z3eT7qUpmOGjk1ZdHs+TZ4w= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1343,8 +1338,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -1395,16 +1390,16 @@ github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -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.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= +github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/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.1.0/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.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1419,8 +1414,8 @@ github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1432,8 +1427,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= @@ -1472,6 +1467,10 @@ github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= @@ -1486,8 +1485,8 @@ github.com/sendgrid/rest v2.6.9+incompatible h1:1EyIcsNdn9KIisLW50MKwmSRSK+ekuei github.com/sendgrid/rest v2.6.9+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= github.com/sendgrid/sendgrid-go v3.13.0+incompatible h1:HZrzc06/QfBGesY9o3n1lvBrRONA+57rbDRKet7plos= github.com/sendgrid/sendgrid-go v3.13.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88= github.com/shirou/gopsutil/v3 v3.22.2 h1:wCrArWFkHYIdDxx/FSfF5RB4dpJYW6t7rcp3+zL8uks= @@ -1525,26 +1524,24 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/spiffe/go-spiffe/v2 v2.1.7 h1:VUkM1yIyg/x8X7u1uXqSRVRCdMdfRIEdFBzpqoeASGk= github.com/spiffe/go-spiffe/v2 v2.1.7/go.mod h1:QJDGdhXllxjxvd5B+2XnhhXB/+rC8gr+lNrtOryiWeE= github.com/stealthrocket/wasi-go v0.8.1-0.20230912180546-8efbab50fb58 h1:mTC4gyv3lcJ1XpzZMAckqkvWUqeT5Bva4RAT1IoHAAA= @@ -1566,8 +1563,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supplyon/gremcos v0.1.40 h1:OFJw3MV44HNE9N6SKYK0zRBbEwyugyyjjqeXiGi5E3w= github.com/supplyon/gremcos v0.1.40/go.mod h1:LI6lxKObicSoIw1N04rHyjz9tGSaevM6Ydbo3XfyZfA= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= @@ -1717,29 +1714,29 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= -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/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= go.opentelemetry.io/otel/exporters/zipkin v1.26.0 h1:sBk6A62GgcQRwcxcBwRMPkqeuSizcpHkXyZNyP281Fw= go.opentelemetry.io/otel/exporters/zipkin v1.26.0/go.mod h1:fLzYtPUxPFzu7rSqhYsCxYheT2dNoPjtKovCLzLm07w= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1808,8 +1805,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1940,8 +1937,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1950,8 +1947,8 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1967,8 +1964,8 @@ golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180828065106-d99a578cf41b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2081,8 +2078,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2094,8 +2091,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2113,8 +2110,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2123,8 +2120,8 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2243,8 +2240,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/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= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2286,10 +2281,10 @@ google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxH google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= 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-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= -google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2321,8 +2316,8 @@ google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzI google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/pkg/security/fake/fake.go b/pkg/security/fake/fake.go index 0eb5964fb4a..a56d57639bb 100644 --- a/pkg/security/fake/fake.go +++ b/pkg/security/fake/fake.go @@ -1,6 +1,3 @@ -//go:build unit -// +build unit - /* Copyright 2023 The Dapr Authors Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/apps/resiliencyapp/go.mod b/tests/apps/resiliencyapp/go.mod index 9a2e05efc85..d12034d7f85 100644 --- a/tests/apps/resiliencyapp/go.mod +++ b/tests/apps/resiliencyapp/go.mod @@ -5,18 +5,18 @@ go 1.23.1 require ( github.com/dapr/dapr v0.0.0 github.com/gorilla/mux v1.8.1 - google.golang.org/grpc v1.64.1 + google.golang.org/grpc v1.66.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 google.golang.org/protobuf v1.34.2 ) require ( github.com/google/uuid v1.6.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect ) replace github.com/dapr/dapr => ../../../ diff --git a/tests/apps/resiliencyapp/go.sum b/tests/apps/resiliencyapp/go.sum index 179746cbb26..ae82a09de08 100644 --- a/tests/apps/resiliencyapp/go.sum +++ b/tests/apps/resiliencyapp/go.sum @@ -10,20 +10,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/tests/apps/resiliencyapp_grpc/go.mod b/tests/apps/resiliencyapp_grpc/go.mod index 7d877b7f838..1620eea6a83 100644 --- a/tests/apps/resiliencyapp_grpc/go.mod +++ b/tests/apps/resiliencyapp_grpc/go.mod @@ -4,17 +4,17 @@ go 1.23.1 require ( github.com/dapr/dapr v1.7.4 - google.golang.org/grpc v1.64.1 + google.golang.org/grpc v1.66.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 google.golang.org/protobuf v1.34.2 ) require ( - go.opentelemetry.io/otel v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect ) replace github.com/dapr/dapr => ../../../ diff --git a/tests/apps/resiliencyapp_grpc/go.sum b/tests/apps/resiliencyapp_grpc/go.sum index acd1c0693c8..6654904a5dc 100644 --- a/tests/apps/resiliencyapp_grpc/go.sum +++ b/tests/apps/resiliencyapp_grpc/go.sum @@ -6,20 +6,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/tests/apps/service_invocation_grpc_proxy_client/go.mod b/tests/apps/service_invocation_grpc_proxy_client/go.mod index 21fe6b20c2c..00cd2235807 100644 --- a/tests/apps/service_invocation_grpc_proxy_client/go.mod +++ b/tests/apps/service_invocation_grpc_proxy_client/go.mod @@ -5,17 +5,17 @@ go 1.23.1 require ( github.com/dapr/dapr v0.0.0-00010101000000-000000000000 github.com/gorilla/mux v1.8.1 - google.golang.org/grpc v1.64.1 + google.golang.org/grpc v1.66.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 ) require ( github.com/google/uuid v1.6.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/tests/apps/service_invocation_grpc_proxy_client/go.sum b/tests/apps/service_invocation_grpc_proxy_client/go.sum index 179746cbb26..ae82a09de08 100644 --- a/tests/apps/service_invocation_grpc_proxy_client/go.sum +++ b/tests/apps/service_invocation_grpc_proxy_client/go.sum @@ -10,20 +10,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= From f564ac26e8c0e3130d17758828a1f86e73f40109 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 14:33:18 -0400 Subject: [PATCH 061/112] update based on PR feedback Signed-off-by: Cassandra Coyle --- .../suite/scheduler/metrics/basic.go | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/basic.go b/tests/integration/suite/scheduler/metrics/basic.go index b2931b65b23..34b42bd1117 100644 --- a/tests/integration/suite/scheduler/metrics/basic.go +++ b/tests/integration/suite/scheduler/metrics/basic.go @@ -16,13 +16,11 @@ package metrics import ( "context" "strconv" - "strings" "testing" "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/protobuf/types/known/anypb" schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" @@ -84,23 +82,21 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { _, err := client.ScheduleJob(ctx, req) require.NoError(t, err) - assert.True(t, b.etcdHasJob(t, ctx, name)) + resp, err := client.GetJob(ctx, &schedulerv1.GetJobRequest{ + Name: name, + Metadata: &schedulerv1.JobMetadata{ + AppId: "appid", + Namespace: "namespace", + Target: &schedulerv1.JobTargetMetadata{ + Type: new(schedulerv1.JobTargetMetadata_Job), + }, + }, + }) + assert.NotNil(t, resp) + require.NoError(t, err) + metrics := b.scheduler.Metrics(t, ctx) assert.Equal(t, i, int(metrics["dapr_scheduler_jobs_created_total"])) } }) } - -func (b *basic) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { - t.Helper() - - // Get keys with prefix - keys := b.scheduler.ETCDClient(t).Get(t, ctx, "", clientv3.WithPrefix()) - for _, k := range keys { - if strings.HasSuffix(k, "||"+key) { - return true - } - } - - return false -} From 1f316d9bb87ecfc9f0fe11d71bc119b89d1f41ca Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 15:02:49 -0400 Subject: [PATCH 062/112] rm unused import & fix e2e with deprecated field Signed-off-by: Cassandra Coyle --- tests/e2e/metrics/metrics_test.go | 4 ++-- tests/integration/suite/actors/reminders/scheduler/remove.go | 1 - tests/integration/suite/daprd/jobs/remove.go | 1 - .../suite/daprd/workflow/scheduler/deletereminder.go | 1 - tests/integration/suite/scheduler/api/remove.go | 1 - tests/integration/suite/scheduler/quorum/notls.go | 1 - 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/e2e/metrics/metrics_test.go b/tests/e2e/metrics/metrics_test.go index e2508a5d663..72eefe8675f 100644 --- a/tests/e2e/metrics/metrics_test.go +++ b/tests/e2e/metrics/metrics_test.go @@ -195,7 +195,7 @@ func testMetricDisabled(t *testing.T, app string, res *http.Response) { func findHTTPMetricFromPrometheus(t *testing.T, app string, res *http.Response) (foundMetric bool) { rfmt := expfmt.ResponseFormat(res.Header) - require.NotEqual(t, rfmt, expfmt.FmtUnknown) + require.NotEqual(t, rfmt, expfmt.TypeUnknown) decoder := expfmt.NewDecoder(res.Body, rfmt) @@ -277,7 +277,7 @@ func testGRPCMetrics(t *testing.T, app string, res *http.Response) { require.NotNil(t, res) rfmt := expfmt.ResponseFormat(res.Header) - require.NotEqual(t, rfmt, expfmt.FmtUnknown) + require.NotEqual(t, rfmt, expfmt.TypeUnknown) decoder := expfmt.NewDecoder(res.Body, rfmt) diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 59b5c6fcfef..e52101e64ea 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -18,7 +18,6 @@ import ( "fmt" "net/http" "os" - "path" "path/filepath" "strconv" "sync/atomic" diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index 436009ac991..897d5b82ef5 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -16,7 +16,6 @@ package jobs import ( "context" "fmt" - "path" "strconv" "sync/atomic" "testing" diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index 7e43b253306..262aa76e252 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -17,7 +17,6 @@ import ( "context" "fmt" "os" - "path" "path/filepath" "testing" "time" diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index c3b26b8d65c..52c6a9a68f1 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -16,7 +16,6 @@ package api import ( "context" "fmt" - "path" "strconv" "testing" "time" diff --git a/tests/integration/suite/scheduler/quorum/notls.go b/tests/integration/suite/scheduler/quorum/notls.go index 1c865f41044..7385bef6067 100644 --- a/tests/integration/suite/scheduler/quorum/notls.go +++ b/tests/integration/suite/scheduler/quorum/notls.go @@ -17,7 +17,6 @@ import ( "context" "fmt" "math/rand" - "path" "strconv" "testing" "time" From 88bcdf20af7e5ffb16b33134611d03bd434674d7 Mon Sep 17 00:00:00 2001 From: Artur Souza Date: Wed, 9 Oct 2024 13:15:43 -0700 Subject: [PATCH 063/112] Add CodeQL as static analysis (#8182) Signed-off-by: Artur Souza --- .github/workflows/dapr.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dapr.yml b/.github/workflows/dapr.yml index 32cbeb36962..80cb4890987 100644 --- a/.github/workflows/dapr.yml +++ b/.github/workflows/dapr.yml @@ -36,7 +36,7 @@ permissions: {} jobs: lint: - name: lint & proto validation + name: static checks runs-on: ubuntu-latest permissions: contents: read @@ -59,6 +59,12 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: "go.mod" + - name: Initialize CodeQL + uses: github/codeql-action/init@v3.25.12 + with: + languages: go + queries: security-and-quality + ram: 4096 - name: Check white space in .md files if: github.event_name == 'pull_request' run: | @@ -106,6 +112,11 @@ jobs: rm -r protoc protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip make init-proto make gen-proto check-proto-diff + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3.26.12 + with: + ram: 4096 + depcheck: name: "Dependency Review" From cd2327b0a2a0349d5d7bcc5d23099cc39f3ee3b0 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 16:25:28 -0400 Subject: [PATCH 064/112] updates per PR feedback Signed-off-by: Cassandra Coyle --- tests/integration/framework/process/daprd/daprd.go | 7 ++++++- .../integration/suite/scheduler/metrics/daprconnections.go | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/integration/framework/process/daprd/daprd.go b/tests/integration/framework/process/daprd/daprd.go index 4465d3ed573..4d7d9a60928 100644 --- a/tests/integration/framework/process/daprd/daprd.go +++ b/tests/integration/framework/process/daprd/daprd.go @@ -24,6 +24,7 @@ import ( "path/filepath" "strconv" "strings" + "sync" "testing" "time" @@ -58,6 +59,8 @@ type Daprd struct { publicPort int metricsPort int profilePort int + + once sync.Once } func New(t *testing.T, fopts ...Option) *Daprd { @@ -181,7 +184,9 @@ func (d *Daprd) Run(t *testing.T, ctx context.Context) { } func (d *Daprd) Cleanup(t *testing.T) { - d.exec.Cleanup(t) + d.once.Do(func() { + d.exec.Cleanup(t) + }) } func (d *Daprd) WaitUntilTCPReady(t *testing.T, ctx context.Context) { diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 0ae815528e2..294c2b6ac90 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -76,6 +76,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { // 1 sidecar connected c.daprdA.Run(t, ctx) c.daprdA.WaitUntilRunning(t, ctx) + t.Cleanup(func() { c.daprdA.Cleanup(t) }) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) @@ -84,6 +85,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { // 2 sidecars connected c.daprdB.Run(t, ctx) c.daprdB.WaitUntilRunning(t, ctx) + t.Cleanup(func() { c.daprdB.Cleanup(t) }) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd @@ -92,6 +94,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { // 3 sidecars connected c.daprdC.Run(t, ctx) c.daprdC.WaitUntilRunning(t, ctx) + t.Cleanup(func() { c.daprdC.Cleanup(t) }) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd From c180836347ce542cb49a2436d3f7fc1fb383084e Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 16:40:27 -0400 Subject: [PATCH 065/112] add client.withprefix to etcd get by default Signed-off-by: Cassandra Coyle --- tests/integration/framework/client/etcd.go | 3 +++ tests/integration/suite/scheduler/api/jobs.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/framework/client/etcd.go b/tests/integration/framework/client/etcd.go index 2ee89275a4f..5cf6a3ef907 100644 --- a/tests/integration/framework/client/etcd.go +++ b/tests/integration/framework/client/etcd.go @@ -67,6 +67,9 @@ func (c *EtcdClient) ListAllKeys(ctx context.Context, prefix string) ([]string, func (c *EtcdClient) Get(t *testing.T, ctx context.Context, prefix string, opts ...clientv3.OpOption) []string { t.Helper() + + opts = append([]clientv3.OpOption{clientv3.WithPrefix()}, opts...) + resp, err := c.client.Get(ctx, prefix, opts...) require.NoError(t, err) diff --git a/tests/integration/suite/scheduler/api/jobs.go b/tests/integration/suite/scheduler/api/jobs.go index d2e267a7316..5ff0d6851ef 100644 --- a/tests/integration/suite/scheduler/api/jobs.go +++ b/tests/integration/suite/scheduler/api/jobs.go @@ -22,7 +22,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/protobuf/types/known/anypb" schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" @@ -131,7 +130,7 @@ func (j *jobs) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { t.Helper() // Get keys with prefix - keys := j.scheduler.ETCDClient(t).Get(t, ctx, "", clientv3.WithPrefix()) + keys := j.scheduler.ETCDClient(t).Get(t, ctx, "") for _, k := range keys { if strings.HasSuffix(k, "||"+key) { return true From 912dff5448284858260d4e859fef869c6e22c66b Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 16:43:09 -0400 Subject: [PATCH 066/112] rm //nolint:mnd Signed-off-by: Cassandra Coyle --- pkg/scheduler/monitoring/metrics.go | 2 +- .../framework/process/scheduler/scheduler.go | 2 +- .../actors/reminders/scheduler/remove.go | 2 +- .../operator/informer/scopes/components.go | 2 +- .../suite/daprd/workflow/scheduler/basic.go | 2 +- .../suite/scheduler/metrics/actors.go | 6 ++--- .../scheduler/metrics/daprconnections.go | 22 +++++++++---------- .../suite/scheduler/metrics/jobstriggered.go | 10 ++++----- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index bcaee7a6cb4..53eab9ea8db 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -95,7 +95,7 @@ func InitMetrics() error { utils.NewMeasureView(sidecarsConnectedGauge, []tag.Key{}, view.LastValue()), utils.NewMeasureView(jobsScheduledTotal, []tag.Key{}, view.Count()), utils.NewMeasureView(jobsTriggeredTotal, []tag.Key{}, view.Count()), - utils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), //nolint:mnd + utils.NewMeasureView(triggerLatency, []tag.Key{}, view.Distribution(0, 100, 500, 1000, 5000, 10000)), ) return err diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 953d48143a0..a2cf0bb77ac 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -224,7 +224,7 @@ func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { return client.Etcd(t, clientv3.Config{ Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, - DialTimeout: 40 * time.Second, //nolint:mnd + DialTimeout: 40 * time.Second, }) } diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index b0775bdce27..424ec1f03ff 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -140,7 +140,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, r.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value "+strconv.FormatInt(r.triggered.Load(), 10)) //nolint:mnd + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value "+strconv.FormatInt(r.triggered.Load(), 10)) _, err = client.UnregisterActorReminder(ctx, &runtimev1pb.UnregisterActorReminderRequest{ ActorType: "myactortype", diff --git a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go index a711ecfaab4..a4b0f1baeb3 100644 --- a/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go +++ b/tests/integration/suite/daprd/hotreload/operator/informer/scopes/components.go @@ -139,7 +139,7 @@ func (c *components) Run(t *testing.T, ctx context.Context) { c.kubeapi.Informer().Modify(t, &comp) require.EventuallyWithT(t, func(ct *assert.CollectT) { assert.Len(ct, c.daprd.GetMetaRegisteredComponents(ct, ctx), 1) - }, time.Second*15, time.Millisecond*10) //nolint:mnd + }, time.Second*15, time.Millisecond*10) comp.Scopes = []string{"foo"} c.operator1.Cleanup(t) diff --git a/tests/integration/suite/daprd/workflow/scheduler/basic.go b/tests/integration/suite/daprd/workflow/scheduler/basic.go index ab09474d5eb..353582ce017 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/basic.go +++ b/tests/integration/suite/daprd/workflow/scheduler/basic.go @@ -200,7 +200,7 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { } } return true - }, 3*time.Second, 10*time.Millisecond) //nolint:mnd + }, 3*time.Second, 10*time.Millisecond) // Terminate the root orchestration b.terminateWorkflow(t, ctx, string(id)) diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index fd284e6f228..aa1c5cc5a7c 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -93,7 +93,7 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Empty(c, keys) - }, time.Second*10, 10*time.Millisecond) //nolint:mnd + }, time.Second*10, 10*time.Millisecond) metrics := a.scheduler.Metrics(t, ctx) assert.Equal(t, 0, int(metrics["dapr_scheduler_jobs_created_total"])) @@ -114,9 +114,9 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) require.NoError(c, rerr) assert.Len(c, keys, 1) - }, time.Second*10, 10*time.Millisecond) //nolint:mnd + }, time.Second*10, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { assert.GreaterOrEqual(c, a.triggered.Load(), int64(1)) - }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", a.triggered.Load()) //nolint:mnd + }, 30*time.Second, 10*time.Millisecond, "failed to wait for 'triggered' to be greater or equal 1, actual value %d", a.triggered.Load()) } diff --git a/tests/integration/suite/scheduler/metrics/daprconnections.go b/tests/integration/suite/scheduler/metrics/daprconnections.go index 294c2b6ac90..b07bc76dab5 100644 --- a/tests/integration/suite/scheduler/metrics/daprconnections.go +++ b/tests/integration/suite/scheduler/metrics/daprconnections.go @@ -80,7 +80,7 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) - }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") //nolint:mnd + }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't connect to Scheduler in time") // 2 sidecars connected c.daprdB.Run(t, ctx) @@ -88,8 +88,8 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { t.Cleanup(func() { c.daprdB.Cleanup(t) }) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd - }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") //nolint:mnd + assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) + }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't connect to Scheduler in time") // 3 sidecars connected c.daprdC.Run(t, ctx) @@ -97,28 +97,28 @@ func (c *daprconnections) Run(t *testing.T, ctx context.Context) { t.Cleanup(func() { c.daprdC.Cleanup(t) }) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd - }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") //nolint:mnd + assert.Equal(ct, 3, int(metrics["dapr_scheduler_sidecars_connected"])) + }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't connect to Scheduler in time") // 2 sidecars connected c.daprdA.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd - }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't disconnect from Scheduler in time") //nolint:mnd + assert.Equal(ct, 2, int(metrics["dapr_scheduler_sidecars_connected"])) + }, 15*time.Second, 10*time.Millisecond, "daprdA sidecar didn't disconnect from Scheduler in time") // 1 sidecar connected c.daprdB.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd - }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't disconnect from Scheduler in time") //nolint:mnd + assert.Equal(ct, 1, int(metrics["dapr_scheduler_sidecars_connected"])) + }, 15*time.Second, 10*time.Millisecond, "daprdB sidecar didn't disconnect from Scheduler in time") // 0 sidecars connected c.daprdC.Cleanup(t) assert.EventuallyWithT(t, func(ct *assert.CollectT) { metrics = c.scheduler.Metrics(t, ctx) - assert.Equal(ct, 0, int(metrics["dapr_scheduler_sidecars_connected"])) //nolint:mnd - }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't disconnect from Scheduler in time") //nolint:mnd + assert.Equal(ct, 0, int(metrics["dapr_scheduler_sidecars_connected"])) + }, 15*time.Second, 10*time.Millisecond, "daprdC sidecar didn't disconnect from Scheduler in time") }) } diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index b697855730b..4ef3b3e7c73 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -121,7 +121,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { }, "ping": { data: func(t *testing.T) *anypb.Any { - anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) //nolint:mnd + anyB, err := anypb.New(&proto.PingResponse{Value: "pong", Counter: 123}) require.NoError(t, err) return anyB }, @@ -130,7 +130,7 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { var ping proto.PingResponse require.NoError(t, job.GetData().UnmarshalTo(&ping)) assert.Equal(t, "pong", ping.GetValue()) - assert.Equal(t, int32(123), ping.GetCounter()) //nolint:mnd + assert.Equal(t, int32(123), ping.GetCounter()) }, }, } @@ -167,14 +167,14 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { assert.Equal(t, int(j.jobstriggeredCount.Load()), int(metrics["dapr_scheduler_trigger_latency_count"])) // ensure the trigger duration is less than 1 second (1000 milliseconds) - assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") //nolint:mnd + assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app assert.Less(t, int64(avgTriggerLatency), receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") - }, time.Second*3, 10*time.Millisecond) //nolint:mnd + }, time.Second*3, 10*time.Millisecond) test.exp(t, job) - case <-time.After(time.Second * 10): //nolint:mnd + case <-time.After(time.Second * 10): assert.Fail(t, "timed out waiting for triggered job") } }) From e13f0e4e843ac6b3fea30c3dc54626cf8fb5f2a7 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Wed, 9 Oct 2024 19:15:11 -0400 Subject: [PATCH 067/112] rm appID label from metric Signed-off-by: Cassandra Coyle --- docs/development/dapr-metrics.md | 2 +- pkg/scheduler/monitoring/metrics.go | 4 ++-- pkg/scheduler/server/api.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development/dapr-metrics.md b/docs/development/dapr-metrics.md index 198990591c3..3b1b97b0780 100644 --- a/docs/development/dapr-metrics.md +++ b/docs/development/dapr-metrics.md @@ -59,7 +59,7 @@ Dapr uses prometheus process and go collectors by default. [monitoring metrics](../../pkg/scheduler/monitoring/metrics.go) -* dapr_scheduler_sidecars_connected_total: The total number of dapr sidecars connected to the scheduler service. +* dapr_scheduler_sidecars_connected: The total number of dapr sidecars connected to the scheduler service. * dapr_scheduler_jobs_created_total: The total number of jobs scheduled. * dapr_scheduler_jobs_triggered_total: The total number of successfully triggered jobs. * dapr_scheduler_trigger_latency: The latency of triggering jobs from the scheduler service. diff --git a/pkg/scheduler/monitoring/metrics.go b/pkg/scheduler/monitoring/metrics.go index 53eab9ea8db..f0abd67074a 100644 --- a/pkg/scheduler/monitoring/metrics.go +++ b/pkg/scheduler/monitoring/metrics.go @@ -84,9 +84,9 @@ func RecordJobsTriggeredCount(jobMetadata *schedulerv1pb.JobMetadata) { } // RecordTriggerDuration records the time it takes to send the job to dapr from the scheduler service -func RecordTriggerDuration(ns string, appID string, start time.Time) { +func RecordTriggerDuration(ns string, start time.Time) { elapsed := time.Since(start).Milliseconds() - stats.RecordWithTags(context.Background(), utils.WithTags(triggerLatency.Name(), ns, appID), triggerLatency.M(float64(elapsed))) + stats.RecordWithTags(context.Background(), utils.WithTags(triggerLatency.Name(), ns), triggerLatency.M(float64(elapsed))) } // InitMetrics initialize the scheduler service metrics. diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index ca7e7928fd5..a3a24730d97 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -185,7 +185,7 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { // another long running go routine that accepts this job on a channel log.Errorf("Error sending job to connection stream: %s", err) } - monitoring.RecordTriggerDuration(meta.GetNamespace(), meta.GetAppId(), now) + monitoring.RecordTriggerDuration(meta.GetNamespace(), now) monitoring.RecordJobsTriggeredCount(&meta) return true From 3d35d283c9083d92ef03c344c4ba9eb162174c27 Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Wed, 9 Oct 2024 18:17:16 -0500 Subject: [PATCH 068/112] fix e2e - update deprecated field (#8183) Signed-off-by: Cassandra Coyle --- tests/e2e/metrics/metrics_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/metrics/metrics_test.go b/tests/e2e/metrics/metrics_test.go index e2508a5d663..72eefe8675f 100644 --- a/tests/e2e/metrics/metrics_test.go +++ b/tests/e2e/metrics/metrics_test.go @@ -195,7 +195,7 @@ func testMetricDisabled(t *testing.T, app string, res *http.Response) { func findHTTPMetricFromPrometheus(t *testing.T, app string, res *http.Response) (foundMetric bool) { rfmt := expfmt.ResponseFormat(res.Header) - require.NotEqual(t, rfmt, expfmt.FmtUnknown) + require.NotEqual(t, rfmt, expfmt.TypeUnknown) decoder := expfmt.NewDecoder(res.Body, rfmt) @@ -277,7 +277,7 @@ func testGRPCMetrics(t *testing.T, app string, res *http.Response) { require.NotNil(t, res) rfmt := expfmt.ResponseFormat(res.Header) - require.NotEqual(t, rfmt, expfmt.FmtUnknown) + require.NotEqual(t, rfmt, expfmt.TypeUnknown) decoder := expfmt.NewDecoder(res.Body, rfmt) From e581aa161f700404e9a01c126be8a70cc09c63e4 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 07:53:19 -0400 Subject: [PATCH 069/112] update comment Signed-off-by: Cassandra Coyle --- tests/integration/suite/actors/reminders/scheduler/remove.go | 2 +- tests/integration/suite/daprd/jobs/remove.go | 2 +- .../suite/daprd/workflow/scheduler/deletereminder.go | 2 +- tests/integration/suite/scheduler/api/remove.go | 2 +- tests/integration/suite/scheduler/quorum/notls.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index e52101e64ea..31652cb2c83 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -114,7 +114,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path" import, to have the same path separator across OS + // should have the same path separator across OS etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index 897d5b82ef5..5f3d1112303 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -93,7 +93,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path" import, to have the same path separator across OS + // should have the same path separator across OS etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index 262aa76e252..a03db7f634f 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -87,7 +87,7 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { DialTimeout: 5 * time.Second, }) - // Use "path" import, to have the same path separator across OS + // should have the same path separator across OS etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index 52c6a9a68f1..a0891d1af9c 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -103,7 +103,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - // Use "path" import, to have the same path separator across OS + // should have the same path separator across OS etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { diff --git a/tests/integration/suite/scheduler/quorum/notls.go b/tests/integration/suite/scheduler/quorum/notls.go index 7385bef6067..16e69d8e11f 100644 --- a/tests/integration/suite/scheduler/quorum/notls.go +++ b/tests/integration/suite/scheduler/quorum/notls.go @@ -146,7 +146,7 @@ func (n *notls) Run(t *testing.T, ctx context.Context) { func (n *notls) checkKeysForJobName(t *testing.T, jobName string, keys []*mvccpb.KeyValue) { t.Helper() - // Use "path" import, to have the same path separator across OS + // should have the same path separator across OS jobPrefix := "dapr/jobs/app" found := false for _, kv := range keys { From f5e9c3f66b1037673c693f1f19f4766f8d1d14c9 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 12:26:01 -0400 Subject: [PATCH 070/112] add ignore-missing flag to see if it fixes e2e failures Signed-off-by: Cassandra Coyle --- .github/workflows/kind-e2e.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 1a4d340ce0f..498f8b35ad2 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -219,11 +219,11 @@ jobs: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 df -h echo "Removing large packages" - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y 'temurin-*' - sudo apt-get remove -y microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get remove -y --ignore-missing '^dotnet-.*' + sudo apt-get remove -y --ignore-missing '^llvm-.*' + sudo apt-get remove -y --ignore-missing 'php.*' + sudo apt-get remove -y --ignore-missing 'temurin-*' + sudo apt-get remove -y --ignore-missing microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean df -h From 53e572d8e169cff359e64cf397ed058d01383284 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 12:34:08 -0400 Subject: [PATCH 071/112] rm dup Signed-off-by: Cassandra Coyle --- tests/integration/suite/daprd/jobs/streaming/stream.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/suite/daprd/jobs/streaming/stream.go b/tests/integration/suite/daprd/jobs/streaming/stream.go index 76132fbefc5..9a5c8c6629c 100644 --- a/tests/integration/suite/daprd/jobs/streaming/stream.go +++ b/tests/integration/suite/daprd/jobs/streaming/stream.go @@ -117,7 +117,6 @@ func (s *streaming) Run(t *testing.T, ctx context.Context) { Schedule: ptr.Of("@every 1s"), DueTime: ptr.Of("0s"), Repeats: ptr.Of(uint32(1)), - DueTime: ptr.Of("0m"), Data: &anypb.Any{ TypeUrl: "type.googleapis.com/google.type.Expr", }, From a1b74011875c2f85daf9798991652e672fd3ca2c Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 12:40:30 -0400 Subject: [PATCH 072/112] rm extra diff Signed-off-by: Cassandra Coyle --- tests/integration/suite/daprd/jobs/streaming/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/suite/daprd/jobs/streaming/stream.go b/tests/integration/suite/daprd/jobs/streaming/stream.go index 9a5c8c6629c..3e4d691b5c9 100644 --- a/tests/integration/suite/daprd/jobs/streaming/stream.go +++ b/tests/integration/suite/daprd/jobs/streaming/stream.go @@ -115,8 +115,8 @@ func (s *streaming) Run(t *testing.T, ctx context.Context) { Job: &runtimev1pb.Job{ Name: "test", Schedule: ptr.Of("@every 1s"), - DueTime: ptr.Of("0s"), Repeats: ptr.Of(uint32(1)), + DueTime: ptr.Of("0m"), Data: &anypb.Any{ TypeUrl: "type.googleapis.com/google.type.Expr", }, From 28bcf464ef50cca64900cd5629fcd17f5b6ed00a Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 12:51:55 -0400 Subject: [PATCH 073/112] revert e2e change that didnt work Signed-off-by: Cassandra Coyle --- .github/workflows/kind-e2e.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 498f8b35ad2..1a4d340ce0f 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -219,11 +219,11 @@ jobs: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 df -h echo "Removing large packages" - sudo apt-get remove -y --ignore-missing '^dotnet-.*' - sudo apt-get remove -y --ignore-missing '^llvm-.*' - sudo apt-get remove -y --ignore-missing 'php.*' - sudo apt-get remove -y --ignore-missing 'temurin-*' - sudo apt-get remove -y --ignore-missing microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y 'temurin-*' + sudo apt-get remove -y microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean df -h From 0b69f6aeb23fbec09b2293f715e4c554e30597d3 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Thu, 10 Oct 2024 09:53:29 -0700 Subject: [PATCH 074/112] fix broken packages when freeing disk space (#8187) Signed-off-by: yaron2 --- .github/workflows/kind-e2e.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 1a4d340ce0f..3b15ad893b2 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -219,6 +219,7 @@ jobs: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 df -h echo "Removing large packages" + sudo apt-get update sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' From 1502e3b779affb51c33a9f2507f4a3b7c727d55a Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Thu, 10 Oct 2024 10:49:59 -0700 Subject: [PATCH 075/112] Add role support to conversational api (#8186) * add role support to conversational api Signed-off-by: yaron2 * linter Signed-off-by: yaron2 * linter Signed-off-by: yaron2 * fix bluemonday dependency Signed-off-by: yaron2 * fix bluemonday dependency Signed-off-by: yaron2 --------- Signed-off-by: yaron2 --- dapr/proto/runtime/v1/dapr.proto | 10 +- go.mod | 73 +- go.sum | 151 +- pkg/api/universal/conversation.go | 10 +- pkg/proto/runtime/v1/dapr.pb.go | 1406 +++++++++-------- .../suite/daprd/conversation/grpc/basic.go | 8 +- .../suite/daprd/conversation/http/basic.go | 2 +- 7 files changed, 889 insertions(+), 771 deletions(-) diff --git a/dapr/proto/runtime/v1/dapr.proto b/dapr/proto/runtime/v1/dapr.proto index 85ca025215d..6d7ab51462c 100644 --- a/dapr/proto/runtime/v1/dapr.proto +++ b/dapr/proto/runtime/v1/dapr.proto @@ -1288,7 +1288,7 @@ message ConversationAlpha1Request { optional string conversationContext = 2; // Inputs for the conversation, support multiple input in one time. - repeated string inputs = 3; + repeated ConversationInput inputs = 3; // Parameters for all custom fields. map parameters = 4; @@ -1297,6 +1297,14 @@ message ConversationAlpha1Request { map metadata = 5; } +message ConversationInput { + // The message to send to the llm + string message = 1; + + // The role to set for the message + optional string role = 2; +} + // ConversationAlpha1Result is the result for one input. message ConversationAlpha1Result { // Result for the one conversation input. diff --git a/go.mod b/go.mod index e90cb8eb7f8..d99ee92de11 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dapr/dapr -go 1.23 +go 1.23.0 toolchain go1.23.1 @@ -12,7 +12,7 @@ require ( github.com/argoproj/argo-rollouts v1.4.1 github.com/cenkalti/backoff/v4 v4.3.0 github.com/cloudevents/sdk-go/v2 v2.15.2 - github.com/dapr/components-contrib v1.14.1-0.20240919155322-be7c19b742b1 + github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb github.com/diagridio/go-etcd-cron v0.2.3 github.com/evanphx/json-patch/v5 v5.9.0 @@ -54,7 +54,7 @@ require ( go.etcd.io/etcd/api/v3 v3.5.14 go.etcd.io/etcd/client/v3 v3.5.14 go.etcd.io/etcd/server/v3 v3.5.13 - go.mongodb.org/mongo-driver v1.12.1 + go.mongodb.org/mongo-driver v1.14.0 go.opencensus.io v0.24.0 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 @@ -88,14 +88,18 @@ require ( sigs.k8s.io/yaml v1.4.0 ) +require github.com/microsoft/go-mssqldb v1.6.0 // indirect + require ( - cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go v0.113.0 // indirect + cloud.google.com/go/auth v0.4.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/datastore v1.15.0 // indirect - cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/pubsub v1.36.1 // indirect - cloud.google.com/go/secretmanager v1.11.5 // indirect - cloud.google.com/go/storage v1.38.0 // indirect + cloud.google.com/go/iam v1.1.7 // indirect + cloud.google.com/go/pubsub v1.37.0 // indirect + cloud.google.com/go/secretmanager v1.12.0 // indirect + cloud.google.com/go/storage v1.40.0 // indirect dubbo.apache.org/dubbo-go/v3 v3.0.3-0.20230118042253-4f159a2b38f3 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -155,21 +159,21 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-msk-iam-sasl-signer-go v1.0.0 // indirect github.com/aws/aws-sdk-go v1.50.19 // indirect - github.com/aws/aws-sdk-go-v2 v1.25.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.18.28 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.27 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 // indirect + github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.3.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 // indirect - github.com/aws/smithy-go v1.20.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f // indirect - github.com/aymerick/douceur v0.2.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.4.0 // indirect @@ -214,7 +218,7 @@ require ( github.com/emirpasic/gods v1.12.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/fasthttp-contrib/sessions v0.0.0-20160905201309-74f6ac73d5d5 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-errors/errors v1.4.2 // indirect @@ -251,14 +255,13 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v2.0.8+incompatible // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.2 // indirect - github.com/gorilla/css v1.0.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.4 // indirect github.com/grandcat/zeroconf v1.0.0 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect @@ -322,7 +325,7 @@ require ( github.com/matoous/go-nanoid/v2 v2.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/microsoft/go-mssqldb v1.6.0 // indirect + github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/miekg/dns v1.1.57 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -364,13 +367,14 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/riferrei/srclient v0.6.0 // indirect - github.com/rs/zerolog v1.28.0 // indirect + github.com/rs/zerolog v1.31.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect github.com/sashabaranov/go-openai v1.27.1 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sendgrid/rest v2.6.9+incompatible // indirect github.com/sendgrid/sendgrid-go v3.13.0+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.22.2 // indirect + github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sijms/go-ora/v2 v2.7.18 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect @@ -390,8 +394,8 @@ require ( github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde // indirect github.com/tjfoc/gmsm v1.3.2 // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.4.0 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/vmware/vmware-go-kcl v1.5.1 // indirect @@ -406,14 +410,14 @@ require ( github.com/yashtewari/glob-intersection v0.2.0 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yuin/gopher-lua v1.1.0 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zeebo/errs v1.3.0 // indirect go.etcd.io/bbolt v1.3.9 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect go.etcd.io/etcd/client/v2 v2.305.13 // indirect go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect go.etcd.io/etcd/raft/v3 v3.5.13 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect @@ -430,8 +434,8 @@ require ( golang.org/x/time v0.6.0 // indirect golang.org/x/tools v0.22.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.169.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/api v0.180.0 // indirect + google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/couchbase/gocb.v1 v1.6.7 // indirect @@ -479,7 +483,6 @@ replace ( // update retracted indirect dependencies if necessary // check for retracted versions: go list -mod=mod -f '{{if .Retracted}}{{.}}{{end}}' -u -m all -replace github.com/microcosm-cc/bluemonday => github.com/microcosm-cc/bluemonday v1.0.24 // Needed due to a deprecated method used in functional tests replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 6409e89aaf4..53a9f64c877 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,12 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= -cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= +cloud.google.com/go v0.113.0 h1:g3C70mn3lWfckKBiCVsAshabrDg01pQ0pnX1MNtnMkA= +cloud.google.com/go v0.113.0/go.mod h1:glEqlogERKYeePz6ZdkcLJ28Q2I6aERgDDErBg9GzO8= +cloud.google.com/go/auth v0.4.1 h1:Z7YNIhlWRtrnKlZke7z3GMqzvuYzdc2z98F9D1NV5Hg= +cloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro= +cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= +cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -28,25 +32,25 @@ cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1 cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= -cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= -cloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM= -cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI= +cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= +cloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA= +cloud.google.com/go/kms v1.15.8 h1:szIeDCowID8th2i8XE4uRev5PMxQFqW+JjwYxL9h6xs= +cloud.google.com/go/kms v1.15.8/go.mod h1:WoUHcDjD9pluCg7pNds131awnH429QGvRM3N/4MyoVs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.36.1 h1:dfEPuGCHGbWUhaMCTHUFjfroILEkx55iUmKBZTP5f+Y= -cloud.google.com/go/pubsub v1.36.1/go.mod h1:iYjCa9EzWOoBiTdd4ps7QoMtMln5NwaZQpK1hbRfBDE= -cloud.google.com/go/secretmanager v1.11.5 h1:82fpF5vBBvu9XW4qj0FU2C6qVMtj1RM/XHwKXUEAfYY= -cloud.google.com/go/secretmanager v1.11.5/go.mod h1:eAGv+DaCHkeVyQi0BeXgAHOU0RdrMeZIASKc+S7VqH4= +cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= +cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= +cloud.google.com/go/secretmanager v1.12.0 h1:e5pIo/QEgiFiHPVJPxM5jbtUr4O/u5h2zLHYtkFQr24= +cloud.google.com/go/secretmanager v1.12.0/go.mod h1:Y1Gne3Ag+fZ2TDTiJc8ZJCMFbi7k1rYT4Rw30GXfvlk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= -cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= +cloud.google.com/go/storage v1.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw= +cloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g= contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= @@ -261,43 +265,43 @@ github.com/aws/aws-sdk-go v1.50.19 h1:YSIDKRSkh/TW0RPWoocdLqtC/T5W6IGBVhFs6P7Qca github.com/aws/aws-sdk-go v1.50.19/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.19.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ= -github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/config v1.18.28 h1:TINEaKyh1Td64tqFvn09iYpKiWjmHYrG1fa91q2gnqw= -github.com/aws/aws-sdk-go-v2/config v1.18.28/go.mod h1:nIL+4/8JdAuNHEjn/gPEXqtnS02Q3NXB/9Z7o5xE4+A= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/credentials v1.13.27 h1:dz0yr/yR1jweAnsCx+BmjerUILVPQ6FS5AwF/OyG1kA= -github.com/aws/aws-sdk-go-v2/credentials v1.13.27/go.mod h1:syOqAek45ZXZp29HlnRS/BNgMIW6uiRmeuQsz4Qh2UE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 h1:kP3Me6Fy3vdi+9uHd7YLr6ewPxRL+PU6y15urfTaamU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5/go.mod h1:Gj7tm95r+QsDoN2Fhuz/3npQvcZbkEf5mL70n3Xfluc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.3.10 h1:z6fAXB4HSuYjrE/P8RU3NdCaN+EPaeq/+80aisCjuF8= github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.3.10/go.mod h1:PoPjOi7j+/DtKIGC58HRfcdWKBPYYXwdKnRG+po+hzo= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 h1:hMUCiE3Zi5AHrRNGf5j985u0WyqI6r2NULhUfo0N/No= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35/go.mod h1:ipR5PvpSPqIqL5Mi82BxLnfMkHVbmco8kUwO2xrCi0M= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 h1:yOpYx+FTBdpk/g+sBU6Cb1H0U/TLEcYYp66mYqsPpcc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29/go.mod h1:M/eUABlDbw2uVrdAn+UsI6M727qp2fxkp8K0ejcBDUY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 h1:8r5m1BoAWkn0TDC34lUculryf7nUF25EgIMdjvGCkgo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36/go.mod h1:Rmw2M1hMVTwiUhjwMoIBFWFJMhvJbct06sSidxInkhY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 h1:IiDolu/eLmuB18DRZibj77n1hHQT7z12jnGO7Ze3pLc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29/go.mod h1:fDbkK4o7fpPXWn8YAPmTieAMuB9mk/VgvW64uaUqxd4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 h1:sWDv7cMITPcZ21QdreULwxOOAmE05JjEsT6fCDtDA9k= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.13/go.mod h1:DfX0sWuT46KpcqbMhJ9QWtxAIP1VozkDWf8VAkByjYY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 h1:BFubHS/xN5bjl818QaroN6mQdjneYQ+AOx44KNXlyH4= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13/go.mod h1:BzqsVVFduubEmzrVtUFQQIQdFqvUItF8XUq2EnS8Wog= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 h1:e5mnydVdCVWxP+5rPAGi2PYxC7u2OZgH1ypC114H04U= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.3/go.mod h1:yVGZA1CPkmUhBdA039jXNJJG7/6t+G+EBWmFq23xqnY= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= -github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f h1:Pf0BjJDga7C98f0vhw+Ip5EaiE07S3lTKpIYPNS0nMo= github.com/awslabs/kinesis-aggregation/go v0.0.0-20210630091500-54e17340d32f/go.mod h1:SghidfnxvX7ribW6nHI7T+IBbc9puZ9kk5Tx/88h8P4= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= @@ -423,7 +427,6 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -447,8 +450,8 @@ github.com/dancannon/gorethink v4.0.0+incompatible h1:KFV7Gha3AuqT+gr0B/eKvGhbjm github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dapr/components-contrib v1.14.1-0.20240919155322-be7c19b742b1 h1:o+WM+f6GNEP3hk78EJSN2c0N1fshAh9VCwz5OhFdGlE= -github.com/dapr/components-contrib v1.14.1-0.20240919155322-be7c19b742b1/go.mod h1:IVmo+NWQ6zAqz7pzQn3+EDppMwjmT8P9xPgowWVhmoM= +github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf h1:9ehvRfNJj83ePSecgut/namMKRXCs5rkmi/5eWCJMfc= +github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf/go.mod h1:bnOi3nIPO8c5S1cgjbcmvak8WZxrtBZUEfzaNKRpypY= github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb h1:ahLO7pMmX6HAuT6/RxYWBY4AN2fXQJcYlU1msY6Kt7U= github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -538,8 +541,8 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -758,8 +761,8 @@ github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76 github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= +github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -787,8 +790,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -815,16 +818,16 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= -github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= +github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= +github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1161,12 +1164,13 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/microcosm-cc/bluemonday v1.0.24 h1:NGQoPtwGVcbGkKfvyYk1yRqknzBuoMiUrO6R7uFTPlw= -github.com/microcosm-cc/bluemonday v1.0.24/go.mod h1:ArQySAMps0790cHSkdPEJ7bGkF2VePWH773hsJNSHf8= +github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= +github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/microsoft/durabletask-go v0.5.0 h1:4DWBgg05wnkV/VwakaiPqZ4cARvATP74ZQJFcXVMC18= github.com/microsoft/durabletask-go v0.5.0/go.mod h1:goe2gmMgLptCijMDQ7JsekaR86KjPUG64V9JDXvKBhE= github.com/microsoft/go-mssqldb v1.6.0 h1:mM3gYdVwEPFrlg/Dvr2DNVEgYFG7L42l+dGc67NNNpc= @@ -1455,9 +1459,9 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1489,8 +1493,13 @@ github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88= -github.com/shirou/gopsutil/v3 v3.22.2 h1:wCrArWFkHYIdDxx/FSfF5RB4dpJYW6t7rcp3+zL8uks= github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= +github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sijms/go-ora/v2 v2.7.18 h1:xl9CUeBlFi261AOKekiiFnfcp3ojHFEedLxIzsj909E= github.com/sijms/go-ora/v2 v2.7.18/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= @@ -1593,12 +1602,14 @@ github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tklauser/go-sysconf v0.3.6/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1662,8 +1673,9 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= github.com/zeebo/errs v1.3.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ= @@ -1700,8 +1712,8 @@ go.etcd.io/etcd/server/v3 v3.5.0-alpha.0/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIy go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= +go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1712,8 +1724,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= @@ -2078,6 +2090,9 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2231,8 +2246,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= -google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.180.0 h1:M2D87Yo0rGBPWpo1orwfCLehUUL6E7/TYe5gvMQWDh4= +google.golang.org/api v0.180.0/go.mod h1:51AiyoEg1MJPSZ9zvklA8VnRILPXxn1iVen9v25XHAE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2279,8 +2294,8 @@ google.golang.org/genproto v0.0.0-20210106152847-07624b53cd92/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -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 v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= +google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= diff --git a/pkg/api/universal/conversation.go b/pkg/api/universal/conversation.go index 0270cb0ace0..d642f216d5e 100644 --- a/pkg/api/universal/conversation.go +++ b/pkg/api/universal/conversation.go @@ -51,7 +51,15 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers return nil, err } - request.Inputs = req.GetInputs() + for _, i := range req.GetInputs() { + c := conversation.ConversationInput{ + Message: i.GetMessage(), + Role: conversation.Role(i.GetRole()), + } + + request.Inputs = append(request.Inputs, c) + } + request.Parameters = req.GetParameters() request.ConversationContext = req.GetConversationContext() diff --git a/pkg/proto/runtime/v1/dapr.pb.go b/pkg/proto/runtime/v1/dapr.pb.go index a23fc196da0..83e29b5fbd2 100644 --- a/pkg/proto/runtime/v1/dapr.pb.go +++ b/pkg/proto/runtime/v1/dapr.pb.go @@ -6852,7 +6852,7 @@ type ConversationAlpha1Request struct { // Conversation context - the Id of an existing chat room (like in ChatGPT) ConversationContext *string `protobuf:"bytes,2,opt,name=conversationContext,proto3,oneof" json:"conversationContext,omitempty"` // Inputs for the conversation, support multiple input in one time. - Inputs []string `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + Inputs []*ConversationInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Parameters for all custom fields. Parameters map[string]*anypb.Any `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The metadata passing to conversation components. @@ -6905,7 +6905,7 @@ func (x *ConversationAlpha1Request) GetConversationContext() string { return "" } -func (x *ConversationAlpha1Request) GetInputs() []string { +func (x *ConversationAlpha1Request) GetInputs() []*ConversationInput { if x != nil { return x.Inputs } @@ -6926,6 +6926,63 @@ func (x *ConversationAlpha1Request) GetMetadata() map[string]string { return nil } +type ConversationInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The message to send to the llm + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // The role to set for the message + Role *string `protobuf:"bytes,2,opt,name=role,proto3,oneof" json:"role,omitempty"` +} + +func (x *ConversationInput) Reset() { + *x = ConversationInput{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConversationInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConversationInput) ProtoMessage() {} + +func (x *ConversationInput) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConversationInput.ProtoReflect.Descriptor instead. +func (*ConversationInput) Descriptor() ([]byte, []int) { + return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{101} +} + +func (x *ConversationInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ConversationInput) GetRole() string { + if x != nil && x.Role != nil { + return *x.Role + } + return "" +} + // ConversationAlpha1Result is the result for one input. type ConversationAlpha1Result struct { state protoimpl.MessageState @@ -6941,7 +6998,7 @@ type ConversationAlpha1Result struct { func (x *ConversationAlpha1Result) Reset() { *x = ConversationAlpha1Result{} if protoimpl.UnsafeEnabled { - mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101] + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6954,7 +7011,7 @@ func (x *ConversationAlpha1Result) String() string { func (*ConversationAlpha1Result) ProtoMessage() {} func (x *ConversationAlpha1Result) ProtoReflect() protoreflect.Message { - mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101] + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6967,7 +7024,7 @@ func (x *ConversationAlpha1Result) ProtoReflect() protoreflect.Message { // Deprecated: Use ConversationAlpha1Result.ProtoReflect.Descriptor instead. func (*ConversationAlpha1Result) Descriptor() ([]byte, []int) { - return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{101} + return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{102} } func (x *ConversationAlpha1Result) GetResult() string { @@ -6999,7 +7056,7 @@ type ConversationAlpha1Response struct { func (x *ConversationAlpha1Response) Reset() { *x = ConversationAlpha1Response{} if protoimpl.UnsafeEnabled { - mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102] + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7012,7 +7069,7 @@ func (x *ConversationAlpha1Response) String() string { func (*ConversationAlpha1Response) ProtoMessage() {} func (x *ConversationAlpha1Response) ProtoReflect() protoreflect.Message { - mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102] + mi := &file_dapr_proto_runtime_v1_dapr_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7025,7 +7082,7 @@ func (x *ConversationAlpha1Response) ProtoReflect() protoreflect.Message { // Deprecated: Use ConversationAlpha1Response.ProtoReflect.Descriptor instead. func (*ConversationAlpha1Response) Descriptor() ([]byte, []int) { - return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{102} + return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{103} } func (x *ConversationAlpha1Response) GetConversationContext() string { @@ -8104,472 +8161,480 @@ var file_dapr_proto_runtime_v1_dapr_proto_rawDesc = []byte{ 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe6, 0x03, 0x0a, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x04, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x60, 0x0a, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x5a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x0f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xe8, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xb6, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x35, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, + 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x4f, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, + 0x22, 0xe8, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2a, 0x57, 0x0a, 0x16, 0x50, 0x75, 0x62, - 0x73, 0x75, 0x62, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x54, 0x49, - 0x43, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, - 0x10, 0x03, 0x32, 0xb5, 0x31, 0x0a, 0x04, 0x44, 0x61, 0x70, 0x72, 0x12, 0x64, 0x0a, 0x0d, 0x49, - 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x69, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x09, 0x53, - 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x2a, 0x57, 0x0a, 0x16, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, + 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x32, 0xb5, 0x31, + 0x0a, 0x04, 0x44, 0x61, 0x70, 0x72, 0x12, 0x64, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x08, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x10, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, - 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6c, 0x6b, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x42, 0x75, 0x6c, 0x6b, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x97, 0x01, 0x0a, 0x1a, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x38, 0x2e, 0x64, 0x61, 0x70, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x1a, 0x39, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, - 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, - 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x32, 0x2e, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, + 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, + 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x15, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x35, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, - 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, - 0x1c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, + 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, - 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x97, 0x01, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x38, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, + 0x39, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, + 0x12, 0x6c, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, + 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, + 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x64, 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, + 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, + 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x1c, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, + 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x8f, 0x01, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x34, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x89, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x93, 0x01, - 0x0a, 0x1e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x34, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0d, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x79, - 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x89, 0x01, 0x0a, + 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x93, 0x01, 0x0a, 0x1e, 0x55, 0x6e, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, + 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, + 0x0a, 0x0d, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, + 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x62, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x74, - 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2a, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, - 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, + 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x52, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, - 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, - 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, - 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, - 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, - 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, - 0x15, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, - 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, - 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, - 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, - 0x0a, 0x12, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, - 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, - 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x5c, 0x0a, 0x13, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x64, 0x0a, - 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x13, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x5e, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x66, 0x0a, 0x18, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, 0x2e, + 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x12, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x74, + 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, + 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, + 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x67, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, + 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, + 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, + 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, - 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, 0x75, 0x72, - 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, - 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, - 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, - 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, + 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x13, 0x50, 0x75, + 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, - 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x17, 0x52, 0x61, 0x69, 0x73, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, - 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, - 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5c, + 0x0a, 0x13, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x14, + 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x18, + 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x63, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0f, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x27, 0x2e, 0x64, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x65, 0x0a, 0x17, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x30, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x08, 0x53, 0x68, 0x75, + 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, + 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x77, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x69, 0x0a, 0x0a, 0x69, 0x6f, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x44, 0x61, 0x70, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x3b, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, + 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x0e, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x69, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x44, 0x61, 0x70, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, + 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8585,7 +8650,7 @@ func file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP() []byte { } var file_dapr_proto_runtime_v1_dapr_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_dapr_proto_runtime_v1_dapr_proto_msgTypes = make([]protoimpl.MessageInfo, 136) +var file_dapr_proto_runtime_v1_dapr_proto_msgTypes = make([]protoimpl.MessageInfo, 137) var file_dapr_proto_runtime_v1_dapr_proto_goTypes = []interface{}{ (PubsubSubscriptionType)(0), // 0: dapr.proto.runtime.v1.PubsubSubscriptionType (ActorRuntime_ActorRuntimeStatus)(0), // 1: dapr.proto.runtime.v1.ActorRuntime.ActorRuntimeStatus @@ -8692,100 +8757,101 @@ var file_dapr_proto_runtime_v1_dapr_proto_goTypes = []interface{}{ (*DeleteJobRequest)(nil), // 102: dapr.proto.runtime.v1.DeleteJobRequest (*DeleteJobResponse)(nil), // 103: dapr.proto.runtime.v1.DeleteJobResponse (*ConversationAlpha1Request)(nil), // 104: dapr.proto.runtime.v1.ConversationAlpha1Request - (*ConversationAlpha1Result)(nil), // 105: dapr.proto.runtime.v1.ConversationAlpha1Result - (*ConversationAlpha1Response)(nil), // 106: dapr.proto.runtime.v1.ConversationAlpha1Response - nil, // 107: dapr.proto.runtime.v1.GetStateRequest.MetadataEntry - nil, // 108: dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry - nil, // 109: dapr.proto.runtime.v1.BulkStateItem.MetadataEntry - nil, // 110: dapr.proto.runtime.v1.GetStateResponse.MetadataEntry - nil, // 111: dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry - nil, // 112: dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry - nil, // 113: dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry - nil, // 114: dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry - nil, // 115: dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry - nil, // 116: dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry - nil, // 117: dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry - nil, // 118: dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry - nil, // 119: dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry - nil, // 120: dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry - nil, // 121: dapr.proto.runtime.v1.GetSecretResponse.DataEntry - nil, // 122: dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry - nil, // 123: dapr.proto.runtime.v1.SecretResponse.SecretsEntry - nil, // 124: dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry - nil, // 125: dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry - nil, // 126: dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry - nil, // 127: dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry - nil, // 128: dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry - nil, // 129: dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntry - nil, // 130: dapr.proto.runtime.v1.PubsubSubscription.MetadataEntry - nil, // 131: dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry - nil, // 132: dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry - nil, // 133: dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry - nil, // 134: dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry - nil, // 135: dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry - nil, // 136: dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry - nil, // 137: dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry - nil, // 138: dapr.proto.runtime.v1.ConversationAlpha1Request.MetadataEntry - nil, // 139: dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry - (*v1.InvokeRequest)(nil), // 140: dapr.proto.common.v1.InvokeRequest - (v1.StateOptions_StateConsistency)(0), // 141: dapr.proto.common.v1.StateOptions.StateConsistency - (*v1.Etag)(nil), // 142: dapr.proto.common.v1.Etag - (*v1.StateOptions)(nil), // 143: dapr.proto.common.v1.StateOptions - (*v1.StateItem)(nil), // 144: dapr.proto.common.v1.StateItem - (*TopicEventResponse)(nil), // 145: dapr.proto.runtime.v1.TopicEventResponse - (*TopicEventRequest)(nil), // 146: dapr.proto.runtime.v1.TopicEventRequest - (*anypb.Any)(nil), // 147: google.protobuf.Any - (*v1.StreamPayload)(nil), // 148: dapr.proto.common.v1.StreamPayload - (*timestamppb.Timestamp)(nil), // 149: google.protobuf.Timestamp - (*v1.ConfigurationItem)(nil), // 150: dapr.proto.common.v1.ConfigurationItem - (*v1.InvokeResponse)(nil), // 151: dapr.proto.common.v1.InvokeResponse - (*emptypb.Empty)(nil), // 152: google.protobuf.Empty + (*ConversationInput)(nil), // 105: dapr.proto.runtime.v1.ConversationInput + (*ConversationAlpha1Result)(nil), // 106: dapr.proto.runtime.v1.ConversationAlpha1Result + (*ConversationAlpha1Response)(nil), // 107: dapr.proto.runtime.v1.ConversationAlpha1Response + nil, // 108: dapr.proto.runtime.v1.GetStateRequest.MetadataEntry + nil, // 109: dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry + nil, // 110: dapr.proto.runtime.v1.BulkStateItem.MetadataEntry + nil, // 111: dapr.proto.runtime.v1.GetStateResponse.MetadataEntry + nil, // 112: dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry + nil, // 113: dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry + nil, // 114: dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry + nil, // 115: dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry + nil, // 116: dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry + nil, // 117: dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry + nil, // 118: dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry + nil, // 119: dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry + nil, // 120: dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry + nil, // 121: dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry + nil, // 122: dapr.proto.runtime.v1.GetSecretResponse.DataEntry + nil, // 123: dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry + nil, // 124: dapr.proto.runtime.v1.SecretResponse.SecretsEntry + nil, // 125: dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry + nil, // 126: dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry + nil, // 127: dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry + nil, // 128: dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry + nil, // 129: dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry + nil, // 130: dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntry + nil, // 131: dapr.proto.runtime.v1.PubsubSubscription.MetadataEntry + nil, // 132: dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry + nil, // 133: dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry + nil, // 134: dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry + nil, // 135: dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry + nil, // 136: dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry + nil, // 137: dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry + nil, // 138: dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry + nil, // 139: dapr.proto.runtime.v1.ConversationAlpha1Request.MetadataEntry + nil, // 140: dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry + (*v1.InvokeRequest)(nil), // 141: dapr.proto.common.v1.InvokeRequest + (v1.StateOptions_StateConsistency)(0), // 142: dapr.proto.common.v1.StateOptions.StateConsistency + (*v1.Etag)(nil), // 143: dapr.proto.common.v1.Etag + (*v1.StateOptions)(nil), // 144: dapr.proto.common.v1.StateOptions + (*v1.StateItem)(nil), // 145: dapr.proto.common.v1.StateItem + (*TopicEventResponse)(nil), // 146: dapr.proto.runtime.v1.TopicEventResponse + (*TopicEventRequest)(nil), // 147: dapr.proto.runtime.v1.TopicEventRequest + (*anypb.Any)(nil), // 148: google.protobuf.Any + (*v1.StreamPayload)(nil), // 149: dapr.proto.common.v1.StreamPayload + (*timestamppb.Timestamp)(nil), // 150: google.protobuf.Timestamp + (*v1.ConfigurationItem)(nil), // 151: dapr.proto.common.v1.ConfigurationItem + (*v1.InvokeResponse)(nil), // 152: dapr.proto.common.v1.InvokeResponse + (*emptypb.Empty)(nil), // 153: google.protobuf.Empty } var file_dapr_proto_runtime_v1_dapr_proto_depIdxs = []int32{ - 140, // 0: dapr.proto.runtime.v1.InvokeServiceRequest.message:type_name -> dapr.proto.common.v1.InvokeRequest - 141, // 1: dapr.proto.runtime.v1.GetStateRequest.consistency:type_name -> dapr.proto.common.v1.StateOptions.StateConsistency - 107, // 2: dapr.proto.runtime.v1.GetStateRequest.metadata:type_name -> dapr.proto.runtime.v1.GetStateRequest.MetadataEntry - 108, // 3: dapr.proto.runtime.v1.GetBulkStateRequest.metadata:type_name -> dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry + 141, // 0: dapr.proto.runtime.v1.InvokeServiceRequest.message:type_name -> dapr.proto.common.v1.InvokeRequest + 142, // 1: dapr.proto.runtime.v1.GetStateRequest.consistency:type_name -> dapr.proto.common.v1.StateOptions.StateConsistency + 108, // 2: dapr.proto.runtime.v1.GetStateRequest.metadata:type_name -> dapr.proto.runtime.v1.GetStateRequest.MetadataEntry + 109, // 3: dapr.proto.runtime.v1.GetBulkStateRequest.metadata:type_name -> dapr.proto.runtime.v1.GetBulkStateRequest.MetadataEntry 8, // 4: dapr.proto.runtime.v1.GetBulkStateResponse.items:type_name -> dapr.proto.runtime.v1.BulkStateItem - 109, // 5: dapr.proto.runtime.v1.BulkStateItem.metadata:type_name -> dapr.proto.runtime.v1.BulkStateItem.MetadataEntry - 110, // 6: dapr.proto.runtime.v1.GetStateResponse.metadata:type_name -> dapr.proto.runtime.v1.GetStateResponse.MetadataEntry - 142, // 7: dapr.proto.runtime.v1.DeleteStateRequest.etag:type_name -> dapr.proto.common.v1.Etag - 143, // 8: dapr.proto.runtime.v1.DeleteStateRequest.options:type_name -> dapr.proto.common.v1.StateOptions - 111, // 9: dapr.proto.runtime.v1.DeleteStateRequest.metadata:type_name -> dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry - 144, // 10: dapr.proto.runtime.v1.DeleteBulkStateRequest.states:type_name -> dapr.proto.common.v1.StateItem - 144, // 11: dapr.proto.runtime.v1.SaveStateRequest.states:type_name -> dapr.proto.common.v1.StateItem - 112, // 12: dapr.proto.runtime.v1.QueryStateRequest.metadata:type_name -> dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry + 110, // 5: dapr.proto.runtime.v1.BulkStateItem.metadata:type_name -> dapr.proto.runtime.v1.BulkStateItem.MetadataEntry + 111, // 6: dapr.proto.runtime.v1.GetStateResponse.metadata:type_name -> dapr.proto.runtime.v1.GetStateResponse.MetadataEntry + 143, // 7: dapr.proto.runtime.v1.DeleteStateRequest.etag:type_name -> dapr.proto.common.v1.Etag + 144, // 8: dapr.proto.runtime.v1.DeleteStateRequest.options:type_name -> dapr.proto.common.v1.StateOptions + 112, // 9: dapr.proto.runtime.v1.DeleteStateRequest.metadata:type_name -> dapr.proto.runtime.v1.DeleteStateRequest.MetadataEntry + 145, // 10: dapr.proto.runtime.v1.DeleteBulkStateRequest.states:type_name -> dapr.proto.common.v1.StateItem + 145, // 11: dapr.proto.runtime.v1.SaveStateRequest.states:type_name -> dapr.proto.common.v1.StateItem + 113, // 12: dapr.proto.runtime.v1.QueryStateRequest.metadata:type_name -> dapr.proto.runtime.v1.QueryStateRequest.MetadataEntry 14, // 13: dapr.proto.runtime.v1.QueryStateResponse.results:type_name -> dapr.proto.runtime.v1.QueryStateItem - 113, // 14: dapr.proto.runtime.v1.QueryStateResponse.metadata:type_name -> dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry - 114, // 15: dapr.proto.runtime.v1.PublishEventRequest.metadata:type_name -> dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry + 114, // 14: dapr.proto.runtime.v1.QueryStateResponse.metadata:type_name -> dapr.proto.runtime.v1.QueryStateResponse.MetadataEntry + 115, // 15: dapr.proto.runtime.v1.PublishEventRequest.metadata:type_name -> dapr.proto.runtime.v1.PublishEventRequest.MetadataEntry 18, // 16: dapr.proto.runtime.v1.BulkPublishRequest.entries:type_name -> dapr.proto.runtime.v1.BulkPublishRequestEntry - 115, // 17: dapr.proto.runtime.v1.BulkPublishRequest.metadata:type_name -> dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry - 116, // 18: dapr.proto.runtime.v1.BulkPublishRequestEntry.metadata:type_name -> dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry + 116, // 17: dapr.proto.runtime.v1.BulkPublishRequest.metadata:type_name -> dapr.proto.runtime.v1.BulkPublishRequest.MetadataEntry + 117, // 18: dapr.proto.runtime.v1.BulkPublishRequestEntry.metadata:type_name -> dapr.proto.runtime.v1.BulkPublishRequestEntry.MetadataEntry 20, // 19: dapr.proto.runtime.v1.BulkPublishResponse.failedEntries:type_name -> dapr.proto.runtime.v1.BulkPublishResponseFailedEntry 22, // 20: dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1.initial_request:type_name -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1 23, // 21: dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1.event_processed:type_name -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestProcessedAlpha1 - 117, // 22: dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.metadata:type_name -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry - 145, // 23: dapr.proto.runtime.v1.SubscribeTopicEventsRequestProcessedAlpha1.status:type_name -> dapr.proto.runtime.v1.TopicEventResponse + 118, // 22: dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.metadata:type_name -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestInitialAlpha1.MetadataEntry + 146, // 23: dapr.proto.runtime.v1.SubscribeTopicEventsRequestProcessedAlpha1.status:type_name -> dapr.proto.runtime.v1.TopicEventResponse 25, // 24: dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1.initial_response:type_name -> dapr.proto.runtime.v1.SubscribeTopicEventsResponseInitialAlpha1 - 146, // 25: dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1.event_message:type_name -> dapr.proto.runtime.v1.TopicEventRequest - 118, // 26: dapr.proto.runtime.v1.InvokeBindingRequest.metadata:type_name -> dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry - 119, // 27: dapr.proto.runtime.v1.InvokeBindingResponse.metadata:type_name -> dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry - 120, // 28: dapr.proto.runtime.v1.GetSecretRequest.metadata:type_name -> dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry - 121, // 29: dapr.proto.runtime.v1.GetSecretResponse.data:type_name -> dapr.proto.runtime.v1.GetSecretResponse.DataEntry - 122, // 30: dapr.proto.runtime.v1.GetBulkSecretRequest.metadata:type_name -> dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry - 123, // 31: dapr.proto.runtime.v1.SecretResponse.secrets:type_name -> dapr.proto.runtime.v1.SecretResponse.SecretsEntry - 124, // 32: dapr.proto.runtime.v1.GetBulkSecretResponse.data:type_name -> dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry - 144, // 33: dapr.proto.runtime.v1.TransactionalStateOperation.request:type_name -> dapr.proto.common.v1.StateItem + 147, // 25: dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1.event_message:type_name -> dapr.proto.runtime.v1.TopicEventRequest + 119, // 26: dapr.proto.runtime.v1.InvokeBindingRequest.metadata:type_name -> dapr.proto.runtime.v1.InvokeBindingRequest.MetadataEntry + 120, // 27: dapr.proto.runtime.v1.InvokeBindingResponse.metadata:type_name -> dapr.proto.runtime.v1.InvokeBindingResponse.MetadataEntry + 121, // 28: dapr.proto.runtime.v1.GetSecretRequest.metadata:type_name -> dapr.proto.runtime.v1.GetSecretRequest.MetadataEntry + 122, // 29: dapr.proto.runtime.v1.GetSecretResponse.data:type_name -> dapr.proto.runtime.v1.GetSecretResponse.DataEntry + 123, // 30: dapr.proto.runtime.v1.GetBulkSecretRequest.metadata:type_name -> dapr.proto.runtime.v1.GetBulkSecretRequest.MetadataEntry + 124, // 31: dapr.proto.runtime.v1.SecretResponse.secrets:type_name -> dapr.proto.runtime.v1.SecretResponse.SecretsEntry + 125, // 32: dapr.proto.runtime.v1.GetBulkSecretResponse.data:type_name -> dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry + 145, // 33: dapr.proto.runtime.v1.TransactionalStateOperation.request:type_name -> dapr.proto.common.v1.StateItem 33, // 34: dapr.proto.runtime.v1.ExecuteStateTransactionRequest.operations:type_name -> dapr.proto.runtime.v1.TransactionalStateOperation - 125, // 35: dapr.proto.runtime.v1.ExecuteStateTransactionRequest.metadata:type_name -> dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry - 126, // 36: dapr.proto.runtime.v1.GetActorStateResponse.metadata:type_name -> dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry + 126, // 35: dapr.proto.runtime.v1.ExecuteStateTransactionRequest.metadata:type_name -> dapr.proto.runtime.v1.ExecuteStateTransactionRequest.MetadataEntry + 127, // 36: dapr.proto.runtime.v1.GetActorStateResponse.metadata:type_name -> dapr.proto.runtime.v1.GetActorStateResponse.MetadataEntry 42, // 37: dapr.proto.runtime.v1.ExecuteActorStateTransactionRequest.operations:type_name -> dapr.proto.runtime.v1.TransactionalActorStateOperation - 147, // 38: dapr.proto.runtime.v1.TransactionalActorStateOperation.value:type_name -> google.protobuf.Any - 127, // 39: dapr.proto.runtime.v1.TransactionalActorStateOperation.metadata:type_name -> dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry - 128, // 40: dapr.proto.runtime.v1.InvokeActorRequest.metadata:type_name -> dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry + 148, // 38: dapr.proto.runtime.v1.TransactionalActorStateOperation.value:type_name -> google.protobuf.Any + 128, // 39: dapr.proto.runtime.v1.TransactionalActorStateOperation.metadata:type_name -> dapr.proto.runtime.v1.TransactionalActorStateOperation.MetadataEntry + 129, // 40: dapr.proto.runtime.v1.InvokeActorRequest.metadata:type_name -> dapr.proto.runtime.v1.InvokeActorRequest.MetadataEntry 48, // 41: dapr.proto.runtime.v1.GetMetadataResponse.active_actors_count:type_name -> dapr.proto.runtime.v1.ActiveActorsCount 49, // 42: dapr.proto.runtime.v1.GetMetadataResponse.registered_components:type_name -> dapr.proto.runtime.v1.RegisteredComponents - 129, // 43: dapr.proto.runtime.v1.GetMetadataResponse.extended_metadata:type_name -> dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntry + 130, // 43: dapr.proto.runtime.v1.GetMetadataResponse.extended_metadata:type_name -> dapr.proto.runtime.v1.GetMetadataResponse.ExtendedMetadataEntry 53, // 44: dapr.proto.runtime.v1.GetMetadataResponse.subscriptions:type_name -> dapr.proto.runtime.v1.PubsubSubscription 50, // 45: dapr.proto.runtime.v1.GetMetadataResponse.http_endpoints:type_name -> dapr.proto.runtime.v1.MetadataHTTPEndpoint 51, // 46: dapr.proto.runtime.v1.GetMetadataResponse.app_connection_properties:type_name -> dapr.proto.runtime.v1.AppConnectionProperties @@ -8793,161 +8859,162 @@ var file_dapr_proto_runtime_v1_dapr_proto_depIdxs = []int32{ 1, // 48: dapr.proto.runtime.v1.ActorRuntime.runtime_status:type_name -> dapr.proto.runtime.v1.ActorRuntime.ActorRuntimeStatus 48, // 49: dapr.proto.runtime.v1.ActorRuntime.active_actors:type_name -> dapr.proto.runtime.v1.ActiveActorsCount 52, // 50: dapr.proto.runtime.v1.AppConnectionProperties.health:type_name -> dapr.proto.runtime.v1.AppConnectionHealthProperties - 130, // 51: dapr.proto.runtime.v1.PubsubSubscription.metadata:type_name -> dapr.proto.runtime.v1.PubsubSubscription.MetadataEntry + 131, // 51: dapr.proto.runtime.v1.PubsubSubscription.metadata:type_name -> dapr.proto.runtime.v1.PubsubSubscription.MetadataEntry 54, // 52: dapr.proto.runtime.v1.PubsubSubscription.rules:type_name -> dapr.proto.runtime.v1.PubsubSubscriptionRules 0, // 53: dapr.proto.runtime.v1.PubsubSubscription.type:type_name -> dapr.proto.runtime.v1.PubsubSubscriptionType 55, // 54: dapr.proto.runtime.v1.PubsubSubscriptionRules.rules:type_name -> dapr.proto.runtime.v1.PubsubSubscriptionRule - 131, // 55: dapr.proto.runtime.v1.GetConfigurationRequest.metadata:type_name -> dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry - 132, // 56: dapr.proto.runtime.v1.GetConfigurationResponse.items:type_name -> dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry - 133, // 57: dapr.proto.runtime.v1.SubscribeConfigurationRequest.metadata:type_name -> dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry - 134, // 58: dapr.proto.runtime.v1.SubscribeConfigurationResponse.items:type_name -> dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry + 132, // 55: dapr.proto.runtime.v1.GetConfigurationRequest.metadata:type_name -> dapr.proto.runtime.v1.GetConfigurationRequest.MetadataEntry + 133, // 56: dapr.proto.runtime.v1.GetConfigurationResponse.items:type_name -> dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry + 134, // 57: dapr.proto.runtime.v1.SubscribeConfigurationRequest.metadata:type_name -> dapr.proto.runtime.v1.SubscribeConfigurationRequest.MetadataEntry + 135, // 58: dapr.proto.runtime.v1.SubscribeConfigurationResponse.items:type_name -> dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry 2, // 59: dapr.proto.runtime.v1.UnlockResponse.status:type_name -> dapr.proto.runtime.v1.UnlockResponse.Status 3, // 60: dapr.proto.runtime.v1.SubtleGetKeyRequest.format:type_name -> dapr.proto.runtime.v1.SubtleGetKeyRequest.KeyFormat 82, // 61: dapr.proto.runtime.v1.EncryptRequest.options:type_name -> dapr.proto.runtime.v1.EncryptRequestOptions - 148, // 62: dapr.proto.runtime.v1.EncryptRequest.payload:type_name -> dapr.proto.common.v1.StreamPayload - 148, // 63: dapr.proto.runtime.v1.EncryptResponse.payload:type_name -> dapr.proto.common.v1.StreamPayload + 149, // 62: dapr.proto.runtime.v1.EncryptRequest.payload:type_name -> dapr.proto.common.v1.StreamPayload + 149, // 63: dapr.proto.runtime.v1.EncryptResponse.payload:type_name -> dapr.proto.common.v1.StreamPayload 85, // 64: dapr.proto.runtime.v1.DecryptRequest.options:type_name -> dapr.proto.runtime.v1.DecryptRequestOptions - 148, // 65: dapr.proto.runtime.v1.DecryptRequest.payload:type_name -> dapr.proto.common.v1.StreamPayload - 148, // 66: dapr.proto.runtime.v1.DecryptResponse.payload:type_name -> dapr.proto.common.v1.StreamPayload - 149, // 67: dapr.proto.runtime.v1.GetWorkflowResponse.created_at:type_name -> google.protobuf.Timestamp - 149, // 68: dapr.proto.runtime.v1.GetWorkflowResponse.last_updated_at:type_name -> google.protobuf.Timestamp - 135, // 69: dapr.proto.runtime.v1.GetWorkflowResponse.properties:type_name -> dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry - 136, // 70: dapr.proto.runtime.v1.StartWorkflowRequest.options:type_name -> dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry - 147, // 71: dapr.proto.runtime.v1.Job.data:type_name -> google.protobuf.Any + 149, // 65: dapr.proto.runtime.v1.DecryptRequest.payload:type_name -> dapr.proto.common.v1.StreamPayload + 149, // 66: dapr.proto.runtime.v1.DecryptResponse.payload:type_name -> dapr.proto.common.v1.StreamPayload + 150, // 67: dapr.proto.runtime.v1.GetWorkflowResponse.created_at:type_name -> google.protobuf.Timestamp + 150, // 68: dapr.proto.runtime.v1.GetWorkflowResponse.last_updated_at:type_name -> google.protobuf.Timestamp + 136, // 69: dapr.proto.runtime.v1.GetWorkflowResponse.properties:type_name -> dapr.proto.runtime.v1.GetWorkflowResponse.PropertiesEntry + 137, // 70: dapr.proto.runtime.v1.StartWorkflowRequest.options:type_name -> dapr.proto.runtime.v1.StartWorkflowRequest.OptionsEntry + 148, // 71: dapr.proto.runtime.v1.Job.data:type_name -> google.protobuf.Any 97, // 72: dapr.proto.runtime.v1.ScheduleJobRequest.job:type_name -> dapr.proto.runtime.v1.Job 97, // 73: dapr.proto.runtime.v1.GetJobResponse.job:type_name -> dapr.proto.runtime.v1.Job - 137, // 74: dapr.proto.runtime.v1.ConversationAlpha1Request.parameters:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry - 138, // 75: dapr.proto.runtime.v1.ConversationAlpha1Request.metadata:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Request.MetadataEntry - 139, // 76: dapr.proto.runtime.v1.ConversationAlpha1Result.parameters:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry - 105, // 77: dapr.proto.runtime.v1.ConversationAlpha1Response.outputs:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Result - 31, // 78: dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry.value:type_name -> dapr.proto.runtime.v1.SecretResponse - 150, // 79: dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry.value:type_name -> dapr.proto.common.v1.ConfigurationItem - 150, // 80: dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry.value:type_name -> dapr.proto.common.v1.ConfigurationItem - 147, // 81: dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry.value:type_name -> google.protobuf.Any - 147, // 82: dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry.value:type_name -> google.protobuf.Any - 4, // 83: dapr.proto.runtime.v1.Dapr.InvokeService:input_type -> dapr.proto.runtime.v1.InvokeServiceRequest - 5, // 84: dapr.proto.runtime.v1.Dapr.GetState:input_type -> dapr.proto.runtime.v1.GetStateRequest - 6, // 85: dapr.proto.runtime.v1.Dapr.GetBulkState:input_type -> dapr.proto.runtime.v1.GetBulkStateRequest - 12, // 86: dapr.proto.runtime.v1.Dapr.SaveState:input_type -> dapr.proto.runtime.v1.SaveStateRequest - 13, // 87: dapr.proto.runtime.v1.Dapr.QueryStateAlpha1:input_type -> dapr.proto.runtime.v1.QueryStateRequest - 10, // 88: dapr.proto.runtime.v1.Dapr.DeleteState:input_type -> dapr.proto.runtime.v1.DeleteStateRequest - 11, // 89: dapr.proto.runtime.v1.Dapr.DeleteBulkState:input_type -> dapr.proto.runtime.v1.DeleteBulkStateRequest - 34, // 90: dapr.proto.runtime.v1.Dapr.ExecuteStateTransaction:input_type -> dapr.proto.runtime.v1.ExecuteStateTransactionRequest - 16, // 91: dapr.proto.runtime.v1.Dapr.PublishEvent:input_type -> dapr.proto.runtime.v1.PublishEventRequest - 17, // 92: dapr.proto.runtime.v1.Dapr.BulkPublishEventAlpha1:input_type -> dapr.proto.runtime.v1.BulkPublishRequest - 21, // 93: dapr.proto.runtime.v1.Dapr.SubscribeTopicEventsAlpha1:input_type -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1 - 26, // 94: dapr.proto.runtime.v1.Dapr.InvokeBinding:input_type -> dapr.proto.runtime.v1.InvokeBindingRequest - 28, // 95: dapr.proto.runtime.v1.Dapr.GetSecret:input_type -> dapr.proto.runtime.v1.GetSecretRequest - 30, // 96: dapr.proto.runtime.v1.Dapr.GetBulkSecret:input_type -> dapr.proto.runtime.v1.GetBulkSecretRequest - 35, // 97: dapr.proto.runtime.v1.Dapr.RegisterActorTimer:input_type -> dapr.proto.runtime.v1.RegisterActorTimerRequest - 36, // 98: dapr.proto.runtime.v1.Dapr.UnregisterActorTimer:input_type -> dapr.proto.runtime.v1.UnregisterActorTimerRequest - 37, // 99: dapr.proto.runtime.v1.Dapr.RegisterActorReminder:input_type -> dapr.proto.runtime.v1.RegisterActorReminderRequest - 38, // 100: dapr.proto.runtime.v1.Dapr.UnregisterActorReminder:input_type -> dapr.proto.runtime.v1.UnregisterActorReminderRequest - 39, // 101: dapr.proto.runtime.v1.Dapr.GetActorState:input_type -> dapr.proto.runtime.v1.GetActorStateRequest - 41, // 102: dapr.proto.runtime.v1.Dapr.ExecuteActorStateTransaction:input_type -> dapr.proto.runtime.v1.ExecuteActorStateTransactionRequest - 43, // 103: dapr.proto.runtime.v1.Dapr.InvokeActor:input_type -> dapr.proto.runtime.v1.InvokeActorRequest - 57, // 104: dapr.proto.runtime.v1.Dapr.GetConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.GetConfigurationRequest - 57, // 105: dapr.proto.runtime.v1.Dapr.GetConfiguration:input_type -> dapr.proto.runtime.v1.GetConfigurationRequest - 59, // 106: dapr.proto.runtime.v1.Dapr.SubscribeConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.SubscribeConfigurationRequest - 59, // 107: dapr.proto.runtime.v1.Dapr.SubscribeConfiguration:input_type -> dapr.proto.runtime.v1.SubscribeConfigurationRequest - 60, // 108: dapr.proto.runtime.v1.Dapr.UnsubscribeConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationRequest - 60, // 109: dapr.proto.runtime.v1.Dapr.UnsubscribeConfiguration:input_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationRequest - 63, // 110: dapr.proto.runtime.v1.Dapr.TryLockAlpha1:input_type -> dapr.proto.runtime.v1.TryLockRequest - 65, // 111: dapr.proto.runtime.v1.Dapr.UnlockAlpha1:input_type -> dapr.proto.runtime.v1.UnlockRequest - 81, // 112: dapr.proto.runtime.v1.Dapr.EncryptAlpha1:input_type -> dapr.proto.runtime.v1.EncryptRequest - 84, // 113: dapr.proto.runtime.v1.Dapr.DecryptAlpha1:input_type -> dapr.proto.runtime.v1.DecryptRequest - 45, // 114: dapr.proto.runtime.v1.Dapr.GetMetadata:input_type -> dapr.proto.runtime.v1.GetMetadataRequest - 56, // 115: dapr.proto.runtime.v1.Dapr.SetMetadata:input_type -> dapr.proto.runtime.v1.SetMetadataRequest - 67, // 116: dapr.proto.runtime.v1.Dapr.SubtleGetKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleGetKeyRequest - 69, // 117: dapr.proto.runtime.v1.Dapr.SubtleEncryptAlpha1:input_type -> dapr.proto.runtime.v1.SubtleEncryptRequest - 71, // 118: dapr.proto.runtime.v1.Dapr.SubtleDecryptAlpha1:input_type -> dapr.proto.runtime.v1.SubtleDecryptRequest - 73, // 119: dapr.proto.runtime.v1.Dapr.SubtleWrapKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleWrapKeyRequest - 75, // 120: dapr.proto.runtime.v1.Dapr.SubtleUnwrapKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleUnwrapKeyRequest - 77, // 121: dapr.proto.runtime.v1.Dapr.SubtleSignAlpha1:input_type -> dapr.proto.runtime.v1.SubtleSignRequest - 79, // 122: dapr.proto.runtime.v1.Dapr.SubtleVerifyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleVerifyRequest - 89, // 123: dapr.proto.runtime.v1.Dapr.StartWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.StartWorkflowRequest - 87, // 124: dapr.proto.runtime.v1.Dapr.GetWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.GetWorkflowRequest - 95, // 125: dapr.proto.runtime.v1.Dapr.PurgeWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.PurgeWorkflowRequest - 91, // 126: dapr.proto.runtime.v1.Dapr.TerminateWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.TerminateWorkflowRequest - 92, // 127: dapr.proto.runtime.v1.Dapr.PauseWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.PauseWorkflowRequest - 93, // 128: dapr.proto.runtime.v1.Dapr.ResumeWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.ResumeWorkflowRequest - 94, // 129: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.RaiseEventWorkflowRequest - 89, // 130: dapr.proto.runtime.v1.Dapr.StartWorkflowBeta1:input_type -> dapr.proto.runtime.v1.StartWorkflowRequest - 87, // 131: dapr.proto.runtime.v1.Dapr.GetWorkflowBeta1:input_type -> dapr.proto.runtime.v1.GetWorkflowRequest - 95, // 132: dapr.proto.runtime.v1.Dapr.PurgeWorkflowBeta1:input_type -> dapr.proto.runtime.v1.PurgeWorkflowRequest - 91, // 133: dapr.proto.runtime.v1.Dapr.TerminateWorkflowBeta1:input_type -> dapr.proto.runtime.v1.TerminateWorkflowRequest - 92, // 134: dapr.proto.runtime.v1.Dapr.PauseWorkflowBeta1:input_type -> dapr.proto.runtime.v1.PauseWorkflowRequest - 93, // 135: dapr.proto.runtime.v1.Dapr.ResumeWorkflowBeta1:input_type -> dapr.proto.runtime.v1.ResumeWorkflowRequest - 94, // 136: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowBeta1:input_type -> dapr.proto.runtime.v1.RaiseEventWorkflowRequest - 96, // 137: dapr.proto.runtime.v1.Dapr.Shutdown:input_type -> dapr.proto.runtime.v1.ShutdownRequest - 98, // 138: dapr.proto.runtime.v1.Dapr.ScheduleJobAlpha1:input_type -> dapr.proto.runtime.v1.ScheduleJobRequest - 100, // 139: dapr.proto.runtime.v1.Dapr.GetJobAlpha1:input_type -> dapr.proto.runtime.v1.GetJobRequest - 102, // 140: dapr.proto.runtime.v1.Dapr.DeleteJobAlpha1:input_type -> dapr.proto.runtime.v1.DeleteJobRequest - 104, // 141: dapr.proto.runtime.v1.Dapr.ConverseAlpha1:input_type -> dapr.proto.runtime.v1.ConversationAlpha1Request - 151, // 142: dapr.proto.runtime.v1.Dapr.InvokeService:output_type -> dapr.proto.common.v1.InvokeResponse - 9, // 143: dapr.proto.runtime.v1.Dapr.GetState:output_type -> dapr.proto.runtime.v1.GetStateResponse - 7, // 144: dapr.proto.runtime.v1.Dapr.GetBulkState:output_type -> dapr.proto.runtime.v1.GetBulkStateResponse - 152, // 145: dapr.proto.runtime.v1.Dapr.SaveState:output_type -> google.protobuf.Empty - 15, // 146: dapr.proto.runtime.v1.Dapr.QueryStateAlpha1:output_type -> dapr.proto.runtime.v1.QueryStateResponse - 152, // 147: dapr.proto.runtime.v1.Dapr.DeleteState:output_type -> google.protobuf.Empty - 152, // 148: dapr.proto.runtime.v1.Dapr.DeleteBulkState:output_type -> google.protobuf.Empty - 152, // 149: dapr.proto.runtime.v1.Dapr.ExecuteStateTransaction:output_type -> google.protobuf.Empty - 152, // 150: dapr.proto.runtime.v1.Dapr.PublishEvent:output_type -> google.protobuf.Empty - 19, // 151: dapr.proto.runtime.v1.Dapr.BulkPublishEventAlpha1:output_type -> dapr.proto.runtime.v1.BulkPublishResponse - 24, // 152: dapr.proto.runtime.v1.Dapr.SubscribeTopicEventsAlpha1:output_type -> dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1 - 27, // 153: dapr.proto.runtime.v1.Dapr.InvokeBinding:output_type -> dapr.proto.runtime.v1.InvokeBindingResponse - 29, // 154: dapr.proto.runtime.v1.Dapr.GetSecret:output_type -> dapr.proto.runtime.v1.GetSecretResponse - 32, // 155: dapr.proto.runtime.v1.Dapr.GetBulkSecret:output_type -> dapr.proto.runtime.v1.GetBulkSecretResponse - 152, // 156: dapr.proto.runtime.v1.Dapr.RegisterActorTimer:output_type -> google.protobuf.Empty - 152, // 157: dapr.proto.runtime.v1.Dapr.UnregisterActorTimer:output_type -> google.protobuf.Empty - 152, // 158: dapr.proto.runtime.v1.Dapr.RegisterActorReminder:output_type -> google.protobuf.Empty - 152, // 159: dapr.proto.runtime.v1.Dapr.UnregisterActorReminder:output_type -> google.protobuf.Empty - 40, // 160: dapr.proto.runtime.v1.Dapr.GetActorState:output_type -> dapr.proto.runtime.v1.GetActorStateResponse - 152, // 161: dapr.proto.runtime.v1.Dapr.ExecuteActorStateTransaction:output_type -> google.protobuf.Empty - 44, // 162: dapr.proto.runtime.v1.Dapr.InvokeActor:output_type -> dapr.proto.runtime.v1.InvokeActorResponse - 58, // 163: dapr.proto.runtime.v1.Dapr.GetConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.GetConfigurationResponse - 58, // 164: dapr.proto.runtime.v1.Dapr.GetConfiguration:output_type -> dapr.proto.runtime.v1.GetConfigurationResponse - 61, // 165: dapr.proto.runtime.v1.Dapr.SubscribeConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.SubscribeConfigurationResponse - 61, // 166: dapr.proto.runtime.v1.Dapr.SubscribeConfiguration:output_type -> dapr.proto.runtime.v1.SubscribeConfigurationResponse - 62, // 167: dapr.proto.runtime.v1.Dapr.UnsubscribeConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationResponse - 62, // 168: dapr.proto.runtime.v1.Dapr.UnsubscribeConfiguration:output_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationResponse - 64, // 169: dapr.proto.runtime.v1.Dapr.TryLockAlpha1:output_type -> dapr.proto.runtime.v1.TryLockResponse - 66, // 170: dapr.proto.runtime.v1.Dapr.UnlockAlpha1:output_type -> dapr.proto.runtime.v1.UnlockResponse - 83, // 171: dapr.proto.runtime.v1.Dapr.EncryptAlpha1:output_type -> dapr.proto.runtime.v1.EncryptResponse - 86, // 172: dapr.proto.runtime.v1.Dapr.DecryptAlpha1:output_type -> dapr.proto.runtime.v1.DecryptResponse - 46, // 173: dapr.proto.runtime.v1.Dapr.GetMetadata:output_type -> dapr.proto.runtime.v1.GetMetadataResponse - 152, // 174: dapr.proto.runtime.v1.Dapr.SetMetadata:output_type -> google.protobuf.Empty - 68, // 175: dapr.proto.runtime.v1.Dapr.SubtleGetKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleGetKeyResponse - 70, // 176: dapr.proto.runtime.v1.Dapr.SubtleEncryptAlpha1:output_type -> dapr.proto.runtime.v1.SubtleEncryptResponse - 72, // 177: dapr.proto.runtime.v1.Dapr.SubtleDecryptAlpha1:output_type -> dapr.proto.runtime.v1.SubtleDecryptResponse - 74, // 178: dapr.proto.runtime.v1.Dapr.SubtleWrapKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleWrapKeyResponse - 76, // 179: dapr.proto.runtime.v1.Dapr.SubtleUnwrapKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleUnwrapKeyResponse - 78, // 180: dapr.proto.runtime.v1.Dapr.SubtleSignAlpha1:output_type -> dapr.proto.runtime.v1.SubtleSignResponse - 80, // 181: dapr.proto.runtime.v1.Dapr.SubtleVerifyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleVerifyResponse - 90, // 182: dapr.proto.runtime.v1.Dapr.StartWorkflowAlpha1:output_type -> dapr.proto.runtime.v1.StartWorkflowResponse - 88, // 183: dapr.proto.runtime.v1.Dapr.GetWorkflowAlpha1:output_type -> dapr.proto.runtime.v1.GetWorkflowResponse - 152, // 184: dapr.proto.runtime.v1.Dapr.PurgeWorkflowAlpha1:output_type -> google.protobuf.Empty - 152, // 185: dapr.proto.runtime.v1.Dapr.TerminateWorkflowAlpha1:output_type -> google.protobuf.Empty - 152, // 186: dapr.proto.runtime.v1.Dapr.PauseWorkflowAlpha1:output_type -> google.protobuf.Empty - 152, // 187: dapr.proto.runtime.v1.Dapr.ResumeWorkflowAlpha1:output_type -> google.protobuf.Empty - 152, // 188: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowAlpha1:output_type -> google.protobuf.Empty - 90, // 189: dapr.proto.runtime.v1.Dapr.StartWorkflowBeta1:output_type -> dapr.proto.runtime.v1.StartWorkflowResponse - 88, // 190: dapr.proto.runtime.v1.Dapr.GetWorkflowBeta1:output_type -> dapr.proto.runtime.v1.GetWorkflowResponse - 152, // 191: dapr.proto.runtime.v1.Dapr.PurgeWorkflowBeta1:output_type -> google.protobuf.Empty - 152, // 192: dapr.proto.runtime.v1.Dapr.TerminateWorkflowBeta1:output_type -> google.protobuf.Empty - 152, // 193: dapr.proto.runtime.v1.Dapr.PauseWorkflowBeta1:output_type -> google.protobuf.Empty - 152, // 194: dapr.proto.runtime.v1.Dapr.ResumeWorkflowBeta1:output_type -> google.protobuf.Empty - 152, // 195: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowBeta1:output_type -> google.protobuf.Empty - 152, // 196: dapr.proto.runtime.v1.Dapr.Shutdown:output_type -> google.protobuf.Empty - 99, // 197: dapr.proto.runtime.v1.Dapr.ScheduleJobAlpha1:output_type -> dapr.proto.runtime.v1.ScheduleJobResponse - 101, // 198: dapr.proto.runtime.v1.Dapr.GetJobAlpha1:output_type -> dapr.proto.runtime.v1.GetJobResponse - 103, // 199: dapr.proto.runtime.v1.Dapr.DeleteJobAlpha1:output_type -> dapr.proto.runtime.v1.DeleteJobResponse - 106, // 200: dapr.proto.runtime.v1.Dapr.ConverseAlpha1:output_type -> dapr.proto.runtime.v1.ConversationAlpha1Response - 142, // [142:201] is the sub-list for method output_type - 83, // [83:142] is the sub-list for method input_type - 83, // [83:83] is the sub-list for extension type_name - 83, // [83:83] is the sub-list for extension extendee - 0, // [0:83] is the sub-list for field type_name + 105, // 74: dapr.proto.runtime.v1.ConversationAlpha1Request.inputs:type_name -> dapr.proto.runtime.v1.ConversationInput + 138, // 75: dapr.proto.runtime.v1.ConversationAlpha1Request.parameters:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry + 139, // 76: dapr.proto.runtime.v1.ConversationAlpha1Request.metadata:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Request.MetadataEntry + 140, // 77: dapr.proto.runtime.v1.ConversationAlpha1Result.parameters:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry + 106, // 78: dapr.proto.runtime.v1.ConversationAlpha1Response.outputs:type_name -> dapr.proto.runtime.v1.ConversationAlpha1Result + 31, // 79: dapr.proto.runtime.v1.GetBulkSecretResponse.DataEntry.value:type_name -> dapr.proto.runtime.v1.SecretResponse + 151, // 80: dapr.proto.runtime.v1.GetConfigurationResponse.ItemsEntry.value:type_name -> dapr.proto.common.v1.ConfigurationItem + 151, // 81: dapr.proto.runtime.v1.SubscribeConfigurationResponse.ItemsEntry.value:type_name -> dapr.proto.common.v1.ConfigurationItem + 148, // 82: dapr.proto.runtime.v1.ConversationAlpha1Request.ParametersEntry.value:type_name -> google.protobuf.Any + 148, // 83: dapr.proto.runtime.v1.ConversationAlpha1Result.ParametersEntry.value:type_name -> google.protobuf.Any + 4, // 84: dapr.proto.runtime.v1.Dapr.InvokeService:input_type -> dapr.proto.runtime.v1.InvokeServiceRequest + 5, // 85: dapr.proto.runtime.v1.Dapr.GetState:input_type -> dapr.proto.runtime.v1.GetStateRequest + 6, // 86: dapr.proto.runtime.v1.Dapr.GetBulkState:input_type -> dapr.proto.runtime.v1.GetBulkStateRequest + 12, // 87: dapr.proto.runtime.v1.Dapr.SaveState:input_type -> dapr.proto.runtime.v1.SaveStateRequest + 13, // 88: dapr.proto.runtime.v1.Dapr.QueryStateAlpha1:input_type -> dapr.proto.runtime.v1.QueryStateRequest + 10, // 89: dapr.proto.runtime.v1.Dapr.DeleteState:input_type -> dapr.proto.runtime.v1.DeleteStateRequest + 11, // 90: dapr.proto.runtime.v1.Dapr.DeleteBulkState:input_type -> dapr.proto.runtime.v1.DeleteBulkStateRequest + 34, // 91: dapr.proto.runtime.v1.Dapr.ExecuteStateTransaction:input_type -> dapr.proto.runtime.v1.ExecuteStateTransactionRequest + 16, // 92: dapr.proto.runtime.v1.Dapr.PublishEvent:input_type -> dapr.proto.runtime.v1.PublishEventRequest + 17, // 93: dapr.proto.runtime.v1.Dapr.BulkPublishEventAlpha1:input_type -> dapr.proto.runtime.v1.BulkPublishRequest + 21, // 94: dapr.proto.runtime.v1.Dapr.SubscribeTopicEventsAlpha1:input_type -> dapr.proto.runtime.v1.SubscribeTopicEventsRequestAlpha1 + 26, // 95: dapr.proto.runtime.v1.Dapr.InvokeBinding:input_type -> dapr.proto.runtime.v1.InvokeBindingRequest + 28, // 96: dapr.proto.runtime.v1.Dapr.GetSecret:input_type -> dapr.proto.runtime.v1.GetSecretRequest + 30, // 97: dapr.proto.runtime.v1.Dapr.GetBulkSecret:input_type -> dapr.proto.runtime.v1.GetBulkSecretRequest + 35, // 98: dapr.proto.runtime.v1.Dapr.RegisterActorTimer:input_type -> dapr.proto.runtime.v1.RegisterActorTimerRequest + 36, // 99: dapr.proto.runtime.v1.Dapr.UnregisterActorTimer:input_type -> dapr.proto.runtime.v1.UnregisterActorTimerRequest + 37, // 100: dapr.proto.runtime.v1.Dapr.RegisterActorReminder:input_type -> dapr.proto.runtime.v1.RegisterActorReminderRequest + 38, // 101: dapr.proto.runtime.v1.Dapr.UnregisterActorReminder:input_type -> dapr.proto.runtime.v1.UnregisterActorReminderRequest + 39, // 102: dapr.proto.runtime.v1.Dapr.GetActorState:input_type -> dapr.proto.runtime.v1.GetActorStateRequest + 41, // 103: dapr.proto.runtime.v1.Dapr.ExecuteActorStateTransaction:input_type -> dapr.proto.runtime.v1.ExecuteActorStateTransactionRequest + 43, // 104: dapr.proto.runtime.v1.Dapr.InvokeActor:input_type -> dapr.proto.runtime.v1.InvokeActorRequest + 57, // 105: dapr.proto.runtime.v1.Dapr.GetConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.GetConfigurationRequest + 57, // 106: dapr.proto.runtime.v1.Dapr.GetConfiguration:input_type -> dapr.proto.runtime.v1.GetConfigurationRequest + 59, // 107: dapr.proto.runtime.v1.Dapr.SubscribeConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.SubscribeConfigurationRequest + 59, // 108: dapr.proto.runtime.v1.Dapr.SubscribeConfiguration:input_type -> dapr.proto.runtime.v1.SubscribeConfigurationRequest + 60, // 109: dapr.proto.runtime.v1.Dapr.UnsubscribeConfigurationAlpha1:input_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationRequest + 60, // 110: dapr.proto.runtime.v1.Dapr.UnsubscribeConfiguration:input_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationRequest + 63, // 111: dapr.proto.runtime.v1.Dapr.TryLockAlpha1:input_type -> dapr.proto.runtime.v1.TryLockRequest + 65, // 112: dapr.proto.runtime.v1.Dapr.UnlockAlpha1:input_type -> dapr.proto.runtime.v1.UnlockRequest + 81, // 113: dapr.proto.runtime.v1.Dapr.EncryptAlpha1:input_type -> dapr.proto.runtime.v1.EncryptRequest + 84, // 114: dapr.proto.runtime.v1.Dapr.DecryptAlpha1:input_type -> dapr.proto.runtime.v1.DecryptRequest + 45, // 115: dapr.proto.runtime.v1.Dapr.GetMetadata:input_type -> dapr.proto.runtime.v1.GetMetadataRequest + 56, // 116: dapr.proto.runtime.v1.Dapr.SetMetadata:input_type -> dapr.proto.runtime.v1.SetMetadataRequest + 67, // 117: dapr.proto.runtime.v1.Dapr.SubtleGetKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleGetKeyRequest + 69, // 118: dapr.proto.runtime.v1.Dapr.SubtleEncryptAlpha1:input_type -> dapr.proto.runtime.v1.SubtleEncryptRequest + 71, // 119: dapr.proto.runtime.v1.Dapr.SubtleDecryptAlpha1:input_type -> dapr.proto.runtime.v1.SubtleDecryptRequest + 73, // 120: dapr.proto.runtime.v1.Dapr.SubtleWrapKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleWrapKeyRequest + 75, // 121: dapr.proto.runtime.v1.Dapr.SubtleUnwrapKeyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleUnwrapKeyRequest + 77, // 122: dapr.proto.runtime.v1.Dapr.SubtleSignAlpha1:input_type -> dapr.proto.runtime.v1.SubtleSignRequest + 79, // 123: dapr.proto.runtime.v1.Dapr.SubtleVerifyAlpha1:input_type -> dapr.proto.runtime.v1.SubtleVerifyRequest + 89, // 124: dapr.proto.runtime.v1.Dapr.StartWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.StartWorkflowRequest + 87, // 125: dapr.proto.runtime.v1.Dapr.GetWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.GetWorkflowRequest + 95, // 126: dapr.proto.runtime.v1.Dapr.PurgeWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.PurgeWorkflowRequest + 91, // 127: dapr.proto.runtime.v1.Dapr.TerminateWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.TerminateWorkflowRequest + 92, // 128: dapr.proto.runtime.v1.Dapr.PauseWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.PauseWorkflowRequest + 93, // 129: dapr.proto.runtime.v1.Dapr.ResumeWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.ResumeWorkflowRequest + 94, // 130: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowAlpha1:input_type -> dapr.proto.runtime.v1.RaiseEventWorkflowRequest + 89, // 131: dapr.proto.runtime.v1.Dapr.StartWorkflowBeta1:input_type -> dapr.proto.runtime.v1.StartWorkflowRequest + 87, // 132: dapr.proto.runtime.v1.Dapr.GetWorkflowBeta1:input_type -> dapr.proto.runtime.v1.GetWorkflowRequest + 95, // 133: dapr.proto.runtime.v1.Dapr.PurgeWorkflowBeta1:input_type -> dapr.proto.runtime.v1.PurgeWorkflowRequest + 91, // 134: dapr.proto.runtime.v1.Dapr.TerminateWorkflowBeta1:input_type -> dapr.proto.runtime.v1.TerminateWorkflowRequest + 92, // 135: dapr.proto.runtime.v1.Dapr.PauseWorkflowBeta1:input_type -> dapr.proto.runtime.v1.PauseWorkflowRequest + 93, // 136: dapr.proto.runtime.v1.Dapr.ResumeWorkflowBeta1:input_type -> dapr.proto.runtime.v1.ResumeWorkflowRequest + 94, // 137: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowBeta1:input_type -> dapr.proto.runtime.v1.RaiseEventWorkflowRequest + 96, // 138: dapr.proto.runtime.v1.Dapr.Shutdown:input_type -> dapr.proto.runtime.v1.ShutdownRequest + 98, // 139: dapr.proto.runtime.v1.Dapr.ScheduleJobAlpha1:input_type -> dapr.proto.runtime.v1.ScheduleJobRequest + 100, // 140: dapr.proto.runtime.v1.Dapr.GetJobAlpha1:input_type -> dapr.proto.runtime.v1.GetJobRequest + 102, // 141: dapr.proto.runtime.v1.Dapr.DeleteJobAlpha1:input_type -> dapr.proto.runtime.v1.DeleteJobRequest + 104, // 142: dapr.proto.runtime.v1.Dapr.ConverseAlpha1:input_type -> dapr.proto.runtime.v1.ConversationAlpha1Request + 152, // 143: dapr.proto.runtime.v1.Dapr.InvokeService:output_type -> dapr.proto.common.v1.InvokeResponse + 9, // 144: dapr.proto.runtime.v1.Dapr.GetState:output_type -> dapr.proto.runtime.v1.GetStateResponse + 7, // 145: dapr.proto.runtime.v1.Dapr.GetBulkState:output_type -> dapr.proto.runtime.v1.GetBulkStateResponse + 153, // 146: dapr.proto.runtime.v1.Dapr.SaveState:output_type -> google.protobuf.Empty + 15, // 147: dapr.proto.runtime.v1.Dapr.QueryStateAlpha1:output_type -> dapr.proto.runtime.v1.QueryStateResponse + 153, // 148: dapr.proto.runtime.v1.Dapr.DeleteState:output_type -> google.protobuf.Empty + 153, // 149: dapr.proto.runtime.v1.Dapr.DeleteBulkState:output_type -> google.protobuf.Empty + 153, // 150: dapr.proto.runtime.v1.Dapr.ExecuteStateTransaction:output_type -> google.protobuf.Empty + 153, // 151: dapr.proto.runtime.v1.Dapr.PublishEvent:output_type -> google.protobuf.Empty + 19, // 152: dapr.proto.runtime.v1.Dapr.BulkPublishEventAlpha1:output_type -> dapr.proto.runtime.v1.BulkPublishResponse + 24, // 153: dapr.proto.runtime.v1.Dapr.SubscribeTopicEventsAlpha1:output_type -> dapr.proto.runtime.v1.SubscribeTopicEventsResponseAlpha1 + 27, // 154: dapr.proto.runtime.v1.Dapr.InvokeBinding:output_type -> dapr.proto.runtime.v1.InvokeBindingResponse + 29, // 155: dapr.proto.runtime.v1.Dapr.GetSecret:output_type -> dapr.proto.runtime.v1.GetSecretResponse + 32, // 156: dapr.proto.runtime.v1.Dapr.GetBulkSecret:output_type -> dapr.proto.runtime.v1.GetBulkSecretResponse + 153, // 157: dapr.proto.runtime.v1.Dapr.RegisterActorTimer:output_type -> google.protobuf.Empty + 153, // 158: dapr.proto.runtime.v1.Dapr.UnregisterActorTimer:output_type -> google.protobuf.Empty + 153, // 159: dapr.proto.runtime.v1.Dapr.RegisterActorReminder:output_type -> google.protobuf.Empty + 153, // 160: dapr.proto.runtime.v1.Dapr.UnregisterActorReminder:output_type -> google.protobuf.Empty + 40, // 161: dapr.proto.runtime.v1.Dapr.GetActorState:output_type -> dapr.proto.runtime.v1.GetActorStateResponse + 153, // 162: dapr.proto.runtime.v1.Dapr.ExecuteActorStateTransaction:output_type -> google.protobuf.Empty + 44, // 163: dapr.proto.runtime.v1.Dapr.InvokeActor:output_type -> dapr.proto.runtime.v1.InvokeActorResponse + 58, // 164: dapr.proto.runtime.v1.Dapr.GetConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.GetConfigurationResponse + 58, // 165: dapr.proto.runtime.v1.Dapr.GetConfiguration:output_type -> dapr.proto.runtime.v1.GetConfigurationResponse + 61, // 166: dapr.proto.runtime.v1.Dapr.SubscribeConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.SubscribeConfigurationResponse + 61, // 167: dapr.proto.runtime.v1.Dapr.SubscribeConfiguration:output_type -> dapr.proto.runtime.v1.SubscribeConfigurationResponse + 62, // 168: dapr.proto.runtime.v1.Dapr.UnsubscribeConfigurationAlpha1:output_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationResponse + 62, // 169: dapr.proto.runtime.v1.Dapr.UnsubscribeConfiguration:output_type -> dapr.proto.runtime.v1.UnsubscribeConfigurationResponse + 64, // 170: dapr.proto.runtime.v1.Dapr.TryLockAlpha1:output_type -> dapr.proto.runtime.v1.TryLockResponse + 66, // 171: dapr.proto.runtime.v1.Dapr.UnlockAlpha1:output_type -> dapr.proto.runtime.v1.UnlockResponse + 83, // 172: dapr.proto.runtime.v1.Dapr.EncryptAlpha1:output_type -> dapr.proto.runtime.v1.EncryptResponse + 86, // 173: dapr.proto.runtime.v1.Dapr.DecryptAlpha1:output_type -> dapr.proto.runtime.v1.DecryptResponse + 46, // 174: dapr.proto.runtime.v1.Dapr.GetMetadata:output_type -> dapr.proto.runtime.v1.GetMetadataResponse + 153, // 175: dapr.proto.runtime.v1.Dapr.SetMetadata:output_type -> google.protobuf.Empty + 68, // 176: dapr.proto.runtime.v1.Dapr.SubtleGetKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleGetKeyResponse + 70, // 177: dapr.proto.runtime.v1.Dapr.SubtleEncryptAlpha1:output_type -> dapr.proto.runtime.v1.SubtleEncryptResponse + 72, // 178: dapr.proto.runtime.v1.Dapr.SubtleDecryptAlpha1:output_type -> dapr.proto.runtime.v1.SubtleDecryptResponse + 74, // 179: dapr.proto.runtime.v1.Dapr.SubtleWrapKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleWrapKeyResponse + 76, // 180: dapr.proto.runtime.v1.Dapr.SubtleUnwrapKeyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleUnwrapKeyResponse + 78, // 181: dapr.proto.runtime.v1.Dapr.SubtleSignAlpha1:output_type -> dapr.proto.runtime.v1.SubtleSignResponse + 80, // 182: dapr.proto.runtime.v1.Dapr.SubtleVerifyAlpha1:output_type -> dapr.proto.runtime.v1.SubtleVerifyResponse + 90, // 183: dapr.proto.runtime.v1.Dapr.StartWorkflowAlpha1:output_type -> dapr.proto.runtime.v1.StartWorkflowResponse + 88, // 184: dapr.proto.runtime.v1.Dapr.GetWorkflowAlpha1:output_type -> dapr.proto.runtime.v1.GetWorkflowResponse + 153, // 185: dapr.proto.runtime.v1.Dapr.PurgeWorkflowAlpha1:output_type -> google.protobuf.Empty + 153, // 186: dapr.proto.runtime.v1.Dapr.TerminateWorkflowAlpha1:output_type -> google.protobuf.Empty + 153, // 187: dapr.proto.runtime.v1.Dapr.PauseWorkflowAlpha1:output_type -> google.protobuf.Empty + 153, // 188: dapr.proto.runtime.v1.Dapr.ResumeWorkflowAlpha1:output_type -> google.protobuf.Empty + 153, // 189: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowAlpha1:output_type -> google.protobuf.Empty + 90, // 190: dapr.proto.runtime.v1.Dapr.StartWorkflowBeta1:output_type -> dapr.proto.runtime.v1.StartWorkflowResponse + 88, // 191: dapr.proto.runtime.v1.Dapr.GetWorkflowBeta1:output_type -> dapr.proto.runtime.v1.GetWorkflowResponse + 153, // 192: dapr.proto.runtime.v1.Dapr.PurgeWorkflowBeta1:output_type -> google.protobuf.Empty + 153, // 193: dapr.proto.runtime.v1.Dapr.TerminateWorkflowBeta1:output_type -> google.protobuf.Empty + 153, // 194: dapr.proto.runtime.v1.Dapr.PauseWorkflowBeta1:output_type -> google.protobuf.Empty + 153, // 195: dapr.proto.runtime.v1.Dapr.ResumeWorkflowBeta1:output_type -> google.protobuf.Empty + 153, // 196: dapr.proto.runtime.v1.Dapr.RaiseEventWorkflowBeta1:output_type -> google.protobuf.Empty + 153, // 197: dapr.proto.runtime.v1.Dapr.Shutdown:output_type -> google.protobuf.Empty + 99, // 198: dapr.proto.runtime.v1.Dapr.ScheduleJobAlpha1:output_type -> dapr.proto.runtime.v1.ScheduleJobResponse + 101, // 199: dapr.proto.runtime.v1.Dapr.GetJobAlpha1:output_type -> dapr.proto.runtime.v1.GetJobResponse + 103, // 200: dapr.proto.runtime.v1.Dapr.DeleteJobAlpha1:output_type -> dapr.proto.runtime.v1.DeleteJobResponse + 107, // 201: dapr.proto.runtime.v1.Dapr.ConverseAlpha1:output_type -> dapr.proto.runtime.v1.ConversationAlpha1Response + 143, // [143:202] is the sub-list for method output_type + 84, // [84:143] is the sub-list for method input_type + 84, // [84:84] is the sub-list for extension type_name + 84, // [84:84] is the sub-list for extension extendee + 0, // [0:84] is the sub-list for field type_name } func init() { file_dapr_proto_runtime_v1_dapr_proto_init() } @@ -10170,7 +10237,7 @@ func file_dapr_proto_runtime_v1_dapr_proto_init() { } } file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConversationAlpha1Result); i { + switch v := v.(*ConversationInput); i { case 0: return &v.state case 1: @@ -10182,6 +10249,18 @@ func file_dapr_proto_runtime_v1_dapr_proto_init() { } } file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConversationAlpha1Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_runtime_v1_dapr_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConversationAlpha1Response); i { case 0: return &v.state @@ -10205,14 +10284,15 @@ func file_dapr_proto_runtime_v1_dapr_proto_init() { } file_dapr_proto_runtime_v1_dapr_proto_msgTypes[93].OneofWrappers = []interface{}{} file_dapr_proto_runtime_v1_dapr_proto_msgTypes[100].OneofWrappers = []interface{}{} - file_dapr_proto_runtime_v1_dapr_proto_msgTypes[102].OneofWrappers = []interface{}{} + file_dapr_proto_runtime_v1_dapr_proto_msgTypes[101].OneofWrappers = []interface{}{} + file_dapr_proto_runtime_v1_dapr_proto_msgTypes[103].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dapr_proto_runtime_v1_dapr_proto_rawDesc, NumEnums: 4, - NumMessages: 136, + NumMessages: 137, NumExtensions: 0, NumServices: 1, }, diff --git a/tests/integration/suite/daprd/conversation/grpc/basic.go b/tests/integration/suite/daprd/conversation/grpc/basic.go index 578483d168b..3a27b752df0 100644 --- a/tests/integration/suite/daprd/conversation/grpc/basic.go +++ b/tests/integration/suite/daprd/conversation/grpc/basic.go @@ -60,8 +60,12 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { t.Run("good input", func(t *testing.T) { resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ - Name: "echo", - Inputs: []string{"well hello there"}, + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there", + }, + }, }) require.NoError(t, err) require.Len(t, resp.GetOutputs(), 1) diff --git a/tests/integration/suite/daprd/conversation/http/basic.go b/tests/integration/suite/daprd/conversation/http/basic.go index 8a576ad2dd3..de69f6418df 100644 --- a/tests/integration/suite/daprd/conversation/http/basic.go +++ b/tests/integration/suite/daprd/conversation/http/basic.go @@ -64,7 +64,7 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { httpClient := client.HTTP(t) t.Run("good json", func(t *testing.T) { - body := `{"inputs": ["well hello there"] }` + body := `{"inputs":[{"message":"well hello there"}]}` req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) require.NoError(t, err) From 4f642d51bbf790f4d57a590e47d5710340ae499a Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Thu, 10 Oct 2024 14:58:28 -0400 Subject: [PATCH 076/112] mv metrics var into assert eventually Signed-off-by: Cassandra Coyle --- .../suite/daprd/metrics/http/excludeverbs/default.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/suite/daprd/metrics/http/excludeverbs/default.go b/tests/integration/suite/daprd/metrics/http/excludeverbs/default.go index 41b03f92bd3..a922fc99d7d 100644 --- a/tests/integration/suite/daprd/metrics/http/excludeverbs/default.go +++ b/tests/integration/suite/daprd/metrics/http/excludeverbs/default.go @@ -69,8 +69,8 @@ func (h *defaultExcludeVerbs) Run(t *testing.T, ctx context.Context) { t.Run("service invocation - default", func(t *testing.T) { h.daprd.HTTPGet2xx(t, ctx, "/v1.0/invoke/myapp/method/orders/123") - metrics := h.daprd.Metrics(t, ctx) assert.EventuallyWithT(t, func(c *assert.CollectT) { + metrics := h.daprd.Metrics(t, ctx) assert.Equal(c, 1, int(metrics["dapr_http_server_request_count|app_id:myapp|method:GET|path:/v1.0/invoke/myapp/method/orders/123|status:200"])) }, time.Second*5, time.Millisecond*10) }) From 78e5cfd3787d12e453acdeae98b3307f6b86e8f3 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Fri, 11 Oct 2024 09:03:50 -0700 Subject: [PATCH 077/112] Add PII scrubbing to conversational api (#8191) * add pii scrubbing to conversational api Signed-off-by: yaron2 * linter Signed-off-by: yaron2 * change proto fields, add test Signed-off-by: yaron2 * fix test Signed-off-by: yaron2 --------- Signed-off-by: yaron2 --- dapr/proto/runtime/v1/dapr.proto | 14 +- go.mod | 2 + go.sum | 4 + pkg/api/universal/conversation.go | 49 +++++- pkg/proto/runtime/v1/dapr.pb.go | 160 +++++++++-------- .../suite/daprd/conversation/grpc/scrubpii.go | 166 ++++++++++++++++++ .../suite/daprd/conversation/http/scrubpii.go | 135 ++++++++++++++ 7 files changed, 449 insertions(+), 81 deletions(-) create mode 100644 tests/integration/suite/daprd/conversation/grpc/scrubpii.go create mode 100644 tests/integration/suite/daprd/conversation/http/scrubpii.go diff --git a/dapr/proto/runtime/v1/dapr.proto b/dapr/proto/runtime/v1/dapr.proto index 6d7ab51462c..d721cd0efc8 100644 --- a/dapr/proto/runtime/v1/dapr.proto +++ b/dapr/proto/runtime/v1/dapr.proto @@ -1284,8 +1284,8 @@ message ConversationAlpha1Request { // The name of Coverstaion component string name = 1; - // Conversation context - the Id of an existing chat room (like in ChatGPT) - optional string conversationContext = 2; + // The ID of an existing chat (like in ChatGPT) + optional string contextID = 2; // Inputs for the conversation, support multiple input in one time. repeated ConversationInput inputs = 3; @@ -1295,6 +1295,9 @@ message ConversationAlpha1Request { // The metadata passing to conversation components. map metadata = 5; + + // Scrub PII data that comes back from the LLM + optional bool scrubPII = 6; } message ConversationInput { @@ -1303,6 +1306,9 @@ message ConversationInput { // The role to set for the message optional string role = 2; + + // Scrub PII data that goes into the LLM + optional bool scrubPII = 3; } // ConversationAlpha1Result is the result for one input. @@ -1315,8 +1321,8 @@ message ConversationAlpha1Result { // ConversationAlpha1Response is the response for Conversation. message ConversationAlpha1Response { - // Conversation context - the Id of an existing chat room (like in ChatGPT) - optional string conversationContext = 1; + // The ID of an existing chat (like in ChatGPT) + optional string contextID = 1; // An array of results. repeated ConversationAlpha1Result outputs = 2; diff --git a/go.mod b/go.mod index d99ee92de11..5d74edc8cc2 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 github.com/PaesslerAG/jsonpath v0.1.1 github.com/PuerkitoBio/purell v1.2.1 + github.com/aavaz-ai/pii-scrubber v0.0.0-20220812094047-3fa450ab6973 github.com/alphadose/haxmap v1.4.0 github.com/argoproj/argo-rollouts v1.4.1 github.com/cenkalti/backoff/v4 v4.3.0 @@ -148,6 +149,7 @@ require ( github.com/aliyun/aliyun-tablestore-go-sdk v1.7.10 // indirect github.com/aliyun/credentials-go v1.1.2 // indirect github.com/andybalholm/brotli v1.0.6 // indirect + github.com/anshal21/go-worker v1.1.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/apache/dubbo-getty v1.4.9-0.20220610060150-8af010f3f3dc // indirect github.com/apache/dubbo-go-hessian2 v1.11.5 // indirect diff --git a/go.sum b/go.sum index 53a9f64c877..d1a661086ef 100644 --- a/go.sum +++ b/go.sum @@ -148,6 +148,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/aavaz-ai/pii-scrubber v0.0.0-20220812094047-3fa450ab6973 h1:oMQQEYwu9V0O+IcRs7ButCPjsbOS0eEtMOImkvaeWLA= +github.com/aavaz-ai/pii-scrubber v0.0.0-20220812094047-3fa450ab6973/go.mod h1:Y5HcXSyXAlR6rvJ5kqvPEtQlRLhekJFI/w/9CRZkpHs= github.com/aerospike/aerospike-client-go/v6 v6.12.0 h1:4RKpcUlfINyIsjyOK8DBKn6NaBUl5UaHrWVY07/R99Q= github.com/aerospike/aerospike-client-go/v6 v6.12.0/go.mod h1:sBqeA3mli2vT5JInbp+XGFbajxEFg4kANUHsOl3meUk= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= @@ -215,6 +217,8 @@ github.com/alphadose/haxmap v1.4.0 h1:1yn+oGzy2THJj1DMuJBzRanE3sMnDAjJVbU0L31Jp3 github.com/alphadose/haxmap v1.4.0/go.mod h1:rjHw1IAqbxm0S3U5tD16GoKsiAd8FWx5BJ2IYqXwgmM= github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/anshal21/go-worker v1.1.0 h1:TPt2jBN/6dmPDPDTq8DHA0MtoXG8RWKGoJVHqED+s5g= +github.com/anshal21/go-worker v1.1.0/go.mod h1:6GiLOIr/VvVg80vfW65ytLuouSvndU2IoJTu+8M47lI= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= diff --git a/pkg/api/universal/conversation.go b/pkg/api/universal/conversation.go index d642f216d5e..e1a462db946 100644 --- a/pkg/api/universal/conversation.go +++ b/pkg/api/universal/conversation.go @@ -16,6 +16,8 @@ package universal import ( "context" + piiscrubber "github.com/aavaz-ai/pii-scrubber" + "github.com/dapr/components-contrib/conversation" "github.com/dapr/dapr/pkg/messages" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" @@ -51,9 +53,29 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers return nil, err } + scrubber, err := piiscrubber.NewDefaultScrubber() + if err != nil { + err := messages.ErrConversationMissingInputs.WithFormat(req.GetName()) + a.logger.Debug(err) + return &runtimev1pb.ConversationAlpha1Response{}, err + } + for _, i := range req.GetInputs() { + msg := i.GetMessage() + + if i.GetScrubPII() { + scrubbed, sErr := scrubber.ScrubTexts([]string{i.GetMessage()}) + if sErr != nil { + sErr = messages.ErrConversationInvoke.WithFormat(req.GetName(), sErr.Error()) + a.logger.Debug(sErr) + return &runtimev1pb.ConversationAlpha1Response{}, sErr + } + + msg = scrubbed[0] + } + c := conversation.ConversationInput{ - Message: i.GetMessage(), + Message: msg, Role: conversation.Role(i.GetRole()), } @@ -61,7 +83,7 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers } request.Parameters = req.GetParameters() - request.ConversationContext = req.GetConversationContext() + request.ConversationContext = req.GetContextID() // do call policyRunner := resiliency.NewRunner[*conversation.ConversationResponse](ctx, @@ -75,7 +97,7 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers if err != nil { err = messages.ErrConversationInvoke.WithFormat(req.GetName(), err.Error()) a.logger.Debug(err) - return nil, err + return &runtimev1pb.ConversationAlpha1Response{}, err } // handle response @@ -83,13 +105,26 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers a.logger.Debug(response) if resp != nil { if resp.ConversationContext != "" { - response.ConversationContext = &resp.ConversationContext + response.ContextID = &resp.ConversationContext } - for i := range resp.Outputs { + for _, o := range resp.Outputs { + res := o.Result + + if req.GetScrubPII() { + scrubbed, sErr := scrubber.ScrubTexts([]string{o.Result}) + if sErr != nil { + sErr = messages.ErrConversationInvoke.WithFormat(req.GetName(), sErr.Error()) + a.logger.Debug(sErr) + return &runtimev1pb.ConversationAlpha1Response{}, sErr + } + + res = scrubbed[0] + } + response.Outputs = append(response.GetOutputs(), &runtimev1pb.ConversationAlpha1Result{ - Result: resp.Outputs[i].Result, - Parameters: resp.Outputs[i].Parameters, + Result: res, + Parameters: o.Parameters, }) } } diff --git a/pkg/proto/runtime/v1/dapr.pb.go b/pkg/proto/runtime/v1/dapr.pb.go index 83e29b5fbd2..f6787143534 100644 --- a/pkg/proto/runtime/v1/dapr.pb.go +++ b/pkg/proto/runtime/v1/dapr.pb.go @@ -6849,14 +6849,16 @@ type ConversationAlpha1Request struct { // The name of Coverstaion component Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Conversation context - the Id of an existing chat room (like in ChatGPT) - ConversationContext *string `protobuf:"bytes,2,opt,name=conversationContext,proto3,oneof" json:"conversationContext,omitempty"` + // The ID of an existing chat (like in ChatGPT) + ContextID *string `protobuf:"bytes,2,opt,name=contextID,proto3,oneof" json:"contextID,omitempty"` // Inputs for the conversation, support multiple input in one time. Inputs []*ConversationInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` // Parameters for all custom fields. Parameters map[string]*anypb.Any `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // The metadata passing to conversation components. Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Scrub PII data that comes back from the LLM + ScrubPII *bool `protobuf:"varint,6,opt,name=scrubPII,proto3,oneof" json:"scrubPII,omitempty"` } func (x *ConversationAlpha1Request) Reset() { @@ -6898,9 +6900,9 @@ func (x *ConversationAlpha1Request) GetName() string { return "" } -func (x *ConversationAlpha1Request) GetConversationContext() string { - if x != nil && x.ConversationContext != nil { - return *x.ConversationContext +func (x *ConversationAlpha1Request) GetContextID() string { + if x != nil && x.ContextID != nil { + return *x.ContextID } return "" } @@ -6926,6 +6928,13 @@ func (x *ConversationAlpha1Request) GetMetadata() map[string]string { return nil } +func (x *ConversationAlpha1Request) GetScrubPII() bool { + if x != nil && x.ScrubPII != nil { + return *x.ScrubPII + } + return false +} + type ConversationInput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6935,6 +6944,8 @@ type ConversationInput struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // The role to set for the message Role *string `protobuf:"bytes,2,opt,name=role,proto3,oneof" json:"role,omitempty"` + // Scrub PII data that goes into the LLM + ScrubPII *bool `protobuf:"varint,3,opt,name=scrubPII,proto3,oneof" json:"scrubPII,omitempty"` } func (x *ConversationInput) Reset() { @@ -6983,6 +6994,13 @@ func (x *ConversationInput) GetRole() string { return "" } +func (x *ConversationInput) GetScrubPII() bool { + if x != nil && x.ScrubPII != nil { + return *x.ScrubPII + } + return false +} + // ConversationAlpha1Result is the result for one input. type ConversationAlpha1Result struct { state protoimpl.MessageState @@ -7047,8 +7065,8 @@ type ConversationAlpha1Response struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Conversation context - the Id of an existing chat room (like in ChatGPT) - ConversationContext *string `protobuf:"bytes,1,opt,name=conversationContext,proto3,oneof" json:"conversationContext,omitempty"` + // The ID of an existing chat (like in ChatGPT) + ContextID *string `protobuf:"bytes,1,opt,name=contextID,proto3,oneof" json:"contextID,omitempty"` // An array of results. Outputs []*ConversationAlpha1Result `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` } @@ -7085,9 +7103,9 @@ func (*ConversationAlpha1Response) Descriptor() ([]byte, []int) { return file_dapr_proto_runtime_v1_dapr_proto_rawDescGZIP(), []int{103} } -func (x *ConversationAlpha1Response) GetConversationContext() string { - if x != nil && x.ConversationContext != nil { - return *x.ConversationContext +func (x *ConversationAlpha1Response) GetContextID() string { + if x != nil && x.ContextID != nil { + return *x.ContextID } return "" } @@ -8161,72 +8179,74 @@ var file_dapr_proto_runtime_v1_dapr_proto_rawDesc = []byte{ 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x04, 0x0a, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x04, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, - 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, - 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, - 0x4f, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x88, 0x01, + 0x01, 0x12, 0x40, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x88, + 0x01, 0x01, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x49, 0x44, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x22, + 0x7d, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, - 0x22, 0xe8, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb6, 0x01, 0x0a, 0x1a, + 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, + 0x50, 0x49, 0x49, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x08, 0x73, 0x63, 0x72, + 0x75, 0x62, 0x50, 0x49, 0x49, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, + 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x22, 0xe8, + 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x88, 0x01, - 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x16, 0x0a, 0x14, - 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2a, 0x57, 0x0a, 0x16, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x75, + 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x49, 0x44, 0x2a, 0x57, 0x0a, 0x16, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, diff --git a/tests/integration/suite/daprd/conversation/grpc/scrubpii.go b/tests/integration/suite/daprd/conversation/grpc/scrubpii.go new file mode 100644 index 00000000000..1e0a951f791 --- /dev/null +++ b/tests/integration/suite/daprd/conversation/grpc/scrubpii.go @@ -0,0 +1,166 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implieh. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package http + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/suite" +) + +func init() { + suite.Register(new(scrubpii)) +} + +type scrubpii struct { + daprd *daprd.Daprd +} + +func (s *scrubpii) Setup(t *testing.T) []framework.Option { + s.daprd = daprd.New(t, daprd.WithResourceFiles(` +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: echo +spec: + type: conversation.echo + version: v1 + metadata: + - name: key + value: testkey +`)) + + return []framework.Option{ + framework.WithProcesses(s.daprd), + } +} + +func (s *scrubpii) Run(t *testing.T, ctx context.Context) { + s.daprd.WaitUntilRunning(t, ctx) + + client := s.daprd.GRPCClient(t, ctx) + + t.Run("scrub input phone number", func(t *testing.T) { + scrubInput := true + + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there, my phone number is +2222222222", + ScrubPII: &scrubInput, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 1) + require.Equal(t, "well hello there, my phone number is ", resp.GetOutputs()[0].GetResult()) + }) + + t.Run("scrub input great phone number", func(t *testing.T) { + scrubInput := true + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there, my phone number is +4422222222", + ScrubPII: &scrubInput, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 1) + require.Equal(t, "well hello there, my phone number is ", resp.GetOutputs()[0].GetResult()) + }) + + t.Run("scrub input email", func(t *testing.T) { + scrubInput := true + + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there, my email is test@test.com", + ScrubPII: &scrubInput, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 1) + require.Equal(t, "well hello there, my email is ", resp.GetOutputs()[0].GetResult()) + }) + + t.Run("scrub input ip address", func(t *testing.T) { + scrubInput := true + + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there from 10.8.9.1", + ScrubPII: &scrubInput, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 1) + require.Equal(t, "well hello there from ", resp.GetOutputs()[0].GetResult()) + }) + + t.Run("scrub all outputs for PII", func(t *testing.T) { + scrubOutput := true + + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there from 10.8.9.1", + }, + { + Message: "well hello there, my email is test@test.com", + }, + }, + ScrubPII: &scrubOutput, + }) + + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 2) + require.Equal(t, "well hello there from ", resp.GetOutputs()[0].GetResult()) + require.Equal(t, "well hello there, my email is ", resp.GetOutputs()[1].GetResult()) + }) + + t.Run("no scrubbing on good input", func(t *testing.T) { + scrubOutput := true + + resp, err := client.ConverseAlpha1(ctx, &rtv1.ConversationAlpha1Request{ + Name: "echo", + Inputs: []*rtv1.ConversationInput{ + { + Message: "well hello there", + ScrubPII: &scrubOutput, + }, + }, + ScrubPII: &scrubOutput, + }) + require.NoError(t, err) + require.Len(t, resp.GetOutputs(), 1) + require.Equal(t, "well hello there", resp.GetOutputs()[0].GetResult()) + }) +} diff --git a/tests/integration/suite/daprd/conversation/http/scrubpii.go b/tests/integration/suite/daprd/conversation/http/scrubpii.go new file mode 100644 index 00000000000..ca6b4116f1b --- /dev/null +++ b/tests/integration/suite/daprd/conversation/http/scrubpii.go @@ -0,0 +1,135 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implieh. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package http + +import ( + "context" + "fmt" + "io" + "net/http" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/client" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/suite" +) + +func init() { + suite.Register(new(scrubPII)) +} + +type scrubPII struct { + daprd *daprd.Daprd +} + +func (s *scrubPII) Setup(t *testing.T) []framework.Option { + s.daprd = daprd.New(t, daprd.WithResourceFiles(` +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: echo +spec: + type: conversation.echo + version: v1 + metadata: + - name: key + value: testkey +`)) + + return []framework.Option{ + framework.WithProcesses(s.daprd), + } +} + +func (s *scrubPII) Run(t *testing.T, ctx context.Context) { + s.daprd.WaitUntilRunning(t, ctx) + postURL := fmt.Sprintf("http://%s/v1.0-alpha1/conversation/echo/converse", s.daprd.HTTPAddress()) + + httpClient := client.HTTP(t) + + t.Run("scrub input phone number", func(t *testing.T) { + body := `{"inputs":[{"message":"well hello there, my phone number is +2222222222", "scrubPII": true}]}` + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) + require.NoError(t, err) + resp, err := httpClient.Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + require.Equal(t, `{"outputs":[{"result":"well hello there, my phone number is "}]}`, string(respBody)) + }) + + t.Run("scrub input email", func(t *testing.T) { + body := `{"inputs":[{"message":"well hello there, my email is test@test.com", "scrubPII": true}]}` + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) + require.NoError(t, err) + resp, err := httpClient.Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + require.Equal(t, `{"outputs":[{"result":"well hello there, my email is "}]}`, string(respBody)) + }) + + t.Run("scrub input ip address", func(t *testing.T) { + body := `{"inputs":[{"message":"well hello there from 10.8.9.1", "scrubPII": true}]}` + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) + require.NoError(t, err) + resp, err := httpClient.Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + require.Equal(t, `{"outputs":[{"result":"well hello there from "}]}`, string(respBody)) + }) + + t.Run("scrub all outputs for PII", func(t *testing.T) { + body := `{"inputs":[{"message":"well hello there from 10.8.9.1"},{"message":"well hello there, my email is test@test.com"}],"scrubPII": true}` + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) + require.NoError(t, err) + resp, err := httpClient.Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + require.Equal(t, `{"outputs":[{"result":"well hello there from "}, {"result":"well hello there, my email is "}]}`, string(respBody)) + }) + + t.Run("no scrubbing on good input", func(t *testing.T) { + body := `{"inputs":[{"message":"well hello there","scrubPII": true}],"scrubPII": true}` + + req, err := http.NewRequestWithContext(ctx, http.MethodPost, postURL, strings.NewReader(body)) + require.NoError(t, err) + resp, err := httpClient.Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusOK, resp.StatusCode) + respBody, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.NoError(t, resp.Body.Close()) + require.Equal(t, `{"outputs":[{"result":"well hello there"}]}`, string(respBody)) + }) +} From 687af01dcbbc4a29e40a3f788f1533c91f7d95a8 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 14 Oct 2024 11:56:14 -0500 Subject: [PATCH 078/112] assert eventually to give time for CI Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/metrics/actors.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index aa1c5cc5a7c..71d803f1499 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -107,8 +107,10 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - metrics = a.scheduler.Metrics(t, ctx) - assert.Equal(t, 1, int(metrics["dapr_scheduler_jobs_created_total"])) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + metrics = a.scheduler.Metrics(t, ctx) + assert.Equal(c, 1, int(metrics["dapr_scheduler_jobs_created_total"])) + }, time.Second*4, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) From 681a30d10fcc877fa480d9838f6a0b3e00a5a062 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 14 Oct 2024 12:52:13 -0500 Subject: [PATCH 079/112] give grace to a test for CI env Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/metrics/jobstriggered.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/suite/scheduler/metrics/jobstriggered.go b/tests/integration/suite/scheduler/metrics/jobstriggered.go index 4ef3b3e7c73..d25c19de55a 100644 --- a/tests/integration/suite/scheduler/metrics/jobstriggered.go +++ b/tests/integration/suite/scheduler/metrics/jobstriggered.go @@ -169,8 +169,9 @@ func (j *jobstriggered) Run(t *testing.T, ctx context.Context) { // ensure the trigger duration is less than 1 second (1000 milliseconds) assert.Less(t, avgTriggerLatency, float64(1000), "Trigger duration should be less than 1 second") + grace := 1000 // triggered time should be less than the total round trip time of a job being scheduled and sent back to the app - assert.Less(t, int64(avgTriggerLatency), receivedJobElapsed, "Trigger time should be less than the total elapsed time to receive the scheduled job") + assert.LessOrEqual(t, int64(avgTriggerLatency), receivedJobElapsed+int64(grace), "Trigger time should be less than the total elapsed time to receive the scheduled job") }, time.Second*3, 10*time.Millisecond) test.exp(t, job) From 96bf8e3bdd0f631740a65479a44d6d64eff0b837 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Mon, 14 Oct 2024 19:31:34 +0100 Subject: [PATCH 080/112] Integration Test: PII: use JSON equal for json string assertion (#8195) Signed-off-by: joshvanl Co-authored-by: Cassie Coyle --- .../suite/daprd/conversation/http/scrubpii.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/suite/daprd/conversation/http/scrubpii.go b/tests/integration/suite/daprd/conversation/http/scrubpii.go index ca6b4116f1b..a4c8d1f78ad 100644 --- a/tests/integration/suite/daprd/conversation/http/scrubpii.go +++ b/tests/integration/suite/daprd/conversation/http/scrubpii.go @@ -74,7 +74,7 @@ func (s *scrubPII) Run(t *testing.T, ctx context.Context) { respBody, err := io.ReadAll(resp.Body) require.NoError(t, err) require.NoError(t, resp.Body.Close()) - require.Equal(t, `{"outputs":[{"result":"well hello there, my phone number is "}]}`, string(respBody)) + require.JSONEq(t, `{"outputs":[{"result":"well hello there, my phone number is "}]}`, string(respBody)) }) t.Run("scrub input email", func(t *testing.T) { @@ -88,7 +88,7 @@ func (s *scrubPII) Run(t *testing.T, ctx context.Context) { respBody, err := io.ReadAll(resp.Body) require.NoError(t, err) require.NoError(t, resp.Body.Close()) - require.Equal(t, `{"outputs":[{"result":"well hello there, my email is "}]}`, string(respBody)) + require.JSONEq(t, `{"outputs":[{"result":"well hello there, my email is "}]}`, string(respBody)) }) t.Run("scrub input ip address", func(t *testing.T) { @@ -102,7 +102,7 @@ func (s *scrubPII) Run(t *testing.T, ctx context.Context) { respBody, err := io.ReadAll(resp.Body) require.NoError(t, err) require.NoError(t, resp.Body.Close()) - require.Equal(t, `{"outputs":[{"result":"well hello there from "}]}`, string(respBody)) + require.JSONEq(t, `{"outputs":[{"result":"well hello there from "}]}`, string(respBody)) }) t.Run("scrub all outputs for PII", func(t *testing.T) { @@ -116,7 +116,7 @@ func (s *scrubPII) Run(t *testing.T, ctx context.Context) { respBody, err := io.ReadAll(resp.Body) require.NoError(t, err) require.NoError(t, resp.Body.Close()) - require.Equal(t, `{"outputs":[{"result":"well hello there from "}, {"result":"well hello there, my email is "}]}`, string(respBody)) + require.JSONEq(t, `{"outputs":[{"result":"well hello there from "}, {"result":"well hello there, my email is "}]}`, string(respBody)) }) t.Run("no scrubbing on good input", func(t *testing.T) { @@ -130,6 +130,6 @@ func (s *scrubPII) Run(t *testing.T, ctx context.Context) { respBody, err := io.ReadAll(resp.Body) require.NoError(t, err) require.NoError(t, resp.Body.Close()) - require.Equal(t, `{"outputs":[{"result":"well hello there"}]}`, string(respBody)) + require.JSONEq(t, `{"outputs":[{"result":"well hello there"}]}`, string(respBody)) }) } From 8b82ea157069ec6b2105e1469df3d9ef043cc93c Mon Sep 17 00:00:00 2001 From: Zane Dufour Date: Mon, 14 Oct 2024 14:32:47 -0400 Subject: [PATCH 081/112] docs: fix upgrade dapr with helm link (#8162) * docs: fix upgrade dapr with helm link Signed-off-by: Zane Dufour * Update README.md Signed-off-by: Zane Dufour --------- Signed-off-by: Zane Dufour Co-authored-by: Cassie Coyle Co-authored-by: Josh van Leeuwen Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> --- charts/dapr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/dapr/README.md b/charts/dapr/README.md index f5e69d65a58..0d7970c5c9e 100644 --- a/charts/dapr/README.md +++ b/charts/dapr/README.md @@ -54,7 +54,7 @@ helm uninstall dapr -n dapr-system ## Upgrade the charts -Follow the upgrade HowTo instructions in [Upgrading Dapr with Helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#upgrading-dapr-with-helm). +Follow the upgrade HowTo instructions in [Upgrade Dapr with Helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#upgrade-dapr-with-helm). ## Resource configuration From dc5a4e1d5ba294660b19bfa1b3bc534e85622db4 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Mon, 14 Oct 2024 13:35:38 -0500 Subject: [PATCH 082/112] update path for job key path Signed-off-by: Cassandra Coyle --- tests/integration/suite/scheduler/metrics/actors.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index 71d803f1499..aeae2b27240 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -16,7 +16,6 @@ package metrics import ( "context" "net/http" - "path/filepath" "sync/atomic" "testing" "time" @@ -86,8 +85,8 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { grpcClient := a.daprd.GRPCClient(t, ctx) - // Use "path/filepath" import, it is using OS specific path separator unlike "path" - etcdKeysPrefix := filepath.Join("dapr", "jobs") + // should have the same path separator across OS + etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) From 49348466086a745aa911bcc369efbf5948e08413 Mon Sep 17 00:00:00 2001 From: Artur Souza Date: Mon, 14 Oct 2024 17:23:53 -0700 Subject: [PATCH 083/112] Disable some checks in master branch. (#8200) Signed-off-by: Artur Souza --- .github/workflows/dapr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/dapr.yml b/.github/workflows/dapr.yml index 80cb4890987..c0cc199f1cf 100644 --- a/.github/workflows/dapr.yml +++ b/.github/workflows/dapr.yml @@ -60,6 +60,7 @@ jobs: with: go-version-file: "go.mod" - name: Initialize CodeQL + if: github.event_name == 'pull_request' uses: github/codeql-action/init@v3.25.12 with: languages: go @@ -113,6 +114,7 @@ jobs: make init-proto make gen-proto check-proto-diff - name: Perform CodeQL Analysis + if: github.event_name == 'pull_request' uses: github/codeql-action/analyze@v3.26.12 with: ram: 4096 @@ -120,6 +122,7 @@ jobs: depcheck: name: "Dependency Review" + if: github.event_name == 'pull_request' runs-on: ubuntu-latest permissions: contents: read From 3372d6dd005e84059f568c9c1df1338c3122d2f6 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Mon, 14 Oct 2024 17:24:55 -0700 Subject: [PATCH 084/112] Add LLM temperature support (#8199) * add llm temperature support Signed-off-by: yaron2 * dependency fix Signed-off-by: yaron2 * tidy Signed-off-by: yaron2 --------- Signed-off-by: yaron2 --- dapr/proto/runtime/v1/dapr.proto | 3 + go.mod | 9 +- go.sum | 18 +- pkg/api/universal/conversation.go | 1 + pkg/proto/runtime/v1/dapr.pb.go | 848 +++++++++++++++--------------- 5 files changed, 452 insertions(+), 427 deletions(-) diff --git a/dapr/proto/runtime/v1/dapr.proto b/dapr/proto/runtime/v1/dapr.proto index d721cd0efc8..b70fc221217 100644 --- a/dapr/proto/runtime/v1/dapr.proto +++ b/dapr/proto/runtime/v1/dapr.proto @@ -1298,6 +1298,9 @@ message ConversationAlpha1Request { // Scrub PII data that comes back from the LLM optional bool scrubPII = 6; + + // Temperature for the LLM to optimize for creativity or predictability + optional double temperature = 7; } message ConversationInput { diff --git a/go.mod b/go.mod index 6db461c23ed..f9879a078f9 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/argoproj/argo-rollouts v1.4.1 github.com/cenkalti/backoff/v4 v4.3.0 github.com/cloudevents/sdk-go/v2 v2.15.2 - github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf + github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 github.com/evanphx/json-patch/v5 v5.9.0 @@ -123,7 +123,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0 // indirect github.com/Azure/go-amqp v1.0.5 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/IBM/sarama v1.42.2 // indirect @@ -208,6 +208,7 @@ require ( github.com/deepmap/oapi-codegen v1.11.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/didip/tollbooth/v7 v7.0.1 // indirect + github.com/dlclark/regexp2 v1.10.0 // indirect github.com/dubbogo/gost v1.13.1 // indirect github.com/dubbogo/triple v1.1.8 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -333,7 +334,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/spdystream v0.2.0 // indirect - github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect @@ -360,6 +361,7 @@ require ( github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pkoukk/tiktoken-go v0.1.6 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/procfs v0.15.1 // indirect @@ -399,6 +401,7 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect + github.com/tmc/langchaingo v0.1.12 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/vmware/vmware-go-kcl v1.5.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect diff --git a/go.sum b/go.sum index e6b62e1f69c..67ea2089d73 100644 --- a/go.sum +++ b/go.sum @@ -107,8 +107,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0 h1:lJwNFV+xYjHREUTH github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v1.0.0/go.mod h1:GfT0aGew8Qj5yiQVqOO5v7N8fanbJGyUoHqXg56qcVY= github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -454,8 +454,8 @@ github.com/dancannon/gorethink v4.0.0+incompatible h1:KFV7Gha3AuqT+gr0B/eKvGhbjm github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf h1:9ehvRfNJj83ePSecgut/namMKRXCs5rkmi/5eWCJMfc= -github.com/dapr/components-contrib v1.14.1-0.20241010135037-69119d6f6ccf/go.mod h1:bnOi3nIPO8c5S1cgjbcmvak8WZxrtBZUEfzaNKRpypY= +github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 h1:7M9X/b7glTRxQV5LDiJ7zl0kt5an7i91juttIteMws8= +github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0/go.mod h1:bnOi3nIPO8c5S1cgjbcmvak8WZxrtBZUEfzaNKRpypY= github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb h1:ahLO7pMmX6HAuT6/RxYWBY4AN2fXQJcYlU1msY6Kt7U= github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -486,6 +486,8 @@ github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulV github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= +github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= +github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c= github.com/dubbogo/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8= @@ -1213,8 +1215,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1373,6 +1375,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkoukk/tiktoken-go v0.1.6 h1:JF0TlJzhTbrI30wCvFuiw6FzP2+/bR+FIxUdgEAcUsw= +github.com/pkoukk/tiktoken-go v0.1.6/go.mod h1:9NiV+i9mJKGj1rYOT+njbv+ZwA/zJxYdewGl6qVatpg= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1620,6 +1624,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= +github.com/tmc/langchaingo v0.1.12 h1:yXwSu54f3b1IKw0jJ5/DWu+qFVH1NBblwC0xddBzGJE= +github.com/tmc/langchaingo v0.1.12/go.mod h1:cd62xD6h+ouk8k/QQFhOsjRYBSA1JJ5UVKXSIgm7Ni4= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= diff --git a/pkg/api/universal/conversation.go b/pkg/api/universal/conversation.go index e1a462db946..8db104c249e 100644 --- a/pkg/api/universal/conversation.go +++ b/pkg/api/universal/conversation.go @@ -84,6 +84,7 @@ func (a *Universal) ConverseAlpha1(ctx context.Context, req *runtimev1pb.Convers request.Parameters = req.GetParameters() request.ConversationContext = req.GetContextID() + request.Temperature = req.GetTemperature() // do call policyRunner := resiliency.NewRunner[*conversation.ConversationResponse](ctx, diff --git a/pkg/proto/runtime/v1/dapr.pb.go b/pkg/proto/runtime/v1/dapr.pb.go index f6787143534..b1dd9a6c000 100644 --- a/pkg/proto/runtime/v1/dapr.pb.go +++ b/pkg/proto/runtime/v1/dapr.pb.go @@ -6859,6 +6859,8 @@ type ConversationAlpha1Request struct { Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Scrub PII data that comes back from the LLM ScrubPII *bool `protobuf:"varint,6,opt,name=scrubPII,proto3,oneof" json:"scrubPII,omitempty"` + // Temperature for the LLM to optimize for creativity or predictability + Temperature *float64 `protobuf:"fixed64,7,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"` } func (x *ConversationAlpha1Request) Reset() { @@ -6935,6 +6937,13 @@ func (x *ConversationAlpha1Request) GetScrubPII() bool { return false } +func (x *ConversationAlpha1Request) GetTemperature() float64 { + if x != nil && x.Temperature != nil { + return *x.Temperature + } + return 0 +} + type ConversationInput struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8179,7 +8188,7 @@ var file_dapr_proto_runtime_v1_dapr_proto_rawDesc = []byte{ 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x04, 0x0a, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x04, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, @@ -8203,458 +8212,461 @@ var file_dapr_proto_runtime_v1_dapr_proto_rawDesc = []byte{ 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x88, - 0x01, 0x01, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x49, 0x44, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x22, - 0x7d, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, - 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, - 0x50, 0x49, 0x49, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x08, 0x73, 0x63, 0x72, - 0x75, 0x62, 0x50, 0x49, 0x49, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, - 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x22, 0xe8, - 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x49, 0x44, 0x2a, 0x57, 0x0a, 0x16, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, - 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x32, 0xb5, 0x31, - 0x0a, 0x04, 0x44, 0x61, 0x70, 0x72, 0x12, 0x64, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x02, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x53, 0x0a, 0x0f, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, + 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x7d, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, + 0x0a, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x01, 0x52, 0x08, 0x73, 0x63, 0x72, 0x75, 0x62, 0x50, 0x49, 0x49, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x73, 0x63, 0x72, + 0x75, 0x62, 0x50, 0x49, 0x49, 0x22, 0xe8, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0f, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x88, + 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x44, 0x2a, 0x57, 0x0a, 0x16, 0x50, + 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x4d, 0x41, + 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, + 0x4e, 0x47, 0x10, 0x03, 0x32, 0xb5, 0x31, 0x0a, 0x04, 0x44, 0x61, 0x70, 0x72, 0x12, 0x64, 0x0a, + 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x08, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x64, 0x61, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, + 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x09, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x69, 0x0a, + 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, - 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x2e, 0x64, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, + 0x6c, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x42, 0x75, + 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, + 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x97, 0x01, + 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x38, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, - 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x39, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x97, 0x01, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x38, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, - 0x39, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x6c, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, - 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, - 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x64, 0x61, + 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, - 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, - 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, - 0x69, 0x6d, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x64, 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, - 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x75, + 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, - 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, - 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, - 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x6c, 0x6b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x1c, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, - 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x14, 0x55, 0x6e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, + 0x32, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, + 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, + 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x17, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x6f, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x74, 0x0a, 0x1c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, + 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7b, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x34, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x89, 0x01, 0x0a, - 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x8f, 0x01, 0x0a, 0x1c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x12, 0x34, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x89, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, + 0x93, 0x01, 0x0a, 0x1e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0d, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, + 0x6b, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, + 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x93, 0x01, 0x0a, 0x1e, 0x55, 0x6e, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x36, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, - 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, - 0x0a, 0x0d, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, - 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x62, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x66, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x52, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, - 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x0d, 0x44, 0x65, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x66, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, - 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, + 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, + 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, 0x75, 0x62, + 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x74, - 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, - 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, - 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x67, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x53, + 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, + 0x65, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x44, 0x65, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, + 0x13, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x41, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, - 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, - 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, - 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, - 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, - 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x13, 0x50, 0x75, - 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5c, - 0x0a, 0x13, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x14, - 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x18, - 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x74, 0x6c, 0x65, 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x76, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, + 0x65, 0x79, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2d, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, + 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x74, 0x6c, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x74, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6d, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x74, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x6c, + 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x72, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x5c, 0x0a, 0x13, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x64, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x63, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, + 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x13, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x65, 0x0a, 0x17, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0x30, 0x2e, + 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x18, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, + 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x12, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, + 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, + 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x50, + 0x75, 0x72, 0x67, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, + 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x16, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, + 0x61, 0x31, 0x12, 0x2f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, + 0x12, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, + 0x74, 0x61, 0x31, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x75, 0x73, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x74, 0x61, + 0x31, 0x12, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x08, 0x53, 0x68, 0x75, - 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, - 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x17, 0x52, 0x61, 0x69, + 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, + 0x65, 0x74, 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x69, + 0x73, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x4c, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x6c, + 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, + 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0f, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x27, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x41, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x0e, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x12, 0x30, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x69, 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x44, 0x61, 0x70, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, - 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, - 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x69, 0x0a, 0x0a, + 0x69, 0x6f, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x44, 0x61, 0x70, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, + 0x31, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0xaa, 0x02, 0x1b, 0x44, 0x61, 0x70, 0x72, + 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2e, + 0x47, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 6b46daa68d7f22349813b7fa4165ca9e4dafefb3 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:03:21 -0500 Subject: [PATCH 085/112] further fine tuning Signed-off-by: Cassandra Coyle --- tests/perf/actor_reminder/actor_reminder_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/perf/actor_reminder/actor_reminder_test.go b/tests/perf/actor_reminder/actor_reminder_test.go index a2f82f58fff..880b9ebef92 100644 --- a/tests/perf/actor_reminder/actor_reminder_test.go +++ b/tests/perf/actor_reminder/actor_reminder_test.go @@ -50,7 +50,7 @@ const ( // Target for the QPS - Temporary targetQPS float64 = 33 - targetSchedulerQPS float64 = 2900 + targetSchedulerQPS float64 = 2850 // Target for the QPS to trigger reminders. targetTriggerQPS float64 = 1000 @@ -296,7 +296,7 @@ func TestActorReminderSchedulerRegistrationPerformance(t *testing.T) { assert.Equal(t, 0, daprResult.RetCodes.Num400) assert.Equal(t, 0, daprResult.RetCodes.Num500) assert.Equal(t, 0, restarts) - assert.InDelta(t, targetSchedulerQPS, daprResult.ActualQPS, 10) + assert.InDelta(t, targetSchedulerQPS, daprResult.ActualQPS, 100) } type actorReminderRequest struct { From 54d5e05082d8b97a1ee97c2343cb63d4244d47c3 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:32:35 -0500 Subject: [PATCH 086/112] try fixing borked e2e Signed-off-by: Cassandra Coyle --- .github/workflows/kind-e2e.yaml | 48 +++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 3b15ad893b2..10568eb478c 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -220,14 +220,52 @@ jobs: df -h echo "Removing large packages" sudo apt-get update - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y 'temurin-*' - sudo apt-get remove -y microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel + + // check if pkgs exist before removing them + if dpkg -l | grep -q '^dotnet-.*'; then + sudo apt-get remove -y '^dotnet-.*' + fi + + if dpkg -l | grep -q '^llvm-.*'; then + sudo apt-get remove -y '^llvm-.*' + fi + + if dpkg -l | grep -q 'php.*'; then + sudo apt-get remove -y 'php.*' + fi + + if dpkg -l | grep -q 'temurin-*'; then + sudo apt-get remove -y 'temurin-*' + fi + + if dpkg -l | grep -q 'microsoft-edge-stable'; then + sudo apt-get remove -y microsoft-edge-stable + fi + + if dpkg -l | grep -q 'azure-cli'; then + sudo apt-get remove -y azure-cli + fi + + if dpkg -l | grep -q 'google-chrome-stable'; then + sudo apt-get remove -y google-chrome-stable + fi + + if dpkg -l | grep -q 'firefox'; then + sudo apt-get remove -y firefox + fi + + if dpkg -l | grep -q 'powershell'; then + sudo apt-get remove -y powershell + fi + + if dpkg -l | grep -q 'mono-devel'; then + sudo apt-get remove -y mono-devel + fi + sudo apt-get autoremove -y sudo apt-get clean df -h + echo "Removing large directories" # deleting 15GB rm -rf /usr/share/dotnet/ From 9afe64cdc5fcb07e3400f9237bf7a5e3ca34d4eb Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:36:57 -0500 Subject: [PATCH 087/112] try fixing standalone validation Signed-off-by: Cassandra Coyle --- .github/workflows/dapr-standalone-validation.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dapr-standalone-validation.yml b/.github/workflows/dapr-standalone-validation.yml index bc7ec04c6f1..7268ea3f446 100644 --- a/.github/workflows/dapr-standalone-validation.yml +++ b/.github/workflows/dapr-standalone-validation.yml @@ -42,8 +42,16 @@ jobs: GOARCH: amd64 DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install/install.sh steps: - - name: Install required packages - run: pip3 install scipy psutil + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Create virtual environment + run: python3 -m venv venv + - name: Activate virtual environment and install required packages + run: | + source venv/bin/activate + pip install scipy psutil # This is a good example where we want to always compare against the latest stable release. # Pinning to a given Dapr version does not add any value in this workflow. - name: Install latest Dapr CLI From 63f23f944482f2947447544ad0881adabb8b31f2 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:40:21 -0500 Subject: [PATCH 088/112] install numpy too Signed-off-by: Cassandra Coyle --- .github/workflows/dapr-standalone-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dapr-standalone-validation.yml b/.github/workflows/dapr-standalone-validation.yml index 7268ea3f446..ecb70c19f46 100644 --- a/.github/workflows/dapr-standalone-validation.yml +++ b/.github/workflows/dapr-standalone-validation.yml @@ -51,7 +51,7 @@ jobs: - name: Activate virtual environment and install required packages run: | source venv/bin/activate - pip install scipy psutil + pip install numpy scipy psutil # This is a good example where we want to always compare against the latest stable release. # Pinning to a given Dapr version does not add any value in this workflow. - name: Install latest Dapr CLI From 04e22a3c9e09a227b0e667420014d90d6b53cce1 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:44:29 -0500 Subject: [PATCH 089/112] update pip & install pkgs globally instead of venv Signed-off-by: Cassandra Coyle --- .github/workflows/dapr-standalone-validation.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dapr-standalone-validation.yml b/.github/workflows/dapr-standalone-validation.yml index ecb70c19f46..df1e5d4d600 100644 --- a/.github/workflows/dapr-standalone-validation.yml +++ b/.github/workflows/dapr-standalone-validation.yml @@ -46,12 +46,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.x' - - name: Create virtual environment - run: python3 -m venv venv - - name: Activate virtual environment and install required packages + - name: Upgrade pip run: | - source venv/bin/activate - pip install numpy scipy psutil + python3 -m ensurepip --upgrade + python3 -m pip install --upgrade pip + - name: Install required Python packages + run: | + python3 -m pip install numpy scipy psutil # This is a good example where we want to always compare against the latest stable release. # Pinning to a given Dapr version does not add any value in this workflow. - name: Install latest Dapr CLI From d6380bb329dd1770d8a99e708fa45aa44ec075e6 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:47:06 -0500 Subject: [PATCH 090/112] install requests Signed-off-by: Cassandra Coyle --- .github/workflows/dapr-standalone-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dapr-standalone-validation.yml b/.github/workflows/dapr-standalone-validation.yml index df1e5d4d600..3ed79096bbd 100644 --- a/.github/workflows/dapr-standalone-validation.yml +++ b/.github/workflows/dapr-standalone-validation.yml @@ -52,7 +52,7 @@ jobs: python3 -m pip install --upgrade pip - name: Install required Python packages run: | - python3 -m pip install numpy scipy psutil + python3 -m pip install numpy scipy psutil requests # This is a good example where we want to always compare against the latest stable release. # Pinning to a given Dapr version does not add any value in this workflow. - name: Install latest Dapr CLI From 28555e03999b10878d4ea3a3542d54863a229ee3 Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 10:55:21 -0500 Subject: [PATCH 091/112] // -> # for commented line Signed-off-by: Cassandra Coyle --- .github/workflows/kind-e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 10568eb478c..785e7f0e554 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -221,7 +221,7 @@ jobs: echo "Removing large packages" sudo apt-get update - // check if pkgs exist before removing them + # check if pkgs exist before removing them if dpkg -l | grep -q '^dotnet-.*'; then sudo apt-get remove -y '^dotnet-.*' fi From 435dda163e33f458a29484b6f52ad73c5923cd6a Mon Sep 17 00:00:00 2001 From: Cassandra Coyle Date: Tue, 15 Oct 2024 11:10:29 -0500 Subject: [PATCH 092/112] match only installed version of powershell Signed-off-by: Cassandra Coyle --- .github/workflows/kind-e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 785e7f0e554..8004afc5a53 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -254,7 +254,7 @@ jobs: sudo apt-get remove -y firefox fi - if dpkg -l | grep -q 'powershell'; then + if dpkg -l | grep -q '^powershell'; then sudo apt-get remove -y powershell fi From 6baedbd6c523d8bee34a2cce0ed6ad9dbb964848 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Fri, 27 Sep 2024 19:10:24 +0100 Subject: [PATCH 093/112] Scheduler: ListJobs API Adds the `ListJobs` rpc API to the Scheduler gRPC service. This API returns the either - the Jobs for the given app ID and namespace, or - the ActorReminders for a given namespace & actor type, with the option to also scope the list to an actor ID. ```proto rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {} `` This API has been added to allow for migrating ActorReminder from the "legacy" state store implementation, into Scheduler via daprd. daprd needs to be able to list ActorReminders in Scheduler to reconcile the difference and then apply the missing ActorReminders to Scheduler. Adds `NamedJob` message to `scheduler.proto` so the Job response also includes the Jobs name. The `ListResponse` includes the field `has_more` to indicate that there are more jobs that match the list query, however the reponse size exceeds Etcd's maximum response size. In the cron library requests for the maximum number of jobs keys possible, using a [limit of `0`](https://github.com/diagridio/go-etcd-cron/pull/43/files#diff-5b9b550fff634f1fd5596893d63ceeb6afa6a355427db919a644a21f097b7834R190). Since Jobs contain payload data, the message for a Jobs List response can easily exceed the dedault 4MB gRPC message receive size limit. To manage this, the scheduler Etcd client and daprd scheduler client has increased the gRPC receive message size limit to `math.MaxInt32`. Signed-off-by: joshvanl --- dapr/proto/scheduler/v1/scheduler.proto | 26 ++ go.mod | 8 +- go.sum | 8 +- pkg/proto/scheduler/v1/scheduler.pb.go | 326 +++++++++++++++--- pkg/proto/scheduler/v1/scheduler_grpc.pb.go | 41 ++- pkg/scheduler/client/client.go | 2 + pkg/scheduler/server/api.go | 68 +++- pkg/scheduler/server/config.go | 2 + pkg/scheduler/server/server.go | 17 +- tests/integration/framework/binary/binary.go | 51 ++- .../process/grpc/scheduler/options.go | 7 + .../process/grpc/scheduler/scheduler.go | 1 + .../process/grpc/scheduler/server.go | 8 + .../framework/process/helm/helm.go | 2 +- .../framework/process/helm/options.go | 4 +- .../framework/process/scheduler/scheduler.go | 93 ++++- .../actors/reminders/scheduler/remove.go | 12 +- tests/integration/suite/daprd/jobs/remove.go | 12 +- .../workflow/scheduler/deletereminder.go | 8 +- .../scheduler/api/api.go} | 30 +- tests/integration/suite/scheduler/api/jobs.go | 30 +- .../suite/scheduler/api/list/crud.go | 238 +++++++++++++ .../suite/scheduler/api/list/data.go | 145 ++++++++ .../suite/scheduler/api/list/size.go | 87 +++++ .../integration/suite/scheduler/api/remove.go | 12 +- .../integration/suite/scheduler/authz/mtls.go | 26 ++ .../suite/scheduler/metrics/actors.go | 8 +- 27 files changed, 1091 insertions(+), 181 deletions(-) rename tests/integration/{framework/binary/buildopts.go => suite/scheduler/api/api.go} (53%) create mode 100644 tests/integration/suite/scheduler/api/list/crud.go create mode 100644 tests/integration/suite/scheduler/api/list/data.go create mode 100644 tests/integration/suite/scheduler/api/list/size.go diff --git a/dapr/proto/scheduler/v1/scheduler.proto b/dapr/proto/scheduler/v1/scheduler.proto index 6b281208ad8..a6db1d04f82 100644 --- a/dapr/proto/scheduler/v1/scheduler.proto +++ b/dapr/proto/scheduler/v1/scheduler.proto @@ -16,6 +16,8 @@ service Scheduler { // WatchJobs is used by the daprd sidecar to connect to the Scheduler // service to watch for jobs triggering back. rpc WatchJobs(stream WatchJobsRequest) returns (stream WatchJobsResponse) {} + // ListJobs is used by the daprd sidecar to list all jobs. + rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {} } message Job { @@ -157,3 +159,27 @@ message DeleteJobRequest { message DeleteJobResponse { // Empty } + +// NamedJob is a job with a name. +message NamedJob { + // name is the name of the job. + string name = 1; + + // The job scheduled. + Job job = 2; +} + +// ListJobsRequest is the message used by the daprd sidecar to list all jobs. +message ListJobsRequest { + // The metadata associated with the job. + JobMetadata metadata = 1; +} + +// ListJobsResponse is the response message to convey the details of a job. +message ListJobsResponse { + // The list of jobs. + repeated NamedJob jobs = 1; + + // Whether there are more jobs to list. + bool has_more = 2; +} diff --git a/go.mod b/go.mod index f9879a078f9..ee1268208a9 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/dapr/dapr -go 1.23.0 - -toolchain go1.23.1 +go 1.23.1 require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 @@ -14,7 +12,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/cloudevents/sdk-go/v2 v2.15.2 github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 - github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb + github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 github.com/evanphx/json-patch/v5 v5.9.0 github.com/go-chi/chi/v5 v5.0.11 @@ -500,3 +498,5 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 // // Then, run `make modtidy-all` in this repository. // This ensures that go.mod and go.sum are up-to-date for each go.mod file. + +replace github.com/diagridio/go-etcd-cron => github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517 diff --git a/go.sum b/go.sum index 67ea2089d73..90fa51fc562 100644 --- a/go.sum +++ b/go.sum @@ -456,8 +456,8 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 h1:7M9X/b7glTRxQV5LDiJ7zl0kt5an7i91juttIteMws8= github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0/go.mod h1:bnOi3nIPO8c5S1cgjbcmvak8WZxrtBZUEfzaNKRpypY= -github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb h1:ahLO7pMmX6HAuT6/RxYWBY4AN2fXQJcYlU1msY6Kt7U= -github.com/dapr/kit v0.13.1-0.20240909215017-3823663aa4bb/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= +github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 h1:GZxwr7os1PAnVt/q1FVBJBMaudbRJ7fkZthhmPwBDvI= +github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -480,8 +480,6 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 h1:GhQpbKFdNd8oGw3S2otAyiB8PqVn3anqzIypV4s7Sfo= -github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8/go.mod h1:yYzzG6/Qgq4jlRi/ZIri2zgKkxhghxiA8u7a4Q7tIYQ= github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog= github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= @@ -1036,6 +1034,8 @@ github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9q github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517 h1:mjNpTqZ/zGwVi0229tc8AyrAEK4ntO0tFgO6Z3FPypI= +github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517/go.mod h1:CpWXkgaS4uf6XsxztKpO/n0lF6NA0S9TN657MLNTDbY= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= diff --git a/pkg/proto/scheduler/v1/scheduler.pb.go b/pkg/proto/scheduler/v1/scheduler.pb.go index 9f7d07c4069..1cebb8caee8 100644 --- a/pkg/proto/scheduler/v1/scheduler.pb.go +++ b/pkg/proto/scheduler/v1/scheduler.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.32.0 -// protoc v4.24.4 +// protoc v4.25.4 // source: dapr/proto/scheduler/v1/scheduler.proto package scheduler @@ -939,6 +939,171 @@ func (*DeleteJobResponse) Descriptor() ([]byte, []int) { return file_dapr_proto_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{14} } +// NamedJob is a job with a name. +type NamedJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name is the name of the job. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The job scheduled. + Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` +} + +func (x *NamedJob) Reset() { + *x = NamedJob{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamedJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamedJob) ProtoMessage() {} + +func (x *NamedJob) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamedJob.ProtoReflect.Descriptor instead. +func (*NamedJob) Descriptor() ([]byte, []int) { + return file_dapr_proto_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{15} +} + +func (x *NamedJob) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NamedJob) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +// ListJobsRequest is the message used by the daprd sidecar to list all jobs. +type ListJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The metadata associated with the job. + Metadata *JobMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *ListJobsRequest) Reset() { + *x = ListJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsRequest) ProtoMessage() {} + +func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead. +func (*ListJobsRequest) Descriptor() ([]byte, []int) { + return file_dapr_proto_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{16} +} + +func (x *ListJobsRequest) GetMetadata() *JobMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +// ListJobsResponse is the response message to convey the details of a job. +type ListJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of jobs. + Jobs []*NamedJob `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + // Whether there are more jobs to list. + HasMore bool `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` +} + +func (x *ListJobsResponse) Reset() { + *x = ListJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsResponse) ProtoMessage() {} + +func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead. +func (*ListJobsResponse) Descriptor() ([]byte, []int) { + return file_dapr_proto_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{17} +} + +func (x *ListJobsResponse) GetJobs() []*NamedJob { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *ListJobsResponse) GetHasMore() bool { + if x != nil { + return x.HasMore + } + return false +} + var File_dapr_proto_scheduler_v1_scheduler_proto protoreflect.FileDescriptor var file_dapr_proto_scheduler_v1_scheduler_proto_rawDesc = []byte{ @@ -1046,37 +1211,60 @@ var file_dapr_proto_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa4, 0x03, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x4a, 0x6f, 0x62, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5b, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, - 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4a, + 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, + 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x53, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x64, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4a, 0x6f, 0x62, + 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, + 0x65, 0x32, 0x87, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, + 0x6a, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x2b, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, + 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x06, 0x47, + 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, - 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, + 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, - 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x64, + 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1091,7 +1279,7 @@ func file_dapr_proto_scheduler_v1_scheduler_proto_rawDescGZIP() []byte { return file_dapr_proto_scheduler_v1_scheduler_proto_rawDescData } -var file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_dapr_proto_scheduler_v1_scheduler_proto_goTypes = []interface{}{ (*Job)(nil), // 0: dapr.proto.scheduler.v1.Job (*TargetJob)(nil), // 1: dapr.proto.scheduler.v1.TargetJob @@ -1108,35 +1296,43 @@ var file_dapr_proto_scheduler_v1_scheduler_proto_goTypes = []interface{}{ (*GetJobResponse)(nil), // 12: dapr.proto.scheduler.v1.GetJobResponse (*DeleteJobRequest)(nil), // 13: dapr.proto.scheduler.v1.DeleteJobRequest (*DeleteJobResponse)(nil), // 14: dapr.proto.scheduler.v1.DeleteJobResponse - (*anypb.Any)(nil), // 15: google.protobuf.Any + (*NamedJob)(nil), // 15: dapr.proto.scheduler.v1.NamedJob + (*ListJobsRequest)(nil), // 16: dapr.proto.scheduler.v1.ListJobsRequest + (*ListJobsResponse)(nil), // 17: dapr.proto.scheduler.v1.ListJobsResponse + (*anypb.Any)(nil), // 18: google.protobuf.Any } var file_dapr_proto_scheduler_v1_scheduler_proto_depIdxs = []int32{ - 15, // 0: dapr.proto.scheduler.v1.Job.data:type_name -> google.protobuf.Any + 18, // 0: dapr.proto.scheduler.v1.Job.data:type_name -> google.protobuf.Any 1, // 1: dapr.proto.scheduler.v1.JobTargetMetadata.job:type_name -> dapr.proto.scheduler.v1.TargetJob 2, // 2: dapr.proto.scheduler.v1.JobTargetMetadata.actor:type_name -> dapr.proto.scheduler.v1.TargetActorReminder 3, // 3: dapr.proto.scheduler.v1.JobMetadata.target:type_name -> dapr.proto.scheduler.v1.JobTargetMetadata 6, // 4: dapr.proto.scheduler.v1.WatchJobsRequest.initial:type_name -> dapr.proto.scheduler.v1.WatchJobsRequestInitial 7, // 5: dapr.proto.scheduler.v1.WatchJobsRequest.result:type_name -> dapr.proto.scheduler.v1.WatchJobsRequestResult - 15, // 6: dapr.proto.scheduler.v1.WatchJobsResponse.data:type_name -> google.protobuf.Any + 18, // 6: dapr.proto.scheduler.v1.WatchJobsResponse.data:type_name -> google.protobuf.Any 4, // 7: dapr.proto.scheduler.v1.WatchJobsResponse.metadata:type_name -> dapr.proto.scheduler.v1.JobMetadata 0, // 8: dapr.proto.scheduler.v1.ScheduleJobRequest.job:type_name -> dapr.proto.scheduler.v1.Job 4, // 9: dapr.proto.scheduler.v1.ScheduleJobRequest.metadata:type_name -> dapr.proto.scheduler.v1.JobMetadata 4, // 10: dapr.proto.scheduler.v1.GetJobRequest.metadata:type_name -> dapr.proto.scheduler.v1.JobMetadata 0, // 11: dapr.proto.scheduler.v1.GetJobResponse.job:type_name -> dapr.proto.scheduler.v1.Job 4, // 12: dapr.proto.scheduler.v1.DeleteJobRequest.metadata:type_name -> dapr.proto.scheduler.v1.JobMetadata - 9, // 13: dapr.proto.scheduler.v1.Scheduler.ScheduleJob:input_type -> dapr.proto.scheduler.v1.ScheduleJobRequest - 11, // 14: dapr.proto.scheduler.v1.Scheduler.GetJob:input_type -> dapr.proto.scheduler.v1.GetJobRequest - 13, // 15: dapr.proto.scheduler.v1.Scheduler.DeleteJob:input_type -> dapr.proto.scheduler.v1.DeleteJobRequest - 5, // 16: dapr.proto.scheduler.v1.Scheduler.WatchJobs:input_type -> dapr.proto.scheduler.v1.WatchJobsRequest - 10, // 17: dapr.proto.scheduler.v1.Scheduler.ScheduleJob:output_type -> dapr.proto.scheduler.v1.ScheduleJobResponse - 12, // 18: dapr.proto.scheduler.v1.Scheduler.GetJob:output_type -> dapr.proto.scheduler.v1.GetJobResponse - 14, // 19: dapr.proto.scheduler.v1.Scheduler.DeleteJob:output_type -> dapr.proto.scheduler.v1.DeleteJobResponse - 8, // 20: dapr.proto.scheduler.v1.Scheduler.WatchJobs:output_type -> dapr.proto.scheduler.v1.WatchJobsResponse - 17, // [17:21] is the sub-list for method output_type - 13, // [13:17] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 0, // 13: dapr.proto.scheduler.v1.NamedJob.job:type_name -> dapr.proto.scheduler.v1.Job + 4, // 14: dapr.proto.scheduler.v1.ListJobsRequest.metadata:type_name -> dapr.proto.scheduler.v1.JobMetadata + 15, // 15: dapr.proto.scheduler.v1.ListJobsResponse.jobs:type_name -> dapr.proto.scheduler.v1.NamedJob + 9, // 16: dapr.proto.scheduler.v1.Scheduler.ScheduleJob:input_type -> dapr.proto.scheduler.v1.ScheduleJobRequest + 11, // 17: dapr.proto.scheduler.v1.Scheduler.GetJob:input_type -> dapr.proto.scheduler.v1.GetJobRequest + 13, // 18: dapr.proto.scheduler.v1.Scheduler.DeleteJob:input_type -> dapr.proto.scheduler.v1.DeleteJobRequest + 5, // 19: dapr.proto.scheduler.v1.Scheduler.WatchJobs:input_type -> dapr.proto.scheduler.v1.WatchJobsRequest + 16, // 20: dapr.proto.scheduler.v1.Scheduler.ListJobs:input_type -> dapr.proto.scheduler.v1.ListJobsRequest + 10, // 21: dapr.proto.scheduler.v1.Scheduler.ScheduleJob:output_type -> dapr.proto.scheduler.v1.ScheduleJobResponse + 12, // 22: dapr.proto.scheduler.v1.Scheduler.GetJob:output_type -> dapr.proto.scheduler.v1.GetJobResponse + 14, // 23: dapr.proto.scheduler.v1.Scheduler.DeleteJob:output_type -> dapr.proto.scheduler.v1.DeleteJobResponse + 8, // 24: dapr.proto.scheduler.v1.Scheduler.WatchJobs:output_type -> dapr.proto.scheduler.v1.WatchJobsResponse + 17, // 25: dapr.proto.scheduler.v1.Scheduler.ListJobs:output_type -> dapr.proto.scheduler.v1.ListJobsResponse + 21, // [21:26] is the sub-list for method output_type + 16, // [16:21] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_dapr_proto_scheduler_v1_scheduler_proto_init() } @@ -1325,6 +1521,42 @@ func file_dapr_proto_scheduler_v1_scheduler_proto_init() { return nil } } + file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[0].OneofWrappers = []interface{}{} file_dapr_proto_scheduler_v1_scheduler_proto_msgTypes[3].OneofWrappers = []interface{}{ @@ -1341,7 +1573,7 @@ func file_dapr_proto_scheduler_v1_scheduler_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dapr_proto_scheduler_v1_scheduler_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/proto/scheduler/v1/scheduler_grpc.pb.go b/pkg/proto/scheduler/v1/scheduler_grpc.pb.go index 16694880d76..bbf7b9b6334 100644 --- a/pkg/proto/scheduler/v1/scheduler_grpc.pb.go +++ b/pkg/proto/scheduler/v1/scheduler_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 +// - protoc v4.25.4 // source: dapr/proto/scheduler/v1/scheduler.proto package scheduler @@ -23,6 +23,7 @@ const ( Scheduler_GetJob_FullMethodName = "/dapr.proto.scheduler.v1.Scheduler/GetJob" Scheduler_DeleteJob_FullMethodName = "/dapr.proto.scheduler.v1.Scheduler/DeleteJob" Scheduler_WatchJobs_FullMethodName = "/dapr.proto.scheduler.v1.Scheduler/WatchJobs" + Scheduler_ListJobs_FullMethodName = "/dapr.proto.scheduler.v1.Scheduler/ListJobs" ) // SchedulerClient is the client API for Scheduler service. @@ -38,6 +39,8 @@ type SchedulerClient interface { // WatchJobs is used by the daprd sidecar to connect to the Scheduler // service to watch for jobs triggering back. WatchJobs(ctx context.Context, opts ...grpc.CallOption) (Scheduler_WatchJobsClient, error) + // ListJobs is used by the daprd sidecar to list all jobs. + ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) } type schedulerClient struct { @@ -106,6 +109,15 @@ func (x *schedulerWatchJobsClient) Recv() (*WatchJobsResponse, error) { return m, nil } +func (c *schedulerClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, Scheduler_ListJobs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SchedulerServer is the server API for Scheduler service. // All implementations should embed UnimplementedSchedulerServer // for forward compatibility @@ -119,6 +131,8 @@ type SchedulerServer interface { // WatchJobs is used by the daprd sidecar to connect to the Scheduler // service to watch for jobs triggering back. WatchJobs(Scheduler_WatchJobsServer) error + // ListJobs is used by the daprd sidecar to list all jobs. + ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) } // UnimplementedSchedulerServer should be embedded to have forward compatible implementations. @@ -137,6 +151,9 @@ func (UnimplementedSchedulerServer) DeleteJob(context.Context, *DeleteJobRequest func (UnimplementedSchedulerServer) WatchJobs(Scheduler_WatchJobsServer) error { return status.Errorf(codes.Unimplemented, "method WatchJobs not implemented") } +func (UnimplementedSchedulerServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") +} // UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SchedulerServer will @@ -229,6 +246,24 @@ func (x *schedulerWatchJobsServer) Recv() (*WatchJobsRequest, error) { return m, nil } +func _Scheduler_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServer).ListJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Scheduler_ListJobs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServer).ListJobs(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -248,6 +283,10 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteJob", Handler: _Scheduler_DeleteJob_Handler, }, + { + MethodName: "ListJobs", + Handler: _Scheduler_ListJobs_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/scheduler/client/client.go b/pkg/scheduler/client/client.go index 1bba06a6a50..6596fbec5df 100644 --- a/pkg/scheduler/client/client.go +++ b/pkg/scheduler/client/client.go @@ -15,6 +15,7 @@ package client import ( "context" + "math" grpcMiddleware "github.com/grpc-ecosystem/go-grpc-middleware" grpcRetry "github.com/grpc-ecosystem/go-grpc-middleware/retry" @@ -43,6 +44,7 @@ func New(ctx context.Context, address string, sec security.Handler) (schedulerv1 } opts := []grpc.DialOption{ + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt32)), grpc.WithUnaryInterceptor(unaryClientInterceptor), sec.GRPCDialOptionMTLS(schedulerID), } diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 8557eda24fb..f255c0cfcea 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -115,7 +115,7 @@ func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) ( } if job == nil { - return nil, fmt.Errorf("job not found: %s", jobName) + return nil, fmt.Errorf("job not found: %s", req.GetName()) } return &schedulerv1pb.GetJobResponse{ @@ -130,6 +130,48 @@ func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) ( }, nil } +func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error) { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-s.readyCh: + } + + if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { + return nil, err + } + + prefix, err := buildJobPrefix(req.GetMetadata()) + if err != nil { + return nil, err + } + + list, err := s.cron.List(ctx, prefix) + if err != nil { + return nil, fmt.Errorf("failed to query job list: %w", err) + } + + var jobs []*schedulerv1pb.NamedJob + for _, job := range list.Jobs { + jobs = append(jobs, &schedulerv1pb.NamedJob{ + Name: job.GetName()[strings.LastIndex(job.GetName(), "||")+2:], + //nolint:protogetter + Job: &schedulerv1pb.Job{ + Schedule: job.GetJob().Schedule, + DueTime: job.GetJob().DueTime, + Ttl: job.GetJob().Ttl, + Repeats: job.GetJob().Repeats, + Data: job.GetJob().GetPayload(), + }, + }) + } + + return &schedulerv1pb.ListJobsResponse{ + Jobs: jobs, + HasMore: list.More, + }, nil +} + // WatchJobs sends jobs to Dapr sidecars upon component changes. func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error { req, err := stream.Recv() @@ -192,10 +234,6 @@ func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { } func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) { - joinStrings := func(ss ...string) string { - return strings.Join(ss, "||") - } - switch t := meta.GetTarget(); t.GetType().(type) { case *schedulerv1pb.JobTargetMetadata_Actor: actor := t.GetActor() @@ -206,3 +244,23 @@ func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) return "", fmt.Errorf("unknown job type: %v", t) } } + +func buildJobPrefix(meta *schedulerv1pb.JobMetadata) (string, error) { + switch t := meta.GetTarget(); t.GetType().(type) { + case *schedulerv1pb.JobTargetMetadata_Actor: + actor := t.GetActor() + s := joinStrings("actorreminder", meta.GetNamespace(), actor.GetType()) + if len(actor.GetId()) > 0 { + s = joinStrings(s, actor.GetId()) + } + return s, nil + case *schedulerv1pb.JobTargetMetadata_Job: + return joinStrings("app", meta.GetNamespace(), meta.GetAppId()), nil + default: + return "", fmt.Errorf("unknown job type: %v", t) + } +} + +func joinStrings(ss ...string) string { + return strings.Join(ss, "||") +} diff --git a/pkg/scheduler/server/config.go b/pkg/scheduler/server/config.go index 7672ed8c2a3..b6f7b8381be 100644 --- a/pkg/scheduler/server/config.go +++ b/pkg/scheduler/server/config.go @@ -15,6 +15,7 @@ package server import ( "fmt" + "math" "net" "net/url" "path/filepath" @@ -46,6 +47,7 @@ func config(opts Options) (*embed.Config, error) { config.Name = opts.EtcdID config.InitialCluster = strings.Join(opts.EtcdInitialPeers, ",") + config.MaxRequestBytes = math.MaxInt32 etcdURL, peerPort, err := peerHostAndPort(opts.EtcdID, opts.EtcdInitialPeers) if err != nil { diff --git a/pkg/scheduler/server/server.go b/pkg/scheduler/server/server.go index 47b4cfac9f9..dd95f3c9be0 100644 --- a/pkg/scheduler/server/server.go +++ b/pkg/scheduler/server/server.go @@ -17,11 +17,13 @@ import ( "context" "errors" "fmt" + "math" "net" "sync" "sync/atomic" - etcdcron "github.com/diagridio/go-etcd-cron" + "github.com/diagridio/go-etcd-cron/api" + "github.com/diagridio/go-etcd-cron/cron" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/server/v3/embed" "google.golang.org/grpc" @@ -69,7 +71,7 @@ type Server struct { sec security.Handler authz *authz.Authz config *embed.Config - cron etcdcron.Interface + cron api.Interface connectionPool *internal.Pool // Connection pool for sidecars hzAPIServer healthz.Target @@ -135,7 +137,11 @@ func (s *Server) runServer(ctx context.Context) error { log.Infof("Dapr Scheduler listening on: %s:%d", s.listenAddress, s.port) - srv := grpc.NewServer(s.sec.GRPCServerOptionMTLS()) + srv := grpc.NewServer( + s.sec.GRPCServerOptionMTLS(), + grpc.MaxSendMsgSize(math.MaxInt32), + grpc.MaxRecvMsgSize(math.MaxInt32), + ) schedulerv1pb.RegisterSchedulerServer(srv, s) s.hzAPIServer.Ready() @@ -183,14 +189,15 @@ func (s *Server) runEtcdCron(ctx context.Context) error { } client, err := clientv3.New(clientv3.Config{ - Endpoints: endpoints, + Endpoints: endpoints, + MaxCallRecvMsgSize: math.MaxInt32, }) if err != nil { return err } // pass in initial cluster endpoints, but with client ports - s.cron, err = etcdcron.New(etcdcron.Options{ + s.cron, err = cron.New(cron.Options{ Client: client, Namespace: "dapr", PartitionID: s.replicaID, diff --git a/tests/integration/framework/binary/binary.go b/tests/integration/framework/binary/binary.go index 78dd8b18b4d..1907c61175d 100644 --- a/tests/integration/framework/binary/binary.go +++ b/tests/integration/framework/binary/binary.go @@ -29,6 +29,12 @@ import ( "github.com/dapr/dapr/tests/integration/framework/iowriter" ) +type options struct { + dir string + buildDir string + tags []string +} + func BuildAll(t *testing.T) { t.Helper() @@ -38,27 +44,37 @@ func BuildAll(t *testing.T) { var wg sync.WaitGroup wg.Add(len(binaryNames)) wg.Add(len(helperBinaryNames)) - binaryBuildOpts := withTags("allcomponents", "wfbackendsqlite") for _, name := range binaryNames { if runtime.GOOS == "windows" { - Build(t, name, binaryBuildOpts) + build(t, name, options{ + dir: RootDir(t), + tags: []string{"allcomponents", "wfbackendsqlite"}, + }) wg.Done() } else { go func(name string) { defer wg.Done() - Build(t, name, binaryBuildOpts) + build(t, name, options{ + dir: RootDir(t), + tags: []string{"allcomponents", "wfbackendsqlite"}, + }) }(name) } } - helpOpts := withRootDirFunc(GetHelperRootDir) for _, name := range helperBinaryNames { if runtime.GOOS == "windows" { - Build(t, name, helpOpts, withBuildDir(name)) + build(t, name, options{ + dir: helperRootDir(t), + buildDir: name, + }) wg.Done() } else { go func(name string) { defer wg.Done() - Build(t, name, helpOpts, withBuildDir(name)) + build(t, name, options{ + dir: helperRootDir(t), + buildDir: name, + }) }(name) } } @@ -67,31 +83,28 @@ func BuildAll(t *testing.T) { require.False(t, t.Failed()) } -func GetRootDir(t *testing.T) string { +func RootDir(t *testing.T) string { t.Helper() _, tFile, _, ok := runtime.Caller(0) require.True(t, ok) return filepath.Join(filepath.Dir(tFile), "../../../..") } -func GetHelperRootDir(t *testing.T) string { +func helperRootDir(t *testing.T) string { t.Helper() _, tFile, _, ok := runtime.Caller(0) require.True(t, ok) return filepath.Join(filepath.Dir(tFile), "./helpers") } -func Build(t *testing.T, name string, bopts ...func(*buildOpts)) { - opts := buildOpts{getRootDirFunc: GetRootDir} - for _, o := range bopts { - o(&opts) - } +func build(t *testing.T, name string, opts options) { t.Helper() + + require.NotEmpty(t, opts.dir) + if _, ok := os.LookupEnv(EnvKey(name)); !ok { t.Logf("%q not set, building %q binary", EnvKey(name), name) - rootDir := opts.getRootDirFunc(t) - // Use a consistent temp dir for the binary so that the binary is cached on // subsequent runs. var tmpdir string @@ -108,26 +121,26 @@ func Build(t *testing.T, name string, bopts ...func(*buildOpts)) { ioout := iowriter.New(t, name) ioerr := iowriter.New(t, name) - t.Logf("Root dir: %q", rootDir) + t.Logf("Root dir: %q", opts.dir) t.Logf("Compiling %q binary to: %q", name, binPath) // get go build args goBuildArgs := []string{"build"} - if opts.buildDir != "" { + if len(opts.buildDir) > 0 { goBuildArgs = append(goBuildArgs, "-C", opts.buildDir) } if len(opts.tags) > 0 { goBuildArgs = append(goBuildArgs, "-tags="+strings.Join(opts.tags, ",")) } goBuildArgs = append(goBuildArgs, "-v", "-o", binPath) - if opts.buildDir != "" { + if len(opts.buildDir) > 0 { goBuildArgs = append(goBuildArgs, ".") } else { goBuildArgs = append(goBuildArgs, "./cmd/"+name) } cmd := exec.Command("go", goBuildArgs...) - cmd.Dir = rootDir + cmd.Dir = opts.dir cmd.Stdout = ioout cmd.Stderr = ioerr // Ensure CGO is disabled to avoid linking against system libraries. diff --git a/tests/integration/framework/process/grpc/scheduler/options.go b/tests/integration/framework/process/grpc/scheduler/options.go index 77820a55d9a..a86ddf38995 100644 --- a/tests/integration/framework/process/grpc/scheduler/options.go +++ b/tests/integration/framework/process/grpc/scheduler/options.go @@ -33,6 +33,7 @@ type options struct { scheduleJobFn func(context.Context, *schedulerv1pb.ScheduleJobRequest) (*schedulerv1pb.ScheduleJobResponse, error) getJobFn func(context.Context, *schedulerv1pb.GetJobRequest) (*schedulerv1pb.GetJobResponse, error) deleteJobFn func(context.Context, *schedulerv1pb.DeleteJobRequest) (*schedulerv1pb.DeleteJobResponse, error) + listJobsFn func(context.Context, *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error) watchJobsFn func(schedulerv1pb.Scheduler_WatchJobsServer) error } @@ -66,6 +67,12 @@ func WithDeleteJobFn(fn func(ctx context.Context, request *schedulerv1pb.DeleteJ } } +func WithListJobsFn(fn func(ctx context.Context, request *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error)) func(*options) { + return func(o *options) { + o.listJobsFn = fn + } +} + func WithWatchJobsFn(fn func(schedulerv1pb.Scheduler_WatchJobsServer) error) func(*options) { return func(o *options) { o.watchJobsFn = fn diff --git a/tests/integration/framework/process/grpc/scheduler/scheduler.go b/tests/integration/framework/process/grpc/scheduler/scheduler.go index 89b28b9fa21..47724f1b944 100644 --- a/tests/integration/framework/process/grpc/scheduler/scheduler.go +++ b/tests/integration/framework/process/grpc/scheduler/scheduler.go @@ -84,6 +84,7 @@ func New(t *testing.T, fopts ...Option) *Scheduler { scheduleJobFn: opts.scheduleJobFn, getJobFn: opts.getJobFn, deleteJobFn: opts.deleteJobFn, + listJobsFn: opts.listJobsFn, watchJobsFn: opts.watchJobsFn, } diff --git a/tests/integration/framework/process/grpc/scheduler/server.go b/tests/integration/framework/process/grpc/scheduler/server.go index 0030a111098..9035d89ef4d 100644 --- a/tests/integration/framework/process/grpc/scheduler/server.go +++ b/tests/integration/framework/process/grpc/scheduler/server.go @@ -23,6 +23,7 @@ type server struct { scheduleJobFn func(ctx context.Context, request *schedulerv1pb.ScheduleJobRequest) (*schedulerv1pb.ScheduleJobResponse, error) getJobFn func(context.Context, *schedulerv1pb.GetJobRequest) (*schedulerv1pb.GetJobResponse, error) deleteJobFn func(context.Context, *schedulerv1pb.DeleteJobRequest) (*schedulerv1pb.DeleteJobResponse, error) + listJobsFn func(context.Context, *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error) watchJobsFn func(schedulerv1pb.Scheduler_WatchJobsServer) error } @@ -47,6 +48,13 @@ func (s *server) DeleteJob(ctx context.Context, request *schedulerv1pb.DeleteJob return nil, nil } +func (s *server) ListJobs(ctx context.Context, request *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error) { + if s.listJobsFn != nil { + return s.listJobsFn(ctx, request) + } + return nil, nil +} + func (s *server) WatchJobs(srv schedulerv1pb.Scheduler_WatchJobsServer) error { if s.watchJobsFn != nil { return s.watchJobsFn(srv) diff --git a/tests/integration/framework/process/helm/helm.go b/tests/integration/framework/process/helm/helm.go index 9ce5ce67dc5..a80b0ce1862 100644 --- a/tests/integration/framework/process/helm/helm.go +++ b/tests/integration/framework/process/helm/helm.go @@ -57,7 +57,7 @@ func New(t *testing.T, fopts ...OptionFunc) *Helm { args = append(args, "--namespace", *opts.namespace) } - args = append(args, filepath.Join(binary.GetRootDir(t), "charts", "dapr")) + args = append(args, filepath.Join(binary.RootDir(t), "charts", "dapr")) stdoutPipeR, stdoutPipeW := io.Pipe() stderrPipeR, stderrPipeW := io.Pipe() diff --git a/tests/integration/framework/process/helm/options.go b/tests/integration/framework/process/helm/options.go index 45332f5972b..7787235339c 100644 --- a/tests/integration/framework/process/helm/options.go +++ b/tests/integration/framework/process/helm/options.go @@ -61,7 +61,7 @@ func WithShowOnlySchedulerSTS() OptionFunc { func WithShowOnlyServices(t *testing.T) OptionFunc { return func(o *options) { require.NoError(t, filepath.Walk( - filepath.Join(binary.GetRootDir(t), "charts/dapr/charts"), + filepath.Join(binary.RootDir(t), "charts/dapr/charts"), func(path string, info os.FileInfo, err error) error { if err != nil { return err @@ -71,7 +71,7 @@ func WithShowOnlyServices(t *testing.T) OptionFunc { } if strings.HasSuffix(path, "service.yaml") { - chartPath := filepath.Join(binary.GetRootDir(t), "/charts/dapr") + chartPath := filepath.Join(binary.RootDir(t), "/charts/dapr") relativePath, err := filepath.Rel(chartPath, path) if err != nil { return err diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index a2cf0bb77ac..7400b1a5d94 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -16,6 +16,7 @@ package scheduler import ( "context" "fmt" + "math" "net/http" "os" "path/filepath" @@ -30,6 +31,7 @@ import ( "github.com/spiffe/go-spiffe/v2/spiffeid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -219,19 +221,13 @@ func (s *Scheduler) DataDir() string { return s.dataDir } -func (s *Scheduler) ETCDClient(t *testing.T) *client.EtcdClient { - t.Helper() - - return client.Etcd(t, clientv3.Config{ - Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, - DialTimeout: 40 * time.Second, - }) -} - func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.SchedulerClient { //nolint:staticcheck - conn, err := grpc.DialContext(ctx, s.Address(), grpc.WithBlock(), grpc.WithReturnConnectionError(), + conn, err := grpc.DialContext(ctx, s.Address(), + grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(math.MaxInt32), grpc.MaxCallRecvMsgSize(math.MaxInt32)), + //grpc.WithBlock(), grpc.WithReturnConnectionError(), grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithMaxMsgSize(math.MaxInt32), ) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, conn.Close()) }) @@ -272,7 +268,12 @@ func (s *Scheduler) ClientMTLS(t *testing.T, ctx context.Context, appID string) id, err := spiffeid.FromSegments(sech.ControlPlaneTrustDomain(), "ns", s.namespace, "dapr-scheduler") require.NoError(t, err) - conn, err := grpc.DialContext(ctx, s.Address(), sech.GRPCDialOptionMTLS(id), grpc.WithBlock()) //nolint:staticcheck + //nolint:staticcheck + conn, err := grpc.DialContext(ctx, s.Address(), + grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt32), grpc.MaxCallSendMsgSize(math.MaxInt32)), + sech.GRPCDialOptionMTLS(id), + grpc.WithBlock(), + ) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, conn.Close()) }) @@ -335,3 +336,73 @@ func (s *Scheduler) Metrics(t *testing.T, ctx context.Context) map[string]float6 return metrics } + +func (s *Scheduler) EtcdClient(t *testing.T) *clientv3.Client { + t.Helper() + + client, err := clientv3.New(clientv3.Config{ + Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, + DialTimeout: 15 * time.Second, + }) + require.NoError(t, err) + + t.Cleanup(func() { + require.NoError(t, client.Close()) + }) + + return client +} + +func (s *Scheduler) EtcdJobs(t *testing.T, ctx context.Context) []*mvccpb.KeyValue { + t.Helper() + resp, err := s.EtcdClient(t).KV.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + return resp.Kvs +} + +func (s *Scheduler) ListJobActors(t *testing.T, ctx context.Context, namespace, appID, actorType, actorID string) *schedulerv1pb.ListJobsResponse { + t.Helper() + resp, err := s.Client(t, ctx).ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: namespace, AppId: appID, + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{ + Type: actorType, + Id: actorID, + }, + }, + }, + }, + }) + require.NoError(t, err) + return resp +} + +func (s *Scheduler) ListJobJobs(t *testing.T, ctx context.Context, namespace, appID string) *schedulerv1pb.ListJobsResponse { + t.Helper() + resp, err := s.Client(t, ctx).ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: namespace, AppId: appID, + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + return resp +} + +func (s *Scheduler) ListAllKeys(t *testing.T, ctx context.Context, prefix string) []string { + t.Helper() + + resp, err := client.Etcd(t, clientv3.Config{ + Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, + DialTimeout: 40 * time.Second, + }).ListAllKeys(ctx, prefix) + require.NoError(t, err) + + return resp +} diff --git a/tests/integration/suite/actors/reminders/scheduler/remove.go b/tests/integration/suite/actors/reminders/scheduler/remove.go index 7329edb2f81..deb80ca2939 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remove.go +++ b/tests/integration/suite/actors/reminders/scheduler/remove.go @@ -111,9 +111,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) _, err := client.InvokeActor(ctx, &runtimev1pb.InvokeActorRequest{ @@ -133,9 +131,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Len(c, keys, 1) + assert.Len(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix), 1) }, time.Second*10, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { @@ -150,8 +146,6 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) } diff --git a/tests/integration/suite/daprd/jobs/remove.go b/tests/integration/suite/daprd/jobs/remove.go index 77b431f32b6..bf827c0f4e4 100644 --- a/tests/integration/suite/daprd/jobs/remove.go +++ b/tests/integration/suite/daprd/jobs/remove.go @@ -90,9 +90,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) req := &runtimev1pb.ScheduleJobRequest{ @@ -106,9 +104,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Len(c, keys, 1) + assert.Len(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix), 1) }, time.Second*10, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { @@ -121,8 +117,6 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) } diff --git a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go index 705d199a9e5..72d6ade4cfd 100644 --- a/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go +++ b/tests/integration/suite/daprd/workflow/scheduler/deletereminder.go @@ -84,9 +84,7 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := d.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, d.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) r := task.NewTaskRegistry() @@ -124,9 +122,7 @@ func (d *deletereminder) Run(t *testing.T, ctx context.Context) { assert.Equal(t, `"Hello, Dapr!"`, metadata.SerializedOutput) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := d.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, d.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*60, time.Millisecond*10) // account for cleanup time in etcd // explicitly not checking the job/counters records since those get garbage collected after 180s } diff --git a/tests/integration/framework/binary/buildopts.go b/tests/integration/suite/scheduler/api/api.go similarity index 53% rename from tests/integration/framework/binary/buildopts.go rename to tests/integration/suite/scheduler/api/api.go index 8aabec573d9..92fcd0507db 100644 --- a/tests/integration/framework/binary/buildopts.go +++ b/tests/integration/suite/scheduler/api/api.go @@ -11,30 +11,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -package binary +package api -import "testing" - -type buildOpts struct { - getRootDirFunc func(t *testing.T) string - buildDir string - tags []string -} - -func withRootDirFunc(f func(t *testing.T) string) func(*buildOpts) { - return func(o *buildOpts) { - o.getRootDirFunc = f - } -} - -func withTags(tags ...string) func(*buildOpts) { - return func(o *buildOpts) { - o.tags = tags - } -} - -func withBuildDir(dir string) func(*buildOpts) { - return func(o *buildOpts) { - o.buildDir = dir - } -} +import ( + _ "github.com/dapr/dapr/tests/integration/suite/scheduler/api/list" +) diff --git a/tests/integration/suite/scheduler/api/jobs.go b/tests/integration/suite/scheduler/api/jobs.go index 5ff0d6851ef..e75fdbab7b4 100644 --- a/tests/integration/suite/scheduler/api/jobs.go +++ b/tests/integration/suite/scheduler/api/jobs.go @@ -16,7 +16,6 @@ package api import ( "context" "strconv" - "strings" "testing" "github.com/google/uuid" @@ -85,7 +84,7 @@ func (j *jobs) Run(t *testing.T, ctx context.Context) { _, err := client.ScheduleJob(ctx, req) require.NoError(t, err) - assert.True(t, j.etcdHasJob(t, ctx, name)) + assert.Len(t, j.scheduler.ListJobJobs(t, ctx, "namespace", "appid").GetJobs(), i) resp, err := client.GetJob(ctx, &schedulerv1.GetJobRequest{ Name: name, @@ -121,21 +120,18 @@ func (j *jobs) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - assert.False(t, j.etcdHasJob(t, ctx, name)) + resp, err := client.GetJob(ctx, &schedulerv1.GetJobRequest{ + Name: name, + Metadata: &schedulerv1.JobMetadata{ + AppId: "appid", + Namespace: "namespace", + Target: &schedulerv1.JobTargetMetadata{ + Type: new(schedulerv1.JobTargetMetadata_Job), + }, + }, + }) + require.Error(t, err) + assert.Nil(t, resp) } }) } - -func (j *jobs) etcdHasJob(t *testing.T, ctx context.Context, key string) bool { - t.Helper() - - // Get keys with prefix - keys := j.scheduler.ETCDClient(t).Get(t, ctx, "") - for _, k := range keys { - if strings.HasSuffix(k, "||"+key) { - return true - } - } - - return false -} diff --git a/tests/integration/suite/scheduler/api/list/crud.go b/tests/integration/suite/scheduler/api/list/crud.go new file mode 100644 index 00000000000..28fabc21d83 --- /dev/null +++ b/tests/integration/suite/scheduler/api/list/crud.go @@ -0,0 +1,238 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package list + +import ( + "context" + "strconv" + "testing" + "time" + + schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func init() { + suite.Register(new(crud)) +} + +type crud struct { + scheduler *scheduler.Scheduler +} + +func (c *crud) Setup(t *testing.T) []framework.Option { + c.scheduler = scheduler.New(t) + + return []framework.Option{ + framework.WithProcesses(c.scheduler), + } +} + +func (c *crud) Run(t *testing.T, ctx context.Context) { + c.scheduler.WaitUntilRunning(t, ctx) + + // TODO: @joshvanl: error codes on List API. + + jobMetadata := func(ns, id string) *schedulerv1pb.JobMetadata { + return &schedulerv1pb.JobMetadata{ + Namespace: ns, AppId: id, + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + } + } + + actorMetadata := func(ns, id, actorType, actorID string) *schedulerv1pb.JobMetadata { + return &schedulerv1pb.JobMetadata{ + Namespace: ns, AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{ + Type: actorType, Id: actorID, + }, + }, + }, + } + } + + assert.False(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetHasMore()) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs()) + assert.False(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetHasMore()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs()) + + client := c.scheduler.Client(t, ctx) + _, err := client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: jobMetadata("default", "test"), + }) + require.NoError(t, err) + + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs()) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs()) + + for i := range 10 { + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: strconv.Itoa(i), + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: jobMetadata("default", "test"), + }) + } + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs()) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs()) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: &schedulerv1.JobMetadata{ + Namespace: "not-default", + AppId: "test", + Target: &schedulerv1.JobTargetMetadata{ + Type: new(schedulerv1.JobTargetMetadata_Job), + }, + }, + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs()) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: jobMetadata("default", "not-test"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs()) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: actorMetadata("default", "test", "myactortype", "myactorid"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs()) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: actorMetadata("default", "test", "not-myactortype", "myactorid"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: actorMetadata("default", "test", "myactortype", "not-myactorid"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 2) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test2", + Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: actorMetadata("default", "test", "myactortype", "not-myactorid"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs(), 2) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) + + _, err = client.DeleteJob(ctx, &schedulerv1.DeleteJobRequest{ + Name: "test", + Metadata: jobMetadata("default", "test"), + }) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 10) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs(), 2) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) + + for i := 0; i < 6; i++ { + _, err = client.DeleteJob(ctx, &schedulerv1.DeleteJobRequest{ + Name: strconv.Itoa(i), + Metadata: jobMetadata("default", "test"), + }) + } + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 4) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs(), 1) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "not-default", "test", "myactortype", "myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "myactorid").GetJobs(), 1) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "not-myactorid").GetJobs(), 2) + assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "not-myactorid").GetJobs()) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) + assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test123", + Job: &schedulerv1.Job{DueTime: ptr.Of(time.Now().Add(time.Second * 2).Format(time.RFC3339))}, + Metadata: jobMetadata("default", "test"), + }) + require.NoError(t, err) + assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 5) + assert.EventuallyWithT(t, func(col *assert.CollectT) { + assert.Len(col, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 4) + }, time.Second*10, time.Millisecond*10) +} diff --git a/tests/integration/suite/scheduler/api/list/data.go b/tests/integration/suite/scheduler/api/list/data.go new file mode 100644 index 00000000000..fad34b87e31 --- /dev/null +++ b/tests/integration/suite/scheduler/api/list/data.go @@ -0,0 +1,145 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package list + +import ( + "context" + "testing" + + schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +func init() { + suite.Register(new(data)) +} + +type data struct { + scheduler *scheduler.Scheduler +} + +func (d *data) Setup(t *testing.T) []framework.Option { + d.scheduler = scheduler.New(t) + + return []framework.Option{ + framework.WithProcesses(d.scheduler), + } +} + +func (d *data) Run(t *testing.T, ctx context.Context) { + d.scheduler.WaitUntilRunning(t, ctx) + client := d.scheduler.Client(t, ctx) + + data1, err := anypb.New(wrapperspb.String("hello world")) + require.NoError(t, err) + data2, err := anypb.New(wrapperspb.String("hello world 2")) + require.NoError(t, err) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test1", + Job: &schedulerv1.Job{ + Repeats: ptr.Of(uint32(10)), + Schedule: ptr.Of("@every 20s"), + DueTime: ptr.Of("100s"), + Ttl: ptr.Of("200s"), + Data: data1, + }, + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test2", + Job: &schedulerv1.Job{ + Repeats: ptr.Of(uint32(20)), + Schedule: ptr.Of("@every 40s"), + DueTime: ptr.Of("200s"), + Ttl: ptr.Of("300s"), + Data: data2, + }, + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{ + Type: "mytype", Id: "myid", + }, + }, + }, + }, + }) + require.NoError(t, err) + + resp, err := client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.Jobs, 1) + assert.False(t, resp.GetHasMore()) + namedJob := resp.Jobs[0] + assert.Equal(t, "test1", namedJob.GetName()) + job := namedJob.GetJob() + assert.Equal(t, uint32(10), job.GetRepeats()) + assert.Equal(t, "@every 20s", job.GetSchedule()) + assert.Equal(t, "100s", job.GetDueTime()) + assert.Equal(t, "200s", job.GetTtl()) + assert.True(t, proto.Equal(data1, job.GetData())) + + resp, err = client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{ + Type: "mytype", Id: "myid", + }, + }, + }, + }, + }) + require.NoError(t, err) + require.Len(t, resp.Jobs, 1) + assert.False(t, resp.GetHasMore()) + namedJob = resp.Jobs[0] + assert.Equal(t, "test2", namedJob.GetName()) + job = namedJob.GetJob() + assert.Equal(t, uint32(20), job.GetRepeats()) + assert.Equal(t, "@every 40s", job.GetSchedule()) + assert.Equal(t, "200s", job.GetDueTime()) + assert.Equal(t, "300s", job.GetTtl()) + assert.True(t, proto.Equal(data2, job.GetData())) +} diff --git a/tests/integration/suite/scheduler/api/list/size.go b/tests/integration/suite/scheduler/api/list/size.go new file mode 100644 index 00000000000..e7e3266978a --- /dev/null +++ b/tests/integration/suite/scheduler/api/list/size.go @@ -0,0 +1,87 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package list + +import ( + "bytes" + "context" + "strconv" + "testing" + + schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +func init() { + suite.Register(new(size)) +} + +type size struct { + scheduler *scheduler.Scheduler +} + +func (s *size) Setup(t *testing.T) []framework.Option { + s.scheduler = scheduler.New(t) + + return []framework.Option{ + framework.WithProcesses(s.scheduler), + } +} + +func (s *size) Run(t *testing.T, ctx context.Context) { + s.scheduler.WaitUntilRunning(t, ctx) + client := s.scheduler.Client(t, ctx) + + data, err := anypb.New(wrapperspb.Bytes(bytes.Repeat([]byte{0x01}, 2e+6))) + require.NoError(t, err) + for i := range 100 { + _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + Name: "test-" + strconv.Itoa(i), + Job: &schedulerv1.Job{ + DueTime: ptr.Of("1000s"), + Data: data, + }, + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + } + + resp, err := client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "default", AppId: "test", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + assert.Len(t, resp.GetJobs(), 100) +} diff --git a/tests/integration/suite/scheduler/api/remove.go b/tests/integration/suite/scheduler/api/remove.go index f1eb0ec7b0f..9636bbf4f9d 100644 --- a/tests/integration/suite/scheduler/api/remove.go +++ b/tests/integration/suite/scheduler/api/remove.go @@ -100,9 +100,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Len(c, keys, 1) + assert.Len(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix), 1) }, time.Second*10, 10*time.Millisecond) job, err := watch.Recv() @@ -116,9 +114,7 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { })) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Len(c, keys, 1) + assert.Len(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix), 1) }, time.Second*10, 10*time.Millisecond) _, err = client.DeleteJob(ctx, &schedulerv1.DeleteJobRequest{ @@ -134,8 +130,6 @@ func (r *remove) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := r.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, r.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) } diff --git a/tests/integration/suite/scheduler/authz/mtls.go b/tests/integration/suite/scheduler/authz/mtls.go index 7c2b4bc858c..97d58169a10 100644 --- a/tests/integration/suite/scheduler/authz/mtls.go +++ b/tests/integration/suite/scheduler/authz/mtls.go @@ -165,6 +165,32 @@ func (m *mtls) Run(t *testing.T, ctx context.Context) { return err }, }, + "ListJobs": { + funcGoodAppID: func() error { + _, err := client.ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + AppId: "foo", + Namespace: "default", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{Job: new(schedulerv1pb.TargetJob)}, + }, + }, + }) + return err + }, + funcBadAppID: func() error { + _, err := client.ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ + Metadata: &schedulerv1pb.JobMetadata{ + AppId: "not-foo", + Namespace: "default", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{Job: new(schedulerv1pb.TargetJob)}, + }, + }, + }) + return err + }, + }, "WatchJobs": { funcGoodAppID: func() error { return nil diff --git a/tests/integration/suite/scheduler/metrics/actors.go b/tests/integration/suite/scheduler/metrics/actors.go index aeae2b27240..c49d5d312bd 100644 --- a/tests/integration/suite/scheduler/metrics/actors.go +++ b/tests/integration/suite/scheduler/metrics/actors.go @@ -89,9 +89,7 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { etcdKeysPrefix := "dapr/jobs" assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Empty(c, keys) + assert.Empty(c, a.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix)) }, time.Second*10, 10*time.Millisecond) metrics := a.scheduler.Metrics(t, ctx) @@ -112,9 +110,7 @@ func (a *actors) Run(t *testing.T, ctx context.Context) { }, time.Second*4, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { - keys, rerr := a.scheduler.ETCDClient(t).ListAllKeys(ctx, etcdKeysPrefix) - require.NoError(c, rerr) - assert.Len(c, keys, 1) + assert.Len(c, a.scheduler.ListAllKeys(t, ctx, etcdKeysPrefix), 1) }, time.Second*10, 10*time.Millisecond) assert.EventuallyWithT(t, func(c *assert.CollectT) { From 645809d012915c22899671cb7c7f9fd455dee756 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Thu, 3 Oct 2024 18:22:53 +0100 Subject: [PATCH 094/112] Linting Signed-off-by: joshvanl --- dapr/proto/scheduler/v1/scheduler.proto | 3 - go.mod | 132 ++++----- go.sum | 279 +++++++++--------- pkg/proto/scheduler/v1/scheduler.pb.go | 82 +++-- pkg/scheduler/server/api.go | 7 +- tests/apps/resiliencyapp/go.mod | 12 +- tests/apps/resiliencyapp/go.sum | 28 +- tests/apps/resiliencyapp_grpc/go.mod | 12 +- tests/apps/resiliencyapp_grpc/go.sum | 28 +- .../go.mod | 12 +- .../go.sum | 28 +- tests/integration/framework/binary/binary.go | 15 +- .../framework/process/scheduler/scheduler.go | 5 +- .../suite/scheduler/api/list/crud.go | 65 ++-- .../suite/scheduler/api/list/data.go | 34 +-- .../suite/scheduler/api/list/size.go | 16 +- 16 files changed, 381 insertions(+), 377 deletions(-) diff --git a/dapr/proto/scheduler/v1/scheduler.proto b/dapr/proto/scheduler/v1/scheduler.proto index a6db1d04f82..515315589d3 100644 --- a/dapr/proto/scheduler/v1/scheduler.proto +++ b/dapr/proto/scheduler/v1/scheduler.proto @@ -179,7 +179,4 @@ message ListJobsRequest { message ListJobsResponse { // The list of jobs. repeated NamedJob jobs = 1; - - // Whether there are more jobs to list. - bool has_more = 2; } diff --git a/go.mod b/go.mod index ee1268208a9..49c56698c43 100644 --- a/go.mod +++ b/go.mod @@ -13,19 +13,19 @@ require ( github.com/cloudevents/sdk-go/v2 v2.15.2 github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 - github.com/diagridio/go-etcd-cron v0.3.1-0.20241001200855-29030985eae8 + github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61 github.com/evanphx/json-patch/v5 v5.9.0 github.com/go-chi/chi/v5 v5.0.11 github.com/go-chi/cors v1.2.1 github.com/go-logr/logr v1.4.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 - github.com/google/cel-go v0.18.2 + github.com/google/cel-go v0.20.1 github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 - github.com/gorilla/websocket v1.5.1 + github.com/gorilla/websocket v1.5.3 github.com/grafana/k6-operator v0.0.8 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/hashicorp/go-hclog v1.5.0 @@ -40,9 +40,9 @@ require ( github.com/microsoft/durabletask-go v0.5.0 github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 - github.com/prometheus/client_golang v1.20.2 + github.com/prometheus/client_golang v1.20.4 github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.55.0 + github.com/prometheus/common v0.59.1 github.com/redis/go-redis/v9 v9.2.1 github.com/sony/gobreaker v0.5.0 github.com/spf13/cast v1.6.0 @@ -50,55 +50,53 @@ require ( github.com/spiffe/go-spiffe/v2 v2.1.7 github.com/stretchr/testify v1.9.0 github.com/valyala/fasthttp v1.51.0 - go.etcd.io/etcd/api/v3 v3.5.14 - go.etcd.io/etcd/client/v3 v3.5.14 - go.etcd.io/etcd/server/v3 v3.5.13 + go.etcd.io/etcd/api/v3 v3.5.16 + go.etcd.io/etcd/client/v3 v3.5.16 + go.etcd.io/etcd/server/v3 v3.5.16 go.mongodb.org/mongo-driver v1.14.0 go.opencensus.io v0.24.0 - go.opentelemetry.io/otel v1.28.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 + go.opentelemetry.io/otel v1.30.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 go.opentelemetry.io/otel/exporters/zipkin v1.26.0 - go.opentelemetry.io/otel/sdk v1.28.0 - go.opentelemetry.io/otel/trace v1.28.0 + go.opentelemetry.io/otel/sdk v1.30.0 + go.opentelemetry.io/otel/trace v1.30.0 go.uber.org/automaxprocs v1.5.3 go.uber.org/ratelimit v0.3.0 - golang.org/x/crypto v0.26.0 - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 - golang.org/x/net v0.28.0 + golang.org/x/crypto v0.27.0 + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 + golang.org/x/net v0.29.0 golang.org/x/sync v0.8.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 - google.golang.org/grpc v1.66.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 + google.golang.org/grpc v1.67.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.30.2 - k8s.io/apiextensions-apiserver v0.30.2 - k8s.io/apimachinery v0.30.2 + k8s.io/api v0.31.0 + k8s.io/apiextensions-apiserver v0.31.0 + k8s.io/apimachinery v0.31.1 k8s.io/cli-runtime v0.30.2 - k8s.io/client-go v0.30.2 - k8s.io/code-generator v0.30.2 + k8s.io/client-go v0.31.0 + k8s.io/code-generator v0.31.0 k8s.io/klog v1.0.0 k8s.io/metrics v0.30.2 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 modernc.org/sqlite v1.30.1 - sigs.k8s.io/controller-runtime v0.18.4 + sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/yaml v1.4.0 ) -require github.com/microsoft/go-mssqldb v1.6.0 // indirect - require ( - cloud.google.com/go v0.113.0 // indirect - cloud.google.com/go/auth v0.4.1 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/datastore v1.15.0 // indirect - cloud.google.com/go/iam v1.1.7 // indirect - cloud.google.com/go/pubsub v1.37.0 // indirect - cloud.google.com/go/secretmanager v1.12.0 // indirect - cloud.google.com/go/storage v1.40.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.9.3 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/datastore v1.19.0 // indirect + cloud.google.com/go/iam v1.2.1 // indirect + cloud.google.com/go/pubsub v1.43.0 // indirect + cloud.google.com/go/secretmanager v1.14.1 // indirect + cloud.google.com/go/storage v1.43.0 // indirect dubbo.apache.org/dubbo-go/v3 v3.0.3-0.20230118042253-4f159a2b38f3 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -222,6 +220,7 @@ require ( github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-kit/kit v0.10.0 // indirect @@ -255,19 +254,19 @@ require ( github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.4 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.3 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/grandcat/zeroconf v1.0.0 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/hamba/avro/v2 v2.20.1 // indirect @@ -300,11 +299,11 @@ require ( github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jinzhu/copier v0.3.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/k0kubun/pp v3.0.1+incompatible // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.10 // indirect github.com/knadh/koanf v1.4.1 // indirect github.com/kubemq-io/kubemq-go v1.7.9 // indirect github.com/kubemq-io/protobuf v1.3.1 // indirect @@ -327,11 +326,12 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect + github.com/microsoft/go-mssqldb v1.6.0 // indirect github.com/miekg/dns v1.1.57 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -402,49 +402,51 @@ require ( github.com/tmc/langchaingo v0.1.12 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/vmware/vmware-go-kcl v1.5.1 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect + github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect github.com/xlab/treeprint v1.2.0 // indirect github.com/yashtewari/glob-intersection v0.2.0 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect github.com/yuin/gopher-lua v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zeebo/errs v1.3.0 // indirect - go.etcd.io/bbolt v1.3.9 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect - go.etcd.io/etcd/client/v2 v2.305.13 // indirect - go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect - go.etcd.io/etcd/raft/v3 v3.5.13 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.etcd.io/bbolt v1.3.11 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect + go.etcd.io/etcd/client/v2 v2.305.16 // indirect + go.etcd.io/etcd/pkg/v3 v3.5.16 // indirect + go.etcd.io/etcd/raft/v3 v3.5.16 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/arch v0.10.0 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/tools v0.25.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.180.0 // indirect - google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect + google.golang.org/api v0.196.0 // indirect + google.golang.org/genproto v0.0.0-20240924160255-9d4c2d233b61 // indirect google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/couchbase/gocb.v1 v1.6.7 // indirect gopkg.in/couchbase/gocbcore.v7 v7.1.18 // indirect gopkg.in/couchbaselabs/gocbconnstr.v1 v1.0.4 // indirect gopkg.in/couchbaselabs/jsonx.v1 v1.0.1 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect gopkg.in/fatih/pool.v2 v2.0.0 // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect @@ -454,7 +456,7 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect - k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect modernc.org/libc v1.53.4 // indirect @@ -498,5 +500,3 @@ replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 // // Then, run `make modtidy-all` in this repository. // This ensures that go.mod and go.sum are up-to-date for each go.mod file. - -replace github.com/diagridio/go-etcd-cron => github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517 diff --git a/go.sum b/go.sum index 90fa51fc562..1ec103a7893 100644 --- a/go.sum +++ b/go.sum @@ -13,44 +13,46 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.113.0 h1:g3C70mn3lWfckKBiCVsAshabrDg01pQ0pnX1MNtnMkA= -cloud.google.com/go v0.113.0/go.mod h1:glEqlogERKYeePz6ZdkcLJ28Q2I6aERgDDErBg9GzO8= -cloud.google.com/go/auth v0.4.1 h1:Z7YNIhlWRtrnKlZke7z3GMqzvuYzdc2z98F9D1NV5Hg= -cloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= +cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= +cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= -cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastore v1.19.0 h1:p5H3bUQltOa26GcMRAxPoNwoqGkq5v8ftx9/ZBB35MI= +cloud.google.com/go/datastore v1.19.0/go.mod h1:KGzkszuj87VT8tJe67GuB+qLolfsOt6bZq/KFuWaahc= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= -cloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA= -cloud.google.com/go/kms v1.15.8 h1:szIeDCowID8th2i8XE4uRev5PMxQFqW+JjwYxL9h6xs= -cloud.google.com/go/kms v1.15.8/go.mod h1:WoUHcDjD9pluCg7pNds131awnH429QGvRM3N/4MyoVs= +cloud.google.com/go/iam v1.2.1 h1:QFct02HRb7H12J/3utj0qf5tobFh9V4vR6h9eX5EBRU= +cloud.google.com/go/iam v1.2.1/go.mod h1:3VUIJDPpwT6p/amXRC5GY8fCCh70lxPygguVtI0Z4/g= +cloud.google.com/go/kms v1.20.0 h1:uKUvjGqbBlI96xGE669hcVnEMw1Px/Mvfa62dhM5UrY= +cloud.google.com/go/kms v1.20.0/go.mod h1:/dMbFF1tLLFnQV44AoI2GlotbjowyUfgVwezxW291fM= +cloud.google.com/go/longrunning v0.6.1 h1:lOLTFxYpr8hcRtcwWir5ITh1PAKUD/sG2lKrTSYjyMc= +cloud.google.com/go/longrunning v0.6.1/go.mod h1:nHISoOZpBcmlwbJmiVk5oDRz0qG/ZxPynEGs1iZ79s0= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= -cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= -cloud.google.com/go/secretmanager v1.12.0 h1:e5pIo/QEgiFiHPVJPxM5jbtUr4O/u5h2zLHYtkFQr24= -cloud.google.com/go/secretmanager v1.12.0/go.mod h1:Y1Gne3Ag+fZ2TDTiJc8ZJCMFbi7k1rYT4Rw30GXfvlk= +cloud.google.com/go/pubsub v1.43.0 h1:s3Qx+F96J7Kwey/uVHdK3QxFLIlOvvw4SfMYw2jFjb4= +cloud.google.com/go/pubsub v1.43.0/go.mod h1:LNLfqItblovg7mHWgU5g84Vhza4J8kTxx0YqIeTzcXY= +cloud.google.com/go/secretmanager v1.14.1 h1:xlWSIg8rtBn5qCr2f3XtQP19+5COyf/ll49SEvi/0vM= +cloud.google.com/go/secretmanager v1.14.1/go.mod h1:L+gO+u2JA9CCyXpSR8gDH0o8EV7i/f0jdBOrUXcIV0U= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw= -cloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= @@ -480,6 +482,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61 h1:RX6UnVtsJO1nBGgjQqCpnc86VolsMcuTQi2+5QEyknE= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61/go.mod h1:SiUsFA1yV6cgCYsK/A1FCfHWWqyea3+RMHAOUPb+JAY= github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog= github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= @@ -569,6 +573,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= @@ -667,7 +673,8 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= @@ -707,8 +714,8 @@ github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EO github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -760,10 +767,10 @@ github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b/go.mod h1:Z4GIJBJO3Wa4gD4vbwQxXXZ+WHmW6E9ixmNrwvs0iZs= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= -github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -805,11 +812,11 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20220608213341-c488b8fa1db3/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -818,12 +825,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.3 h1:QRje2j5GZimBzlbhGA2V2QlGNgL8G6e+wGo/+/2bWI0= +github.com/googleapis/enterprise-certificate-proxy v0.3.3/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= -github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= @@ -842,8 +849,8 @@ github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/k6-operator v0.0.8 h1:T3i6eYY10jgXDirgYiuKT29x4/8Y44kf7QBTX3l90MI= github.com/grafana/k6-operator v0.0.8/go.mod h1:5HKB/+2FEQY1w9JgnkJM8JVmh/jQcILIeOZe11eYmRU= github.com/grandcat/zeroconf v1.0.0 h1:uHhahLBKqwWBV6WZUDAT71044vwOTL+McW0mBJvo6kE= @@ -862,8 +869,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= 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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1030,12 +1037,11 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517 h1:mjNpTqZ/zGwVi0229tc8AyrAEK4ntO0tFgO6Z3FPypI= -github.com/joshvanl/go-etcd-cron v0.0.0-20240926235224-7f01c6835517/go.mod h1:CpWXkgaS4uf6XsxztKpO/n0lF6NA0S9TN657MLNTDbY= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -1069,8 +1075,8 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= +github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= @@ -1213,8 +1219,8 @@ github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1 github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1297,8 +1303,8 @@ github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1L github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk= github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= -github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= -github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1314,8 +1320,8 @@ github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdM github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= -github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= -github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/open-policy-agent/opa v0.68.0 h1:Jl3U2vXRjwk7JrHmS19U3HZO5qxQRinQbJ2eCJYSqJQ= github.com/open-policy-agent/opa v0.68.0/go.mod h1:5E5SvaPwTpwt2WM177I9Z3eT7qUpmOGjk1ZdHs+TZ4w= @@ -1402,8 +1408,8 @@ github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= -github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1426,8 +1432,8 @@ github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= +github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1645,6 +1651,8 @@ github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdI github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vmware/vmware-go-kcl v1.5.1 h1:1rJLfAX4sDnCyatNoD/WJzVafkwST6u/cgY/Uf2VgHk= github.com/vmware/vmware-go-kcl v1.5.1/go.mod h1:kXJmQ6h0dRMRrp1uWU9XbIXvwelDpTxSPquvQUBdpbo= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= @@ -1658,8 +1666,9 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= @@ -1690,37 +1699,37 @@ github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= github.com/zeebo/errs v1.3.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ= github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc= -go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= -go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.einride.tech/aip v0.68.0 h1:4seM66oLzTpz50u4K1zlJyOXQ3tCzcJN7I22tKkjipw= +go.einride.tech/aip v0.68.0/go.mod h1:7y9FF8VtPWqpxuAxl0KQWqaULxW4zFIesD6zF5RIHHg= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= -go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= +go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= -go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0= +go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= -go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q= +go.etcd.io/etcd/client/pkg/v3 v3.5.16/go.mod h1:V8acl8pcEK0Y2g19YlOV9m9ssUe6MgiDSobSoaBAM0E= go.etcd.io/etcd/client/v2 v2.305.0-alpha.0/go.mod h1:kdV+xzCJ3luEBSIeQyB/OEKkWKd8Zkux4sbDeANrosU= -go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= -go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= +go.etcd.io/etcd/client/v2 v2.305.16 h1:kQrn9o5czVNaukf2A2At43cE9ZtWauOtf9vRZuiKXow= +go.etcd.io/etcd/client/v2 v2.305.16/go.mod h1:h9YxWCzcdvZENbfzBTFCnoNumr2ax3F19sKMqHFmXHE= go.etcd.io/etcd/client/v3 v3.5.0-alpha.0/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= -go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= -go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= +go.etcd.io/etcd/client/v3 v3.5.16 h1:sSmVYOAHeC9doqi0gv7v86oY/BTld0SEFGaxsU9eRhE= +go.etcd.io/etcd/client/v3 v3.5.16/go.mod h1:X+rExSGkyqxvu276cr2OwPLBaeqFu1cIl4vmRjAD/50= go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0/go.mod h1:tV31atvwzcybuqejDoY3oaNRTtlD2l/Ot78Pc9w7DMY= -go.etcd.io/etcd/pkg/v3 v3.5.13 h1:st9bDWNsKkBNpP4PR1MvM/9NqUPfvYZx/YXegsYEH8M= -go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= +go.etcd.io/etcd/pkg/v3 v3.5.16 h1:cnavs5WSPWeK4TYwPYfmcr3Joz9BH+TZ6qoUtz6/+mc= +go.etcd.io/etcd/pkg/v3 v3.5.16/go.mod h1:+lutCZHG5MBBFI/U4eYT5yL7sJfnexsoM20Y0t2uNuY= go.etcd.io/etcd/raft/v3 v3.5.0-alpha.0/go.mod h1:FAwse6Zlm5v4tEWZaTjmNhe17Int4Oxbu7+2r0DiD3w= -go.etcd.io/etcd/raft/v3 v3.5.13 h1:7r/NKAOups1YnKcfro2RvGGo2PTuizF/xh26Z2CTAzA= -go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= +go.etcd.io/etcd/raft/v3 v3.5.16 h1:zBXA3ZUpYs1AwiLGPafYAKKl/CORn/uaxYDwlNwndAk= +go.etcd.io/etcd/raft/v3 v3.5.16/go.mod h1:P4UP14AxofMJ/54boWilabqqWoW9eLodl6I5GdGzazI= go.etcd.io/etcd/server/v3 v3.5.0-alpha.0/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIyCb1u4wjzMg90BQ= -go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= -go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= +go.etcd.io/etcd/server/v3 v3.5.16 h1:d0/SAdJ3vVsZvF8IFVb1k8zqMZ+heGcNfft71ul9GWE= +go.etcd.io/etcd/server/v3 v3.5.16/go.mod h1:ynhyZZpdDp1Gq49jkUg5mfkDWZwXnn3eIqCqtJnrD/s= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= @@ -1734,28 +1743,28 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 h1:hCq2hNMwsegUvPzI7sPOvtO9cqyy5GbWt/Ybp2xrx8Q= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0/go.mod h1:LqaApwGx/oUmzsbqxkzuBvyoPpkxk3JQWnqfVrJ3wCA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0 h1:1wp/gyxsuYtuE/JFxsQRtcCDtMrO2qMvlfXALU5wkzI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.26.0/go.mod h1:gbTHmghkGgqxMomVQQMur1Nba4M0MQ8AYThXDUjsJ38= go.opentelemetry.io/otel/exporters/zipkin v1.26.0 h1:sBk6A62GgcQRwcxcBwRMPkqeuSizcpHkXyZNyP281Fw= go.opentelemetry.io/otel/exporters/zipkin v1.26.0/go.mod h1:fLzYtPUxPFzu7rSqhYsCxYheT2dNoPjtKovCLzLm07w= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= @@ -1827,8 +1836,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1844,8 +1853,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1887,8 +1896,8 @@ golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1959,8 +1968,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1969,8 +1978,8 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2103,8 +2112,8 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2116,8 +2125,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2135,8 +2144,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2220,15 +2229,13 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -2256,8 +2263,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.180.0 h1:M2D87Yo0rGBPWpo1orwfCLehUUL6E7/TYe5gvMQWDh4= -google.golang.org/api v0.180.0/go.mod h1:51AiyoEg1MJPSZ9zvklA8VnRILPXxn1iVen9v25XHAE= +google.golang.org/api v0.196.0 h1:k/RafYqebaIJBO3+SMnfEGtFVlvp5vSgqTUF54UN/zg= +google.golang.org/api v0.196.0/go.mod h1:g9IL21uGkYgvQ5BZg6BAtoGJQIm8r6EgaAbpNey5wBE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2304,12 +2311,12 @@ google.golang.org/genproto v0.0.0-20210106152847-07624b53cd92/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= -google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20240924160255-9d4c2d233b61 h1:KipVMxePgXPFBzXOvpKbny3RVdVmJOD64R/Ob7GPWEs= +google.golang.org/genproto v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:HiAZQz/G7n0EywFjmncAwsfnmFm2bjm7qPjwl8hyzjM= +google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 h1:pAjq8XSSzXoP9ya73v/w+9QEAAJNluLrpmMq5qFJQNY= +google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:O6rP0uBq4k0mdi/b4ZEMAZjkhYWhS815kCvaMha4VN8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2341,8 +2348,8 @@ google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzI google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2384,6 +2391,8 @@ gopkg.in/couchbaselabs/gojcbmock.v1 v1.0.4/go.mod h1:jl/gd/aQ2S8whKVSTnsPs6n7BPe gopkg.in/couchbaselabs/jsonx.v1 v1.0.1 h1:giDAdTGcyXUuY+uFCWeJ2foukiqMTYl4ORSxCi/ybcc= gopkg.in/couchbaselabs/jsonx.v1 v1.0.1/go.mod h1:oR201IRovxvLW/eISevH12/+MiKHtNQAKfcX8iWZvJY= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/evanphx/json-patch.v5 v5.6.0 h1:BMT6KIwBD9CaU91PJCZIe46bDmBWa9ynTQgJIOpfQBk= gopkg.in/evanphx/json-patch.v5 v5.6.0/go.mod h1:/kvTRh1TVm5wuM6OkHxqXtE/1nUZZpihg29RtuIyfvk= gopkg.in/fatih/pool.v2 v2.0.0 h1:xIFeWtxifuQJGk/IEPKsTduEKcKvPmhoiVDGpC40nKg= @@ -2437,30 +2446,30 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= -k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= -k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= -k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= -k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/cli-runtime v0.30.2 h1:ooM40eEJusbgHNEqnHziN9ZpLN5U4WcQGsdLKVxpkKE= k8s.io/cli-runtime v0.30.2/go.mod h1:Y4g/2XezFyTATQUbvV5WaChoUGhojv/jZAtdp5Zkm0A= -k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= -k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= -k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw= -k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= +k8s.io/code-generator v0.31.0 h1:w607nrMi1KeDKB3/F/J4lIoOgAwc+gV9ZKew4XRfMp8= +k8s.io/code-generator v0.31.0/go.mod h1:84y4w3es8rOJOUUP1rLsIiGlO1JuEaPFXQPA9e/K6U0= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/metrics v0.30.2 h1:zj4kIPTCfEbY0RHEogpA7QtlItU7xaO11+Gz1zVDxlc= k8s.io/metrics v0.30.2/go.mod h1:GpoO5XTy/g8CclVLtgA5WTrr2Cy5vCsqr5Xa/0ETWIk= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/cc/v4 v4.21.3 h1:2mhBdWKtivdFlLR1ecKXTljPG1mfvbByX7QKztAIJl8= modernc.org/cc/v4 v4.21.3/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= modernc.org/ccgo/v4 v4.18.2 h1:PUQPShG4HwghpOekNujL0sFavdkRvmxzTbI4rGJ5mg0= @@ -2494,8 +2503,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= -sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.15.0 h1:6Ca88kEOBVotHDw+y2IsIMYtg9Pvv7MKpW9JMyF/OH4= diff --git a/pkg/proto/scheduler/v1/scheduler.pb.go b/pkg/proto/scheduler/v1/scheduler.pb.go index 1cebb8caee8..dcc823268b4 100644 --- a/pkg/proto/scheduler/v1/scheduler.pb.go +++ b/pkg/proto/scheduler/v1/scheduler.pb.go @@ -1054,8 +1054,6 @@ type ListJobsResponse struct { // The list of jobs. Jobs []*NamedJob `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` - // Whether there are more jobs to list. - HasMore bool `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` } func (x *ListJobsResponse) Reset() { @@ -1097,13 +1095,6 @@ func (x *ListJobsResponse) GetJobs() []*NamedJob { return nil } -func (x *ListJobsResponse) GetHasMore() bool { - if x != nil { - return x.HasMore - } - return false -} - var File_dapr_proto_scheduler_v1_scheduler_proto protoreflect.FileDescriptor var file_dapr_proto_scheduler_v1_scheduler_proto_rawDesc = []byte{ @@ -1221,50 +1212,49 @@ var file_dapr_proto_scheduler_v1_scheduler_proto_rawDesc = []byte{ 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x64, 0x0a, 0x10, 0x4c, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4a, 0x6f, 0x62, - 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, - 0x65, 0x32, 0x87, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, - 0x6a, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x2b, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x61, - 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x06, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x32, 0x87, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x4a, 0x6f, 0x62, 0x12, 0x2b, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5b, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, + 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, - 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x61, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x09, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, + 0x12, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x64, - 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, + 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x61, 0x70, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x61, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, + 0x61, 0x70, 0x72, 0x2f, 0x64, 0x61, 0x70, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index f255c0cfcea..857a27195ea 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -151,8 +151,8 @@ func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsReques return nil, fmt.Errorf("failed to query job list: %w", err) } - var jobs []*schedulerv1pb.NamedJob - for _, job := range list.Jobs { + jobs := make([]*schedulerv1pb.NamedJob, 0, len(list.GetJobs())) + for _, job := range list.GetJobs() { jobs = append(jobs, &schedulerv1pb.NamedJob{ Name: job.GetName()[strings.LastIndex(job.GetName(), "||")+2:], //nolint:protogetter @@ -167,8 +167,7 @@ func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsReques } return &schedulerv1pb.ListJobsResponse{ - Jobs: jobs, - HasMore: list.More, + Jobs: jobs, }, nil } diff --git a/tests/apps/resiliencyapp/go.mod b/tests/apps/resiliencyapp/go.mod index d12034d7f85..0f85b3522c6 100644 --- a/tests/apps/resiliencyapp/go.mod +++ b/tests/apps/resiliencyapp/go.mod @@ -5,18 +5,18 @@ go 1.23.1 require ( github.com/dapr/dapr v0.0.0 github.com/gorilla/mux v1.8.1 - google.golang.org/grpc v1.66.0 + google.golang.org/grpc v1.67.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 google.golang.org/protobuf v1.34.2 ) require ( github.com/google/uuid v1.6.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect ) replace github.com/dapr/dapr => ../../../ diff --git a/tests/apps/resiliencyapp/go.sum b/tests/apps/resiliencyapp/go.sum index ae82a09de08..5fb24b68ddb 100644 --- a/tests/apps/resiliencyapp/go.sum +++ b/tests/apps/resiliencyapp/go.sum @@ -10,20 +10,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/tests/apps/resiliencyapp_grpc/go.mod b/tests/apps/resiliencyapp_grpc/go.mod index 1620eea6a83..4fdd608edaf 100644 --- a/tests/apps/resiliencyapp_grpc/go.mod +++ b/tests/apps/resiliencyapp_grpc/go.mod @@ -4,17 +4,17 @@ go 1.23.1 require ( github.com/dapr/dapr v1.7.4 - google.golang.org/grpc v1.66.0 + google.golang.org/grpc v1.67.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 google.golang.org/protobuf v1.34.2 ) require ( - go.opentelemetry.io/otel v1.28.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect ) replace github.com/dapr/dapr => ../../../ diff --git a/tests/apps/resiliencyapp_grpc/go.sum b/tests/apps/resiliencyapp_grpc/go.sum index 6654904a5dc..f0ca09abf83 100644 --- a/tests/apps/resiliencyapp_grpc/go.sum +++ b/tests/apps/resiliencyapp_grpc/go.sum @@ -6,20 +6,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/tests/apps/service_invocation_grpc_proxy_client/go.mod b/tests/apps/service_invocation_grpc_proxy_client/go.mod index 00cd2235807..b5ec86b94c9 100644 --- a/tests/apps/service_invocation_grpc_proxy_client/go.mod +++ b/tests/apps/service_invocation_grpc_proxy_client/go.mod @@ -5,17 +5,17 @@ go 1.23.1 require ( github.com/dapr/dapr v0.0.0-00010101000000-000000000000 github.com/gorilla/mux v1.8.1 - google.golang.org/grpc v1.66.0 + google.golang.org/grpc v1.67.0 google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 ) require ( github.com/google/uuid v1.6.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/tests/apps/service_invocation_grpc_proxy_client/go.sum b/tests/apps/service_invocation_grpc_proxy_client/go.sum index ae82a09de08..5fb24b68ddb 100644 --- a/tests/apps/service_invocation_grpc_proxy_client/go.sum +++ b/tests/apps/service_invocation_grpc_proxy_client/go.sum @@ -10,20 +10,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 h1:N9BgCIAUvn/M+p4NJccWPWb3BWh88+zyL0ll9HgbEeM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/tests/integration/framework/binary/binary.go b/tests/integration/framework/binary/binary.go index 1907c61175d..ef70e445857 100644 --- a/tests/integration/framework/binary/binary.go +++ b/tests/integration/framework/binary/binary.go @@ -44,10 +44,11 @@ func BuildAll(t *testing.T) { var wg sync.WaitGroup wg.Add(len(binaryNames)) wg.Add(len(helperBinaryNames)) + rootDir := RootDir(t) for _, name := range binaryNames { if runtime.GOOS == "windows" { build(t, name, options{ - dir: RootDir(t), + dir: rootDir, tags: []string{"allcomponents", "wfbackendsqlite"}, }) wg.Done() @@ -55,16 +56,18 @@ func BuildAll(t *testing.T) { go func(name string) { defer wg.Done() build(t, name, options{ - dir: RootDir(t), + dir: rootDir, tags: []string{"allcomponents", "wfbackendsqlite"}, }) }(name) } } + + helperRootDir := helperRootDir(t) for _, name := range helperBinaryNames { if runtime.GOOS == "windows" { build(t, name, options{ - dir: helperRootDir(t), + dir: helperRootDir, buildDir: name, }) wg.Done() @@ -72,7 +75,7 @@ func BuildAll(t *testing.T) { go func(name string) { defer wg.Done() build(t, name, options{ - dir: helperRootDir(t), + dir: helperRootDir, buildDir: name, }) }(name) @@ -100,7 +103,9 @@ func helperRootDir(t *testing.T) string { func build(t *testing.T, name string, opts options) { t.Helper() - require.NotEmpty(t, opts.dir) + if !assert.NotEmpty(t, opts.dir) { + return + } if _, ok := os.LookupEnv(EnvKey(name)); !ok { t.Logf("%q not set, building %q binary", EnvKey(name), name) diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 7400b1a5d94..7e4cea0ed7d 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -225,9 +225,8 @@ func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.Sche //nolint:staticcheck conn, err := grpc.DialContext(ctx, s.Address(), grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(math.MaxInt32), grpc.MaxCallRecvMsgSize(math.MaxInt32)), - //grpc.WithBlock(), grpc.WithReturnConnectionError(), grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithMaxMsgSize(math.MaxInt32), + grpc.WithBlock(), grpc.WithReturnConnectionError(), ) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, conn.Close()) }) @@ -341,7 +340,7 @@ func (s *Scheduler) EtcdClient(t *testing.T) *clientv3.Client { t.Helper() client, err := clientv3.New(clientv3.Config{ - Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, + Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, DialTimeout: 15 * time.Second, }) require.NoError(t, err) diff --git a/tests/integration/suite/scheduler/api/list/crud.go b/tests/integration/suite/scheduler/api/list/crud.go index 28fabc21d83..a4d4a32f3ab 100644 --- a/tests/integration/suite/scheduler/api/list/crud.go +++ b/tests/integration/suite/scheduler/api/list/crud.go @@ -19,14 +19,14 @@ import ( "testing" "time" - schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" "github.com/dapr/kit/ptr" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func init() { @@ -74,15 +74,13 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { } } - assert.False(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetHasMore()) assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs()) - assert.False(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetHasMore()) assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs()) client := c.scheduler.Client(t, ctx) - _, err := client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err := client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: jobMetadata("default", "test"), }) require.NoError(t, err) @@ -93,47 +91,51 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "myactorid").GetJobs()) for i := range 10 { - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: strconv.Itoa(i), - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: jobMetadata("default", "test"), }) + require.NoError(t, err) } assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs()) assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs()) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, - Metadata: &schedulerv1.JobMetadata{ + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, + Metadata: &schedulerv1pb.JobMetadata{ Namespace: "not-default", AppId: "test", - Target: &schedulerv1.JobTargetMetadata{ - Type: new(schedulerv1.JobTargetMetadata_Job), + Target: &schedulerv1pb.JobTargetMetadata{ + Type: new(schedulerv1pb.JobTargetMetadata_Job), }, }, }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Empty(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs()) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: jobMetadata("default", "not-test"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs()) assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs()) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: actorMetadata("default", "test", "myactortype", "myactorid"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) @@ -145,11 +147,12 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 1) assert.Empty(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs()) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: actorMetadata("default", "test", "not-myactortype", "myactorid"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) @@ -161,11 +164,12 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: actorMetadata("default", "test", "myactortype", "not-myactorid"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) @@ -177,11 +181,12 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 2) assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test2", - Job: &schedulerv1.Job{Schedule: ptr.Of("@every 20s")}, + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@every 20s")}, Metadata: actorMetadata("default", "test", "myactortype", "not-myactorid"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 11) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) @@ -193,10 +198,11 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) - _, err = client.DeleteJob(ctx, &schedulerv1.DeleteJobRequest{ + _, err = client.DeleteJob(ctx, &schedulerv1pb.DeleteJobRequest{ Name: "test", Metadata: jobMetadata("default", "test"), }) + require.NoError(t, err) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 10) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "not-default", "test").GetJobs(), 1) @@ -208,11 +214,12 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) - for i := 0; i < 6; i++ { - _, err = client.DeleteJob(ctx, &schedulerv1.DeleteJobRequest{ + for i := range 6 { + _, err = client.DeleteJob(ctx, &schedulerv1pb.DeleteJobRequest{ Name: strconv.Itoa(i), Metadata: jobMetadata("default", "test"), }) + require.NoError(t, err) } assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "test").GetJobs(), 4) assert.Len(t, c.scheduler.ListJobJobs(t, ctx, "default", "not-test").GetJobs(), 1) @@ -225,9 +232,9 @@ func (c *crud) Run(t *testing.T, ctx context.Context) { assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "myactortype", "").GetJobs(), 3) assert.Len(t, c.scheduler.ListJobActors(t, ctx, "default", "test", "not-myactortype", "").GetJobs(), 1) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test123", - Job: &schedulerv1.Job{DueTime: ptr.Of(time.Now().Add(time.Second * 2).Format(time.RFC3339))}, + Job: &schedulerv1pb.Job{DueTime: ptr.Of(time.Now().Add(time.Second * 2).Format(time.RFC3339))}, Metadata: jobMetadata("default", "test"), }) require.NoError(t, err) diff --git a/tests/integration/suite/scheduler/api/list/data.go b/tests/integration/suite/scheduler/api/list/data.go index fad34b87e31..23c93f14bca 100644 --- a/tests/integration/suite/scheduler/api/list/data.go +++ b/tests/integration/suite/scheduler/api/list/data.go @@ -17,17 +17,17 @@ import ( "context" "testing" - schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" - schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" - "github.com/dapr/dapr/tests/integration/framework" - "github.com/dapr/dapr/tests/integration/framework/process/scheduler" - "github.com/dapr/dapr/tests/integration/suite" - "github.com/dapr/kit/ptr" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/wrapperspb" + + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" ) func init() { @@ -55,9 +55,9 @@ func (d *data) Run(t *testing.T, ctx context.Context) { data2, err := anypb.New(wrapperspb.String("hello world 2")) require.NoError(t, err) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test1", - Job: &schedulerv1.Job{ + Job: &schedulerv1pb.Job{ Repeats: ptr.Of(uint32(10)), Schedule: ptr.Of("@every 20s"), DueTime: ptr.Of("100s"), @@ -75,9 +75,9 @@ func (d *data) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test2", - Job: &schedulerv1.Job{ + Job: &schedulerv1pb.Job{ Repeats: ptr.Of(uint32(20)), Schedule: ptr.Of("@every 40s"), DueTime: ptr.Of("200s"), @@ -97,7 +97,7 @@ func (d *data) Run(t *testing.T, ctx context.Context) { }) require.NoError(t, err) - resp, err := client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + resp, err := client.ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ Metadata: &schedulerv1pb.JobMetadata{ Namespace: "default", AppId: "test", Target: &schedulerv1pb.JobTargetMetadata{ @@ -108,9 +108,8 @@ func (d *data) Run(t *testing.T, ctx context.Context) { }, }) require.NoError(t, err) - require.Len(t, resp.Jobs, 1) - assert.False(t, resp.GetHasMore()) - namedJob := resp.Jobs[0] + require.Len(t, resp.GetJobs(), 1) + namedJob := resp.GetJobs()[0] assert.Equal(t, "test1", namedJob.GetName()) job := namedJob.GetJob() assert.Equal(t, uint32(10), job.GetRepeats()) @@ -119,7 +118,7 @@ func (d *data) Run(t *testing.T, ctx context.Context) { assert.Equal(t, "200s", job.GetTtl()) assert.True(t, proto.Equal(data1, job.GetData())) - resp, err = client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + resp, err = client.ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ Metadata: &schedulerv1pb.JobMetadata{ Namespace: "default", AppId: "test", Target: &schedulerv1pb.JobTargetMetadata{ @@ -132,9 +131,8 @@ func (d *data) Run(t *testing.T, ctx context.Context) { }, }) require.NoError(t, err) - require.Len(t, resp.Jobs, 1) - assert.False(t, resp.GetHasMore()) - namedJob = resp.Jobs[0] + require.Len(t, resp.GetJobs(), 1) + namedJob = resp.GetJobs()[0] assert.Equal(t, "test2", namedJob.GetName()) job = namedJob.GetJob() assert.Equal(t, uint32(20), job.GetRepeats()) diff --git a/tests/integration/suite/scheduler/api/list/size.go b/tests/integration/suite/scheduler/api/list/size.go index e7e3266978a..9445ed3cb41 100644 --- a/tests/integration/suite/scheduler/api/list/size.go +++ b/tests/integration/suite/scheduler/api/list/size.go @@ -19,16 +19,16 @@ import ( "strconv" "testing" - schedulerv1 "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/wrapperspb" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/suite" "github.com/dapr/kit/ptr" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/protobuf/types/known/anypb" - "google.golang.org/protobuf/types/known/wrapperspb" ) func init() { @@ -54,9 +54,9 @@ func (s *size) Run(t *testing.T, ctx context.Context) { data, err := anypb.New(wrapperspb.Bytes(bytes.Repeat([]byte{0x01}, 2e+6))) require.NoError(t, err) for i := range 100 { - _, err = client.ScheduleJob(ctx, &schedulerv1.ScheduleJobRequest{ + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ Name: "test-" + strconv.Itoa(i), - Job: &schedulerv1.Job{ + Job: &schedulerv1pb.Job{ DueTime: ptr.Of("1000s"), Data: data, }, @@ -72,7 +72,7 @@ func (s *size) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) } - resp, err := client.ListJobs(ctx, &schedulerv1.ListJobsRequest{ + resp, err := client.ListJobs(ctx, &schedulerv1pb.ListJobsRequest{ Metadata: &schedulerv1pb.JobMetadata{ Namespace: "default", AppId: "test", Target: &schedulerv1pb.JobTargetMetadata{ From 3d6136b0135ee29105c25d804ca73f2bb19f832d Mon Sep 17 00:00:00 2001 From: joshvanl Date: Thu, 3 Oct 2024 20:13:40 +0100 Subject: [PATCH 095/112] Fix unit tests Signed-off-by: joshvanl --- go.mod | 2 +- go.sum | 4 ++-- tests/platforms/kubernetes/appmanager_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 49c56698c43..61ff61a94a6 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/cloudevents/sdk-go/v2 v2.15.2 github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 - github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61 + github.com/diagridio/go-etcd-cron v0.3.1-0.20241003173209-b36ada3e33a3 github.com/evanphx/json-patch/v5 v5.9.0 github.com/go-chi/chi/v5 v5.0.11 github.com/go-chi/cors v1.2.1 diff --git a/go.sum b/go.sum index 1ec103a7893..c7533ce959e 100644 --- a/go.sum +++ b/go.sum @@ -482,8 +482,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61 h1:RX6UnVtsJO1nBGgjQqCpnc86VolsMcuTQi2+5QEyknE= -github.com/diagridio/go-etcd-cron v0.3.1-0.20241003162701-e33e15459b61/go.mod h1:SiUsFA1yV6cgCYsK/A1FCfHWWqyea3+RMHAOUPb+JAY= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241003173209-b36ada3e33a3 h1:WR/kSwGg2yTPkgh/7RfPkdkDJ6ZSnC+zRq3B9HDK3LQ= +github.com/diagridio/go-etcd-cron v0.3.1-0.20241003173209-b36ada3e33a3/go.mod h1:SiUsFA1yV6cgCYsK/A1FCfHWWqyea3+RMHAOUPb+JAY= github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog= github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= diff --git a/tests/platforms/kubernetes/appmanager_test.go b/tests/platforms/kubernetes/appmanager_test.go index ea56f9287f3..4b095f8f95f 100644 --- a/tests/platforms/kubernetes/appmanager_test.go +++ b/tests/platforms/kubernetes/appmanager_test.go @@ -186,7 +186,7 @@ func TestWaitUntilDeploymentState(t *testing.T) { d, err := appManager.WaitUntilDeploymentState(appManager.IsDeploymentDeleted) require.NoError(t, err) - assert.Nil(t, d) + assert.Equal(t, new(appsv1.Deployment), d) assert.Equal(t, expectedGetVerbCalled, getVerbCalled) }) } @@ -506,7 +506,7 @@ func TestWaitUntilServiceStateDeleted(t *testing.T) { appManager := NewAppManager(client, testNamespace, testApp) svcObj, err := appManager.WaitUntilServiceState(appManager.app.AppName, appManager.IsServiceDeleted) require.NoError(t, err) - assert.Nil(t, svcObj) + assert.Equal(t, new(apiv1.Service), svcObj) } func TestDeleteDeployment(t *testing.T) { From 6312166ec959a335bc9e5733dcd7b44c966441c3 Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Tue, 15 Oct 2024 16:31:22 -0400 Subject: [PATCH 096/112] Scheduler e2e Tests (#8150) * update existing wf, reminder e2e to include scheduler Signed-off-by: Cassandra Coyle * add http e2e crud Signed-off-by: Cassandra Coyle * http app code changes for all CRUD operations Signed-off-by: Cassandra Coyle * working grpc app code Signed-off-by: Cassandra Coyle * wf -> wfs Signed-off-by: Cassandra Coyle * revert wf test, will add later bc there is a bug with it Signed-off-by: Cassandra Coyle * up duetime Signed-off-by: Cassandra Coyle * fix lint Signed-off-by: Cassandra Coyle * fix lint Signed-off-by: Cassandra Coyle * up health checks Signed-off-by: Cassandra Coyle --------- Signed-off-by: Cassandra Coyle Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Josh van Leeuwen --- tests/apps/schedulerapp/app.go | 80 ++++-- tests/apps/schedulerapp_grpc/app.go | 227 +++++++++++++++--- .../e2e/actor_reminder/actor_reminder_test.go | 16 ++ tests/e2e/scheduler/scheduler_test.go | 133 ++++++++-- 4 files changed, 391 insertions(+), 65 deletions(-) diff --git a/tests/apps/schedulerapp/app.go b/tests/apps/schedulerapp/app.go index e7a4e9af772..6f85cd4c916 100644 --- a/tests/apps/schedulerapp/app.go +++ b/tests/apps/schedulerapp/app.go @@ -59,30 +59,32 @@ var ( jobsMutex sync.Mutex ) -func scheduleJobHTTP(name string, jsonValue []byte) (int, error) { - log.Printf("Scheduling job named: %s", name) - - url := fmt.Sprintf("http://localhost:%d/v1.0-alpha1/jobs/%s", daprPortHTTP, name) - +func makeHTTPCall(jobName string, body []byte, methodType string) ([]byte, int, error) { + url := fmt.Sprintf("http://localhost:%d/v1.0-alpha1/jobs/%s", daprPortHTTP, jobName) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() - req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(jsonValue)) + req, err := http.NewRequestWithContext(ctx, methodType, url, bytes.NewBuffer(body)) if err != nil { - return 0, err + return nil, 0, err } req.Header.Set("Content-Type", "application/json") - resp, err := httpClient.Do(req) if err != nil { if resp != nil { - return resp.StatusCode, err + return nil, resp.StatusCode, err } - return http.StatusInternalServerError, err + return nil, http.StatusInternalServerError, err } defer resp.Body.Close() - return resp.StatusCode, nil + + respBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, resp.StatusCode, err + } + + return respBody, resp.StatusCode, nil } // scheduleJobHandler is to schedule a job with the Daprd sidecar @@ -92,19 +94,20 @@ func scheduleJobHandler(w http.ResponseWriter, r *http.Request) { jobName := vars["name"] // Extract job data from the request body - var jobData job - if err := json.NewDecoder(r.Body).Decode(&jobData); err != nil { + var j job + if err := json.NewDecoder(r.Body).Decode(&j); err != nil { http.Error(w, fmt.Sprintf("error decoding JSON: %v", err), http.StatusBadRequest) return } - jsonData, err := json.Marshal(jobData) + jsonData, err := json.Marshal(j) if err != nil { http.Error(w, fmt.Sprintf("error encoding JSON: %v", err), http.StatusInternalServerError) return } - statusCode, err := scheduleJobHTTP(jobName, jsonData) + log.Printf("Scheduling job named: %s", jobName) + _, statusCode, err := makeHTTPCall(jobName, jsonData, http.MethodPost) if err != nil { http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode) return @@ -145,6 +148,47 @@ func getTriggeredJobs(w http.ResponseWriter, r *http.Request) { } } +// deleteJobHandler is to delete a job with the Daprd sidecar +func deleteJobHandler(w http.ResponseWriter, r *http.Request) { + // Extract the job name from the URL path parameters + vars := mux.Vars(r) + jobName := vars["name"] + + log.Printf("Deleting job named: %s", jobName) + _, statusCode, err := makeHTTPCall(jobName, nil, http.MethodDelete) + if err != nil { + http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode) + return + } + w.WriteHeader(statusCode) +} + +// getJobHandler is to get a job from the Daprd sidecar +func getJobHandler(w http.ResponseWriter, r *http.Request) { + // Extract the job name from the URL path parameters + vars := mux.Vars(r) + jobName := vars["name"] + + log.Printf("Getting job named: %s", jobName) + responseBody, statusCode, err := makeHTTPCall(jobName, nil, http.MethodGet) + if err != nil { + http.Error(w, fmt.Sprintf("error scheduling job: %v", err), statusCode) + return + } + + // Write the response body + if statusCode == http.StatusOK { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(statusCode) + _, err := w.Write(responseBody) + if err != nil { + log.Printf("failed to write response body: %s", err) + } + } else { + w.WriteHeader(statusCode) + } +} + // jobHandler is to receive the job at trigger time func jobHandler(w http.ResponseWriter, r *http.Request) { reqBody, err := io.ReadAll(r.Body) @@ -179,7 +223,13 @@ func appRouter() http.Handler { // Log requests and their processing time router.Use(utils.LoggerMiddleware) + // schedule the job to the daprd sidecar router.HandleFunc("/scheduleJob/{name}", scheduleJobHandler).Methods(http.MethodPost) + // get the scheduled job from the daprd sidecar + router.HandleFunc("/getJob/{name}", getJobHandler).Methods(http.MethodGet) + // delete the job from the daprd sidecar + router.HandleFunc("/deleteJob/{name}", deleteJobHandler).Methods(http.MethodDelete) + // receive triggered job from daprd sidecar router.HandleFunc("/job/{name}", jobHandler).Methods(http.MethodPost) // get the triggered jobs back for testing purposes diff --git a/tests/apps/schedulerapp_grpc/app.go b/tests/apps/schedulerapp_grpc/app.go index 8e4d40ba0f3..5e43227ed6d 100644 --- a/tests/apps/schedulerapp_grpc/app.go +++ b/tests/apps/schedulerapp_grpc/app.go @@ -14,7 +14,9 @@ limitations under the License. package main import ( + "bytes" "context" + "encoding/base64" "encoding/json" "fmt" "io" @@ -23,14 +25,17 @@ import ( "net/http" "os" "os/signal" + "strings" "sync" "syscall" "time" "github.com/gorilla/mux" "google.golang.org/grpc" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/wrapperspb" commonv1pb "github.com/dapr/dapr/pkg/proto/common/v1" runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1" @@ -57,8 +62,8 @@ type triggeredJob struct { } type jobData struct { - DataType string `json:"@type"` - Expression string `json:"expression"` + DataType string `json:"@type"` + Value string `json:"value"` } type job struct { @@ -70,6 +75,20 @@ type job struct { TTL string `json:"ttl,omitempty"` } +type receivedJob struct { + Name string `json:"name"` + Schedule string `json:"schedule"` + Repeats int `json:"repeats"` + DueTime string `json:"dueTime"` + Data struct { + Type string `json:"@type"` + Value struct { + Type string `json:"@type"` + Value string `json:"value"` + } `json:"value"` + } `json:"data"` +} + var ( daprClient runtimev1pb.DaprClient @@ -77,33 +96,6 @@ var ( jobsMutex sync.Mutex ) -func scheduleJobGRPC(name string, jobWrapper JobWrapper) error { - log.Printf("Scheduling job named: %s", name) - - dataBytes, err := json.Marshal(jobWrapper.Job.Data) - if err != nil { - return err - } - - job := &runtimev1pb.ScheduleJobRequest{ - Job: &runtimev1pb.Job{ - Name: name, - Schedule: ptr.Of(jobWrapper.Job.Schedule), - Repeats: ptr.Of(jobWrapper.Job.Repeats), - Data: &anypb.Any{ - Value: dataBytes, - }, - }, - } - - if _, err = daprClient.ScheduleJobAlpha1(context.Background(), job); err != nil { - return err - } - - log.Printf("Successfully scheduled job named: %s", name) - return nil -} - func (s *server) HealthCheck(ctx context.Context, _ *emptypb.Empty) (*runtimev1pb.HealthCheckResponse, error) { return &runtimev1pb.HealthCheckResponse{}, nil } @@ -158,21 +150,154 @@ func addTriggeredJob(job triggeredJob) { log.Printf("Triggered job added: %+v\n", job) } +func getJobGRPC(name string) (*runtimev1pb.GetJobResponse, error) { + log.Printf("Getting job named: %s", name) + + job := &runtimev1pb.GetJobRequest{ + Name: name, + } + + var err error + var receivedJob *runtimev1pb.GetJobResponse + if receivedJob, err = daprClient.GetJobAlpha1(context.Background(), job); err != nil { + return nil, err + } + + log.Printf("Successfully received job named: %s", receivedJob.GetJob().GetName()) + return receivedJob, err +} + +// getJobHandler is to get a job from the Daprd sidecar +func getJobHandler(w http.ResponseWriter, r *http.Request) { + // Extract the job name from the URL path parameters + vars := mux.Vars(r) + jobName := vars["name"] + log.Printf("Getting job named: %s", jobName) + + job, err := getJobGRPC(jobName) + if err != nil { + log.Printf("Error get job from dapr via the grpc protocol: %s", err) + return + } + + if job == nil || job.GetJob() == nil { + http.Error(w, "Job not found", http.StatusNotFound) + return + } + + jobData := job.GetJob().GetData() + var jo triggeredJob + if uerr := json.Unmarshal(jobData.GetValue(), &jo); uerr != nil { + log.Printf("Error unmarshalling decoded job data: %v", uerr) + http.Error(w, "Failed to decode job JSON", http.StatusInternalServerError) + return + } + + decodedbytes, derr := base64.StdEncoding.DecodeString(jo.Value) + if derr != nil { + log.Printf("Error decoding base64 job data: %v", derr) + http.Error(w, "Failed to decode base64 job data", http.StatusInternalServerError) + return + } + + // doing this, so we can reuse test btw grpc & http, so sending back + // values in test expected format + rjob := &receivedJob{ + Name: job.GetJob().GetName(), + Schedule: job.GetJob().GetSchedule(), + Repeats: int(job.GetJob().GetRepeats()), + DueTime: job.GetJob().GetDueTime(), + Data: struct { + Type string `json:"@type"` + Value struct { + Type string `json:"@type"` + Value string `json:"value"` + } `json:"value"` + }{ + Type: jobData.GetTypeUrl(), + Value: struct { + Type string `json:"@type"` + Value string `json:"value"` + }{ + Type: jo.TypeURL, + Value: strings.TrimSpace(string(decodedbytes)), + }, + }, + } + + respBody, merr := json.Marshal(rjob) + if merr != nil { + http.Error(w, fmt.Sprintf("error marshalling job response: %v", merr), http.StatusInternalServerError) + return + } + + w.WriteHeader(http.StatusOK) + _, err = w.Write(respBody) + if err != nil { + log.Printf("failed to write response body: %s", err) + } +} + +func scheduleJobGRPC(name string, jobWrapper JobWrapper) error { + log.Printf("Scheduling job named: %s", name) + + stringValue := &wrapperspb.StringValue{ + Value: jobWrapper.Job.Data.Value, + } + + dataBytes, err := proto.Marshal(stringValue) + if err != nil { + return fmt.Errorf("failed to marshal job data to bytes: %w", err) + } + jobData := &anypb.Any{ + TypeUrl: jobWrapper.Job.Data.DataType, + Value: dataBytes, + } + + jbytes, err := json.Marshal(jobData) + if err != nil { + return fmt.Errorf("failed to marshal job data: %w", err) + } + + job := &runtimev1pb.ScheduleJobRequest{ + Job: &runtimev1pb.Job{ + Name: name, + Schedule: ptr.Of(jobWrapper.Job.Schedule), + Repeats: ptr.Of(jobWrapper.Job.Repeats), + DueTime: ptr.Of(jobWrapper.Job.DueTime), + Data: &anypb.Any{Value: jbytes}, + }, + } + + if _, err := daprClient.ScheduleJobAlpha1(context.Background(), job); err != nil { + return err + } + + log.Printf("Successfully scheduled job named: %s", name) + return nil +} + // scheduleJobHandler is to schedule a job with the Daprd sidecar func scheduleJobHandler(w http.ResponseWriter, r *http.Request) { // Extract the job name from the URL path parameters vars := mux.Vars(r) jobName := vars["name"] + bodyBytes, rerr := io.ReadAll(r.Body) + if rerr != nil { + http.Error(w, fmt.Sprintf("error reading body: %v", rerr), http.StatusInternalServerError) + return + } + r.Body = io.NopCloser(bytes.NewBuffer(bodyBytes)) + // Extract job data from the request body - var jobData job - if err := json.NewDecoder(r.Body).Decode(&jobData); err != nil { + var j job + if err := json.NewDecoder(r.Body).Decode(&j); err != nil { http.Error(w, fmt.Sprintf("error decoding JSON: %v", err), http.StatusBadRequest) return } - jobWrapper := JobWrapper{Job: jobData} - + jobWrapper := JobWrapper{Job: j} err := scheduleJobGRPC(jobName, jobWrapper) if err != nil { log.Printf("Error scheduling job to dapr via grpc protocol: %s", err) @@ -182,6 +307,35 @@ func scheduleJobHandler(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } +func deleteJobGRPC(name string) error { + log.Printf("Deleting job named: %s", name) + + job := &runtimev1pb.DeleteJobRequest{ + Name: name, + } + + if _, err := daprClient.DeleteJobAlpha1(context.Background(), job); err != nil { + log.Printf("Error deleting job via daprs grpc protocol: %s", err) + return err + } + log.Printf("Successfully deleted job named: %s", name) + return nil +} + +// deleteJobHandler is to delete a job via reaching out to the Daprd sidecar +func deleteJobHandler(w http.ResponseWriter, r *http.Request) { + // Extract the job name from the URL path parameters + vars := mux.Vars(r) + jobName := vars["name"] + + err := deleteJobGRPC(jobName) + if err != nil { + log.Printf("Error deleting job to dapr via grpc protocol: %s", err) + return + } + w.WriteHeader(http.StatusOK) +} + // getStoredJobs returns the global slice of triggered jobs func getStoredJobs() []triggeredJob { jobsMutex.Lock() @@ -240,14 +394,19 @@ func appRouter() http.Handler { // Log requests and their processing time router.Use(utils.LoggerMiddleware) + // schedule the job to the daprd sidecar router.HandleFunc("/scheduleJob/{name}", scheduleJobHandler).Methods(http.MethodPost) + // get the scheduled job from the daprd sidecar + router.HandleFunc("/getJob/{name}", getJobHandler).Methods(http.MethodGet) + // delete the job from the daprd sidecar + router.HandleFunc("/deleteJob/{name}", deleteJobHandler).Methods(http.MethodDelete) + // receive triggered job from daprd sidecar router.HandleFunc("/job/{name}", jobHandler).Methods(http.MethodPost) // get the triggered jobs back for testing purposes router.HandleFunc("/getTriggeredJobs", getTriggeredJobs).Methods(http.MethodGet) router.HandleFunc("/healthz", healthzHandler).Methods(http.MethodGet) - router.Use(mux.CORSMethodMiddleware(router)) return router diff --git a/tests/e2e/actor_reminder/actor_reminder_test.go b/tests/e2e/actor_reminder/actor_reminder_test.go index 01271575de9..23ec350f8cd 100644 --- a/tests/e2e/actor_reminder/actor_reminder_test.go +++ b/tests/e2e/actor_reminder/actor_reminder_test.go @@ -140,6 +140,22 @@ func TestMain(m *testing.M) { "TEST_APP_ACTOR_TYPE": actorName, }, }, + { + AppName: appName + "scheduler", + DaprEnabled: true, + DebugLoggingEnabled: true, + ImageName: "e2e-actorfeatures", + Config: "featureactorreminderscheduler", + Replicas: 1, + IngressEnabled: true, + DaprCPULimit: "2.0", + DaprCPURequest: "0.1", + AppCPULimit: "2.0", + AppCPURequest: "0.1", + AppEnv: map[string]string{ + "TEST_APP_ACTOR_TYPE": actorName, + }, + }, } tr = runner.NewTestRunner(appName, testApps, nil, nil) diff --git a/tests/e2e/scheduler/scheduler_test.go b/tests/e2e/scheduler/scheduler_test.go index f42be039be0..33570f130db 100644 --- a/tests/e2e/scheduler/scheduler_test.go +++ b/tests/e2e/scheduler/scheduler_test.go @@ -38,10 +38,12 @@ const ( appPortGRPC = 3001 appNameGRPC = "schedulerapp-grpc" appName = "schedulerapp" - numHealthChecks = 2 // Number of get calls before starting tests. + numHealthChecks = 10 // Number of get calls before starting tests. numIterations = 4 // Number of times each test should run. jobName = "testjob" // Job name. scheduleJobURLFormat = "%s/scheduleJob/" + jobName + "-%s-%s" // App Schedule Job URL. + getJobURLFormat = "%s/getJob/" + jobName + "-%s-%s" // App Schedule Job URL. + deleteJobURLFormat = "%s/deleteJob/" + jobName + "-%s-%s" // App Schedule Job URL. getTriggeredJobsURLFormat = "%s/getTriggeredJobs" // App Get the Triggered Jobs URL. numJobsPerGoRoutine = 10 // Number of get calls before starting tests. ) @@ -63,6 +65,20 @@ type job struct { DueTime string `json:"dueTime,omitempty"` } +type receivedJob struct { + Name string `json:"name"` + Schedule string `json:"schedule"` + Repeats int `json:"repeats"` + DueTime string `json:"dueTime"` + Data struct { + Type string `json:"@type"` + Value struct { + Type string `json:"@type"` + Value string `json:"value"` + } `json:"value"` + } `json:"data"` +} + var tr *runner.TestRunner func TestMain(m *testing.M) { @@ -98,29 +114,32 @@ func TestMain(m *testing.M) { os.Exit(tr.Start(m)) } -func TestJobTriggered(t *testing.T) { +// This func will test that jobs are able to be scheduled and triggered properly along with +// doing a basic schedule, get, delete test to ensure that the Scheduler is operating properly. +func TestJobs(t *testing.T) { externalURL := tr.Platform.AcquireAppExternalURL(appName) + require.NotEmpty(t, externalURL, "external URL must not be empty!") t.Logf("Checking if app is healthy ...") _, err := utils.HTTPGetNTimes(externalURL, numHealthChecks) require.NoError(t, err) - data := jobData{ - DataType: "type.googleapis.com/google.protobuf.StringValue", - Value: "expression", - } + t.Run("Schedule job and app should receive triggered job.", func(t *testing.T) { + data := jobData{ + DataType: "type.googleapis.com/google.protobuf.StringValue", + Value: "expression", + } - j := job{ - Data: data, - Schedule: "@every 1s", - Repeats: 1, - DueTime: "1s", - } - jobBody, err := json.Marshal(j) - require.NoError(t, err) + j := job{ + Data: data, + Schedule: "@every 1s", + Repeats: 1, + DueTime: "1s", + } + jobBody, err := json.Marshal(j) + require.NoError(t, err) - t.Run("Schedule job and app should receive triggered job.", func(t *testing.T) { var wg sync.WaitGroup for iteration := 1; iteration <= numIterations; iteration++ { wg.Add(1) @@ -142,8 +161,8 @@ func TestJobTriggered(t *testing.T) { log.Println("Checking the count of stored triggered jobs equals the scheduled count of jobs") // Call the app endpoint to get triggered jobs resp, err := utils.HTTPGet(fmt.Sprintf(getTriggeredJobsURLFormat, externalURL)) - require.NoError(t, err) + require.NoError(t, err) var triggeredJobs []triggeredJob err = json.Unmarshal([]byte(resp), &triggeredJobs) require.NoError(t, err) @@ -153,4 +172,86 @@ func TestJobTriggered(t *testing.T) { }, 10*time.Second, 100*time.Millisecond) t.Log("Done.") }) + + // create, get, delete jobs + t.Run("Schedule, get, delete jobs.", func(t *testing.T) { + data := jobData{ + DataType: "type.googleapis.com/google.protobuf.StringValue", + Value: "expression", + } + + scheduledJob := job{ + Data: data, + Schedule: "@every 60s", + Repeats: 1, + DueTime: "180s", // higher due time bc we already test triggering above + + } + jobBody, err := json.Marshal(scheduledJob) + require.NoError(t, err) + + var wg sync.WaitGroup + for iteration := 1; iteration <= numIterations; iteration++ { + wg.Add(1) + go func(iteration int) { + defer wg.Done() + t.Logf("(Schedule job) Running iteration %d out of %d ...", iteration, numIterations) + + for i := 0; i < numJobsPerGoRoutine; i++ { + // Call app to schedule job, send job to app + log.Printf("Scheduling job: testjob-%s-%s", strconv.Itoa(iteration), strconv.Itoa(i)) + _, err = utils.HTTPPost(fmt.Sprintf(scheduleJobURLFormat, externalURL, strconv.Itoa(iteration), strconv.Itoa(i)), jobBody) + require.NoError(t, err) + } + }(iteration) + } + wg.Wait() + + // get all above jobs + var getWg sync.WaitGroup + for iteration := 1; iteration <= numIterations; iteration++ { + getWg.Add(1) + go func(iteration int) { + defer getWg.Done() + t.Logf("(Get job) Running iteration %d out of %d ...", iteration, numIterations) + + for i := 0; i < numJobsPerGoRoutine; i++ { + // Call app to get job, send request to app which makes the dapr call + log.Printf("Getting job: testjob-%s-%s", strconv.Itoa(iteration), strconv.Itoa(i)) + resp, err := utils.HTTPGet(fmt.Sprintf(getJobURLFormat, externalURL, strconv.Itoa(iteration), strconv.Itoa(i))) + require.NoError(t, err) + assert.NotNil(t, resp) + + var rJob receivedJob + err = json.Unmarshal(resp, &rJob) + require.NoError(t, err) + + assert.Equal(t, jobName+"-"+strconv.Itoa(iteration)+"-"+strconv.Itoa(i), rJob.Name) + assert.Equal(t, scheduledJob.Schedule, rJob.Schedule) + assert.Equal(t, scheduledJob.Repeats, rJob.Repeats) + assert.Equal(t, scheduledJob.DueTime, rJob.DueTime) + assert.Equal(t, scheduledJob.Data.Value, rJob.Data.Value.Value) + } + }(iteration) + } + getWg.Wait() + + // delete all above jobs + var deleteWg sync.WaitGroup + for iteration := 1; iteration <= numIterations; iteration++ { + deleteWg.Add(1) + go func(iteration int) { + defer deleteWg.Done() + // Call app to delete job, send request to app which makes the dapr call + t.Logf("(Delete job) Running iteration %d out of %d ...", iteration, numIterations) + for i := 0; i < numJobsPerGoRoutine; i++ { + log.Printf("Deleting job: testjob-%s-%s", strconv.Itoa(iteration), strconv.Itoa(i)) + _, err := utils.HTTPDelete(fmt.Sprintf(deleteJobURLFormat, externalURL, strconv.Itoa(iteration), strconv.Itoa(i))) + require.NoError(t, err) + } + }(iteration) + } + deleteWg.Wait() + t.Log("Done.") + }) } From 85003278fd324177f6f0a2d3171d18c723759e8f Mon Sep 17 00:00:00 2001 From: joshvanl Date: Sun, 1 Sep 2024 04:17:47 +0100 Subject: [PATCH 097/112] Scheduler: Adds Kubernetes namespace controller When in Kubernetes mode, the Scheduler will delete Jobs of all kinds (currently cron and actor reminders) when the namespace they belong to is deleted. This prevents both squatting memory in Etcd, and more importantly, consuming resources scheduling jobs which have no consumers to signal. The Scheduler Namespace Controller will Delete all Jobs in a namespace when the Kubernetes Namespace is deleted. The controller uses leader election, meaning only one instance of the Scheduler will be running the controller at any one time. Uses an updated go-etcd-cron library version to use the new `DeletePrefixes` API method. The Scheduler has been given the permissions to get, list and watch namespaces in Kubernetes so the controller can function. The controller is only executed when the Scheduler is in Kubernetes mode (`--mode=kubernetes`). A new `--kubeconfig` CLI flag has been added to the Scheduler, which is used in integration testing so that it points to the mock Kubernetes API server. This isn't useful for end users so hasn't been documented or exposed in the Helm chart. Since the Namespace controller needs to call the Etcd Cron library, the Scheduler server has been refactored to move functionality into `/internal` of the server package, so that they can be shared between both the server and controller. Signed-off-by: joshvanl --- .../charts/dapr_rbac/templates/scheduler.yaml | 7 +- cmd/scheduler/app/app.go | 1 + cmd/scheduler/options/options.go | 10 + cmd/scheduler/options/options_test.go | 57 ++++ go.mod | 2 + go.sum | 2 + pkg/operator/api/authz/authz.go | 3 +- pkg/scheduler/server/api.go | 144 ++------- pkg/scheduler/server/config_test.go | 279 ++++++++++++++++++ .../server/{ => internal}/authz/authz.go | 2 +- .../server/{ => internal}/authz/authz_test.go | 4 +- .../server/internal/controller/controller.go | 110 +++++++ .../server/internal/controller/namespace.go | 56 ++++ .../internal/controller/namespace_test.go | 98 ++++++ pkg/scheduler/server/internal/cron/cron.go | 184 ++++++++++++ .../server/internal/cron/fake/fake.go | 55 ++++ .../server/internal/cron/fake/fake_test.go | 24 ++ .../server/internal/{ => pool}/conn.go | 2 +- .../server/internal/{ => pool}/pool.go | 4 +- .../server/internal/serialize/names.go | 21 ++ .../server/internal/serialize/serialize.go | 116 ++++++++ pkg/scheduler/server/server.go | 82 +++-- pkg/scheduler/server/server_test.go | 211 ------------- .../framework/manifest/manifest.go | 36 +++ .../framework/process/daprd/daprd.go | 8 + .../process/kubernetes/informer/informer.go | 12 +- .../framework/process/kubernetes/options.go | 9 + .../process/kubernetes/store/store.go | 11 + .../framework/process/placement/options.go | 16 +- .../framework/process/scheduler/options.go | 14 + .../framework/process/scheduler/scheduler.go | 13 +- .../suite/actors/reminders/scheduler/basic.go | 9 +- tests/integration/suite/daprd/jobs/jobs.go | 1 + .../suite/daprd/jobs/kubernetes/namespace.go | 152 ++++++++++ .../suite/scheduler/kubernetes/namespace.go | 125 ++++++++ .../integration/suite/scheduler/scheduler.go | 1 + 36 files changed, 1509 insertions(+), 372 deletions(-) create mode 100644 cmd/scheduler/options/options_test.go create mode 100644 pkg/scheduler/server/config_test.go rename pkg/scheduler/server/{ => internal}/authz/authz.go (95%) rename pkg/scheduler/server/{ => internal}/authz/authz_test.go (98%) create mode 100644 pkg/scheduler/server/internal/controller/controller.go create mode 100644 pkg/scheduler/server/internal/controller/namespace.go create mode 100644 pkg/scheduler/server/internal/controller/namespace_test.go create mode 100644 pkg/scheduler/server/internal/cron/cron.go create mode 100644 pkg/scheduler/server/internal/cron/fake/fake.go create mode 100644 pkg/scheduler/server/internal/cron/fake/fake_test.go rename pkg/scheduler/server/internal/{ => pool}/conn.go (99%) rename pkg/scheduler/server/internal/{ => pool}/pool.go (99%) create mode 100644 pkg/scheduler/server/internal/serialize/names.go create mode 100644 pkg/scheduler/server/internal/serialize/serialize.go create mode 100644 tests/integration/framework/manifest/manifest.go create mode 100644 tests/integration/suite/daprd/jobs/kubernetes/namespace.go create mode 100644 tests/integration/suite/scheduler/kubernetes/namespace.go diff --git a/charts/dapr/charts/dapr_rbac/templates/scheduler.yaml b/charts/dapr/charts/dapr_rbac/templates/scheduler.yaml index 2d43a4631db..72edfef3800 100644 --- a/charts/dapr/charts/dapr_rbac/templates/scheduler.yaml +++ b/charts/dapr/charts/dapr_rbac/templates/scheduler.yaml @@ -21,7 +21,10 @@ metadata: {{- range $key, $value := .Values.global.k8sLabels }} {{ $key }}: {{ tpl $value $ }} {{- end }} -rules: [] +rules: + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["get", "list", "watch"] --- {{- if eq .Values.global.rbac.namespaced true }} kind: RoleBinding @@ -47,4 +50,4 @@ roleRef: kind: ClusterRole {{- end }} name: dapr-scheduler -{{- end }} \ No newline at end of file +{{- end }} diff --git a/cmd/scheduler/app/app.go b/cmd/scheduler/app/app.go index 2f1975c0d78..122550e0ac8 100644 --- a/cmd/scheduler/app/app.go +++ b/cmd/scheduler/app/app.go @@ -102,6 +102,7 @@ func Run() { DataDir: opts.EtcdDataDir, ReplicaCount: opts.ReplicaCount, ReplicaID: opts.ReplicaID, + KubeConfig: opts.KubeConfig, EtcdID: opts.ID, EtcdInitialPeers: opts.EtcdInitialPeers, EtcdClientPorts: opts.EtcdClientPorts, diff --git a/cmd/scheduler/options/options.go b/cmd/scheduler/options/options.go index e308279b5f6..8837ffd7fa1 100644 --- a/cmd/scheduler/options/options.go +++ b/cmd/scheduler/options/options.go @@ -42,6 +42,7 @@ type Options struct { SentryAddress string PlacementAddress string Mode string + KubeConfig *string ID string ReplicaID uint32 @@ -61,6 +62,7 @@ type Options struct { Metrics *metrics.FlagOptions taFile string + kubeconfig string etcdSpaceQuota string } @@ -83,6 +85,7 @@ func New(origArgs []string) (*Options, error) { fs.StringVar(&opts.taFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane") fs.StringVar(&opts.SentryAddress, "sentry-address", fmt.Sprintf("dapr-sentry.%s.svc:443", security.CurrentNamespace()), "Address of the Sentry service") fs.StringVar(&opts.Mode, "mode", string(modes.StandaloneMode), "Runtime mode for Dapr Scheduler") + fs.StringVar(&opts.kubeconfig, "kubeconfig", "", "Kubernetes mode only. Absolute path to the kubeconfig file.") fs.StringVar(&opts.ID, "id", "dapr-scheduler-server-0", "Scheduler server ID") fs.Uint32Var(&opts.ReplicaCount, "replica-count", 1, "The total number of scheduler replicas in the cluster") @@ -134,5 +137,12 @@ func New(origArgs []string) (*Options, error) { log.Warnf("--etcd-space-quota of %s may be too low for production use. Consider increasing the value to 16Gi or larger.", etcdSpaceQuota.String()) } + if fs.Changed("kubeconfig") { + if opts.Mode != string(modes.KubernetesMode) { + return nil, fmt.Errorf("kubeconfig flag is only valid in --mode=kubernetes") + } + opts.KubeConfig = &opts.kubeconfig + } + return &opts, nil } diff --git a/cmd/scheduler/options/options_test.go b/cmd/scheduler/options/options_test.go new file mode 100644 index 00000000000..b17479afb16 --- /dev/null +++ b/cmd/scheduler/options/options_test.go @@ -0,0 +1,57 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestNew(t *testing.T) { + t.Run("don't error if only using defaults", func(t *testing.T) { + _, err := New([]string{}) + require.NoError(t, err) + }) + + t.Run("error when kubeconfig is set and using defaults", func(t *testing.T) { + _, err := New([]string{ + "--kubeconfig=" + t.TempDir(), + }) + require.Error(t, err) + }) + + t.Run("don't error when mode set to kubernetes", func(t *testing.T) { + _, err := New([]string{ + "--mode=kubernetes", + }) + require.NoError(t, err) + }) + + t.Run("error when mode set to standalone and kubeconfig is set", func(t *testing.T) { + _, err := New([]string{ + "--mode=standalone", + "--kubeconfig=" + t.TempDir(), + }) + require.Error(t, err) + }) + + t.Run("don't error when mode set to kubernetes and kubeconfig is set", func(t *testing.T) { + _, err := New([]string{ + "--mode=kubernetes", + "--kubeconfig=" + t.TempDir(), + }) + require.NoError(t, err) + }) +} diff --git a/go.mod b/go.mod index 61ff61a94a6..924c119302e 100644 --- a/go.mod +++ b/go.mod @@ -492,6 +492,8 @@ replace ( // Needed due to a deprecated method used in functional tests replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 +replace github.com/diagridio/go-etcd-cron => github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e + // Uncomment for local development for testing with changes in the components-contrib && kit repositories. // Don't commit with this uncommented! // diff --git a/go.sum b/go.sum index c7533ce959e..4822f0bb339 100644 --- a/go.sum +++ b/go.sum @@ -1042,6 +1042,8 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e h1:sStHT4YuOotqyj5behRYAPGM9QdYXy1EiZXEmai0Nf4= +github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e/go.mod h1:yYzzG6/Qgq4jlRi/ZIri2zgKkxhghxiA8u7a4Q7tIYQ= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= diff --git a/pkg/operator/api/authz/authz.go b/pkg/operator/api/authz/authz.go index 610dfdac3f5..203773f78c5 100644 --- a/pkg/operator/api/authz/authz.go +++ b/pkg/operator/api/authz/authz.go @@ -15,6 +15,7 @@ package authz import ( "context" + "fmt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -31,7 +32,7 @@ func Request(ctx context.Context, namespace string) (*spiffe.Parsed, error) { } if len(namespace) == 0 || id.Namespace() != namespace { - return nil, status.New(codes.PermissionDenied, "identity does not match requested namespace").Err() + return nil, status.New(codes.PermissionDenied, fmt.Sprintf("identity does not match requested namespace exp=%s got=%s", namespace, id.Namespace())).Err() } return id, nil diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index 857a27195ea..d86f9cd75c5 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -18,47 +18,37 @@ import ( "errors" "fmt" "strings" - "time" "github.com/diagridio/go-etcd-cron/api" - "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/appengine/log" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/pkg/scheduler/monitoring" - "github.com/dapr/dapr/pkg/scheduler/server/internal" ) func (s *Server) ScheduleJob(ctx context.Context, req *schedulerv1pb.ScheduleJobRequest) (*schedulerv1pb.ScheduleJobResponse, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-s.readyCh: - } - - if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { - return nil, err - } - - jobName, err := buildJobName(req.GetName(), req.GetMetadata()) + cron, err := s.cron.Client(ctx) if err != nil { return nil, err } - meta, err := anypb.New(req.GetMetadata()) + serialized, err := s.serializer.FromRequest(ctx, req) if err != nil { return nil, err } - job := &api.Job{ - Schedule: req.GetJob().Schedule, //nolint:protogetter - DueTime: req.GetJob().DueTime, //nolint:protogetter - Ttl: req.GetJob().Ttl, //nolint:protogetter - Repeats: req.GetJob().Repeats, //nolint:protogetter - Metadata: meta, - Payload: req.GetJob().GetData(), + job := req.GetJob() + + apiJob := &api.Job{ + Schedule: job.Schedule, //nolint:protogetter + DueTime: job.DueTime, //nolint:protogetter + Ttl: job.Ttl, //nolint:protogetter + Repeats: job.Repeats, //nolint:protogetter + Metadata: serialized.Metadata(), + Payload: job.GetData(), } - err = s.cron.Add(ctx, jobName, job) + err = cron.Add(ctx, serialized.Name(), apiJob) if err != nil { log.Errorf("error scheduling job %s: %s", req.GetName(), err) return nil, err @@ -68,24 +58,19 @@ func (s *Server) ScheduleJob(ctx context.Context, req *schedulerv1pb.ScheduleJob } func (s *Server) DeleteJob(ctx context.Context, req *schedulerv1pb.DeleteJobRequest) (*schedulerv1pb.DeleteJobResponse, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-s.readyCh: - } - - if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { + cron, err := s.cron.Client(ctx) + if err != nil { return nil, err } - jobName, err := buildJobName(req.GetName(), req.GetMetadata()) + job, err := s.serializer.FromRequest(ctx, req) if err != nil { return nil, err } - err = s.cron.Delete(ctx, jobName) + err = cron.Delete(ctx, job.Name()) if err != nil { - log.Errorf("error deleting job %s: %s", jobName, err) + log.Errorf("error deleting job %s: %s", job.Name(), err) return nil, err } @@ -93,24 +78,19 @@ func (s *Server) DeleteJob(ctx context.Context, req *schedulerv1pb.DeleteJobRequ } func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) (*schedulerv1pb.GetJobResponse, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-s.readyCh: - } - - if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { + cron, err := s.cron.Client(ctx) + if err != nil { return nil, err } - jobName, err := buildJobName(req.GetName(), req.GetMetadata()) + serialized, err := s.serializer.FromRequest(ctx, req) if err != nil { return nil, err } - job, err := s.cron.Get(ctx, jobName) + job, err := cron.Get(ctx, serialized.Name()) if err != nil { - log.Errorf("error getting job %s: %s", jobName, err) + log.Errorf("error getting job %s: %s", serialized.Name(), err) return nil, err } @@ -173,20 +153,12 @@ func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsReques // WatchJobs sends jobs to Dapr sidecars upon component changes. func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error { - req, err := stream.Recv() + initial, err := s.serializer.FromWatch(stream) if err != nil { return err } - if req.GetInitial() == nil { - return errors.New("initial request is required on stream connection") - } - - if err := s.authz.Initial(stream.Context(), req.GetInitial()); err != nil { - return err - } - - s.connectionPool.Add(req.GetInitial(), stream) + s.connectionPool.Add(initial, stream) monitoring.RecordSidecarsConnectedCount(1) defer monitoring.RecordSidecarsConnectedCount(-1) @@ -197,69 +169,3 @@ func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error return stream.Context().Err() } } - -func (s *Server) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { - log.Debugf("Triggering job: %s", req.GetName()) - - ctx, cancel := context.WithTimeout(ctx, time.Second*45) - defer cancel() - - var meta schedulerv1pb.JobMetadata - if err := req.GetMetadata().UnmarshalTo(&meta); err != nil { - log.Errorf("Error unmarshalling metadata: %s", err) - return true - } - - idx := strings.LastIndex(req.GetName(), "||") - if idx == -1 || len(req.GetName()) <= idx+2 { - log.Errorf("Job name is malformed: %s", req.GetName()) - return true - } - - now := time.Now() - if err := s.connectionPool.Send(ctx, &internal.JobEvent{ - Name: req.GetName()[idx+2:], - Data: req.GetPayload(), - Metadata: &meta, - }); err != nil { - // TODO: add job to a queue or something to try later this should be - // another long running go routine that accepts this job on a channel - log.Errorf("Error sending job to connection stream: %s", err) - } - monitoring.RecordTriggerDuration(now) - - monitoring.RecordJobsTriggeredCount(&meta) - return true -} - -func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) { - switch t := meta.GetTarget(); t.GetType().(type) { - case *schedulerv1pb.JobTargetMetadata_Actor: - actor := t.GetActor() - return joinStrings("actorreminder", meta.GetNamespace(), actor.GetType(), actor.GetId(), name), nil - case *schedulerv1pb.JobTargetMetadata_Job: - return joinStrings("app", meta.GetNamespace(), meta.GetAppId(), name), nil - default: - return "", fmt.Errorf("unknown job type: %v", t) - } -} - -func buildJobPrefix(meta *schedulerv1pb.JobMetadata) (string, error) { - switch t := meta.GetTarget(); t.GetType().(type) { - case *schedulerv1pb.JobTargetMetadata_Actor: - actor := t.GetActor() - s := joinStrings("actorreminder", meta.GetNamespace(), actor.GetType()) - if len(actor.GetId()) > 0 { - s = joinStrings(s, actor.GetId()) - } - return s, nil - case *schedulerv1pb.JobTargetMetadata_Job: - return joinStrings("app", meta.GetNamespace(), meta.GetAppId()), nil - default: - return "", fmt.Errorf("unknown job type: %v", t) - } -} - -func joinStrings(ss ...string) string { - return strings.Join(ss, "||") -} diff --git a/pkg/scheduler/server/config_test.go b/pkg/scheduler/server/config_test.go new file mode 100644 index 00000000000..6e67f7f7fb9 --- /dev/null +++ b/pkg/scheduler/server/config_test.go @@ -0,0 +1,279 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "net/url" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/dapr/dapr/pkg/healthz" + "github.com/dapr/dapr/pkg/modes" +) + +func TestServerConf(t *testing.T) { + t.Run("KubernetesMode", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.KubernetesMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: []string{"id1=5003", "id2=5004"}, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) + + clientURL := url.URL{ + Scheme: "http", + Host: "0.0.0.0:5002", + } + + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + + clientHTTPURL := url.URL{ + Scheme: "http", + Host: "0.0.0.0:5004", + } + assert.Equal(t, clientHTTPURL, config.ListenClientHttpUrls[0]) + }) + + t.Run("StandaloneMode", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: []string{"id1=5003", "id2=5004"}, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) + if runtime.GOOS == "windows" { + assert.Equal(t, "data\\default-id2", config.Dir) + } else { + assert.Equal(t, "data/default-id2", config.Dir) + } + + clientURL := url.URL{ + Scheme: "http", + Host: "localhost:5002", + } + + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + + clientHTTPURL := url.URL{ + Scheme: "http", + Host: "localhost:5004", + } + assert.Equal(t, clientHTTPURL, config.ListenClientHttpUrls[0]) + }) + + t.Run("StandaloneMode without client http ports", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: nil, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) + + clientURL := url.URL{ + Scheme: "http", + Host: "localhost:5002", + } + + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + + assert.Empty(t, config.ListenClientHttpUrls) + }) + + t.Run("StandaloneMode listen on 0.0.0.0 when a host", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://hello1:5001", "id2=http://hello2:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: nil, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://hello1:5001,id2=http://hello2:5002", config.InitialCluster) + + clientURL := url.URL{ + Scheme: "http", + Host: "0.0.0.0:5002", + } + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + assert.Empty(t, config.ListenClientHttpUrls) + }) + + t.Run("StandaloneMode listen on IP when an IP", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://1.2.3.4:5001", "id2=http://1.2.3.4:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: nil, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://1.2.3.4:5001,id2=http://1.2.3.4:5002", config.InitialCluster) + + clientURL := url.URL{ + Scheme: "http", + Host: "1.2.3.4:5002", + } + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + assert.Empty(t, config.ListenClientHttpUrls) + }) + + t.Run("StandaloneMode listen on HTTP IP when an IP", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://1.2.3.4:5001", "id2=http://1.2.3.4:5002"}, + EtcdClientPorts: []string{"id1=5001", "id2=5002"}, + EtcdClientHTTPPorts: []string{"id1=5003", "id2=5004"}, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.NoError(t, err) + + assert.Equal(t, "id1=http://1.2.3.4:5001,id2=http://1.2.3.4:5002", config.InitialCluster) + + clientURL := url.URL{ + Scheme: "http", + Host: "1.2.3.4:5002", + } + assert.Equal(t, clientURL, config.ListenPeerUrls[0]) + assert.Equal(t, clientURL, config.ListenClientUrls[0]) + httpURL, err := url.Parse("http://1.2.3.4:5004") + require.NoError(t, err) + assert.Equal(t, []url.URL{*httpURL}, config.ListenClientHttpUrls) + }) + + t.Run("expect error when giving bad client ports", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://1.2.3.4:5001", "id2=http://1.2.3.4:5002"}, + EtcdClientPorts: []string{"id15001"}, + EtcdClientHTTPPorts: nil, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.Error(t, err) + assert.Nil(t, config) + }) + + t.Run("expect error when giving bad HTTP client ports", func(t *testing.T) { + config, err := config(Options{ + Security: nil, + ListenAddress: "", + Port: 0, + Mode: modes.StandaloneMode, + ReplicaCount: 0, + ReplicaID: 0, + DataDir: "./data", + EtcdID: "id2", + EtcdInitialPeers: []string{"id1=http://1.2.3.4:5001", "id2=http://1.2.3.4:5002"}, + EtcdClientPorts: []string{"id=5001"}, + EtcdClientHTTPPorts: []string{"id15001"}, + EtcdSpaceQuota: 0, + EtcdCompactionMode: "", + EtcdCompactionRetention: "", + Healthz: healthz.New(), + }) + require.Error(t, err) + assert.Nil(t, config) + }) +} diff --git a/pkg/scheduler/server/authz/authz.go b/pkg/scheduler/server/internal/authz/authz.go similarity index 95% rename from pkg/scheduler/server/authz/authz.go rename to pkg/scheduler/server/internal/authz/authz.go index c0e9ec3b0ab..00e87f41b88 100644 --- a/pkg/scheduler/server/authz/authz.go +++ b/pkg/scheduler/server/internal/authz/authz.go @@ -43,7 +43,7 @@ func (a *Authz) Metadata(ctx context.Context, meta *schedulerv1pb.JobMetadata) e return a.authz(ctx, meta.GetNamespace(), meta.GetAppId()) } -func (a *Authz) Initial(ctx context.Context, initial *schedulerv1pb.WatchJobsRequestInitial) error { +func (a *Authz) WatchInitial(ctx context.Context, initial *schedulerv1pb.WatchJobsRequestInitial) error { return a.authz(ctx, initial.GetNamespace(), initial.GetAppId()) } diff --git a/pkg/scheduler/server/authz/authz_test.go b/pkg/scheduler/server/internal/authz/authz_test.go similarity index 98% rename from pkg/scheduler/server/authz/authz_test.go rename to pkg/scheduler/server/internal/authz/authz_test.go index cc09f757909..16c6643b7dc 100644 --- a/pkg/scheduler/server/authz/authz_test.go +++ b/pkg/scheduler/server/internal/authz/authz_test.go @@ -184,14 +184,14 @@ func Test_Initial(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { a := New(Options{fake.New().WithMTLSEnabled(true)}) - err := a.Initial(test.ctx, test.initial) + err := a.WatchInitial(test.ctx, test.initial) assert.Equal(t, test.expCode != nil, err != nil, "%v %v", test.expCode, err) if test.expCode != nil { assert.Equal(t, *test.expCode, status.Code(err)) } a = New(Options{fake.New().WithMTLSEnabled(false)}) - err = a.Initial(test.ctx, test.initial) + err = a.WatchInitial(test.ctx, test.initial) assert.Equal(t, test.nonMTlSCode != nil, err != nil, "%v %v", test.nonMTlSCode, err) if test.nonMTlSCode != nil { assert.Equal(t, *test.nonMTlSCode, status.Code(err)) diff --git a/pkg/scheduler/server/internal/controller/controller.go b/pkg/scheduler/server/internal/controller/controller.go new file mode 100644 index 00000000000..ada5b3b7ebf --- /dev/null +++ b/pkg/scheduler/server/internal/controller/controller.go @@ -0,0 +1,110 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controller + +import ( + "context" + "fmt" + "os" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/builder" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + + "github.com/dapr/dapr/pkg/healthz" + "github.com/dapr/dapr/pkg/scheduler/server/internal/cron" + "github.com/dapr/kit/concurrency" + "github.com/dapr/kit/logger" +) + +var log = logger.NewLogger("dapr.scheduler.server.controller") + +type Options struct { + KubeConfig *string + Cron cron.Interface + Healthz healthz.Healthz +} + +func New(opts Options) (concurrency.Runner, error) { + scheme := runtime.NewScheme() + if err := corev1.AddToScheme(scheme); err != nil { + return nil, err + } + + var restConfig *rest.Config + var err error + if opts.KubeConfig != nil { + var kcf []byte + kcf, err = os.ReadFile(*opts.KubeConfig) + if err != nil { + return nil, fmt.Errorf("unable to read kubeconfig: %w", err) + } + + restConfig, err = clientcmd.RESTConfigFromKubeConfig(kcf) + if err != nil { + return nil, fmt.Errorf("unable to create rest config from kubeconfig %q: %w", *opts.KubeConfig, err) + } + } else { + restConfig, err = ctrl.GetConfig() + if err != nil { + return nil, err + } + } + + mgr, err := ctrl.NewManager(restConfig, ctrl.Options{ + Logger: logr.Discard(), + Scheme: scheme, + HealthProbeBindAddress: "0", + Metrics: metricsserver.Options{BindAddress: "0"}, + LeaderElectionID: "scheduler.dapr.io", + LeaderElectionReleaseOnCancel: true, + }) + if err != nil { + return nil, fmt.Errorf("unable to start manager: %w", err) + } + + if err := ctrl.NewControllerManagedBy(mgr). + Named("namespaces"). + For(new(corev1.Namespace), builder.OnlyMetadata). + Complete(&namespace{ + nsReader: mgr.GetCache(), + cron: opts.Cron, + }); err != nil { + return nil, fmt.Errorf("unable to complete controller: %w", err) + } + + hzTarget := opts.Healthz.AddTarget() + + return concurrency.NewRunnerManager( + mgr.Start, + func(ctx context.Context) error { + _, err := mgr.GetCache().GetInformer(ctx, new(corev1.Namespace)) + if err != nil { + return fmt.Errorf("unable to get informer: %w", err) + } + if !mgr.GetCache().WaitForCacheSync(ctx) { + return fmt.Errorf("unable to sync cache") + } + hzTarget.Ready() + log.Info("Controller ready") + <-ctx.Done() + return nil + }, + ).Run, nil +} diff --git a/pkg/scheduler/server/internal/controller/namespace.go b/pkg/scheduler/server/internal/controller/namespace.go new file mode 100644 index 00000000000..a66eaf6ed2a --- /dev/null +++ b/pkg/scheduler/server/internal/controller/namespace.go @@ -0,0 +1,56 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controller + +import ( + "context" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/dapr/dapr/pkg/scheduler/server/internal/cron" + "github.com/dapr/dapr/pkg/scheduler/server/internal/serialize" +) + +type namespace struct { + cron cron.Interface + nsReader client.Reader +} + +func (n *namespace) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + log.Debugf("Reconciling namespace %s", req.Name) + + cronClient, err := n.cron.Client(ctx) + if err != nil { + log.Errorf("Failed to get etcd cron client: %s", err) + return ctrl.Result{}, err + } + + var ns corev1.Namespace + err = n.nsReader.Get(ctx, client.ObjectKey{Name: req.Name}, &ns) + if !apierrors.IsNotFound(err) { + return ctrl.Result{}, err + } + + log.Infof("Deleting jobs from deleted namespace %s", req.Name) + err = cronClient.DeletePrefixes(ctx, serialize.PrefixesFromNamespace(req.Name)...) + if err != nil { + log.Errorf("Failed to delete cron jobs for namespace %s: %s", req.Name, err) + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil +} diff --git a/pkg/scheduler/server/internal/controller/namespace_test.go b/pkg/scheduler/server/internal/controller/namespace_test.go new file mode 100644 index 00000000000..a0a3106a2f4 --- /dev/null +++ b/pkg/scheduler/server/internal/controller/namespace_test.go @@ -0,0 +1,98 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package controller + +import ( + "context" + "testing" + + etcdcron "github.com/diagridio/go-etcd-cron" + etcdcronfake "github.com/diagridio/go-etcd-cron/fake" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + ctrl "sigs.k8s.io/controller-runtime" + clientfake "sigs.k8s.io/controller-runtime/pkg/client/fake" + + cronfake "github.com/dapr/dapr/pkg/scheduler/server/internal/cron/fake" +) + +func Test_Reconcile(t *testing.T) { + tests := map[string]struct { + ns *corev1.Namespace + cronClientError error + deletePError error + expErr error + expDeletePrefixes []string + }{ + "etcd cron client returns error, should return error": { + cronClientError: assert.AnError, + ns: &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test-ns"}}, + expErr: assert.AnError, + }, + "namespace exists, do nothing": { + ns: &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test-ns"}}, + }, + "namespace doesn't exist, should delete prefixes": { + expDeletePrefixes: []string{"actorreminder||test-ns", "app||test-ns"}, + }, + "error on deleting prefix should error": { + deletePError: assert.AnError, + expDeletePrefixes: []string{"actorreminder||test-ns", "app||test-ns"}, + expErr: assert.AnError, + }, + "different namespace, should still delete prefixes": { + ns: &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "different-ns"}}, + expDeletePrefixes: []string{"actorreminder||test-ns", "app||test-ns"}, + }, + } + + req := ctrl.Request{NamespacedName: types.NamespacedName{Name: "test-ns"}} + for name, test := range tests { + test := test + t.Run(name, func(t *testing.T) { + t.Parallel() + + var prefixCalled []string + cron := cronfake.New().WithClient(func(context.Context) (etcdcron.Interface, error) { + etcdcron := etcdcronfake.New().WithDeletePrefixes(func(_ context.Context, prefixes ...string) error { + prefixCalled = append(prefixCalled, prefixes...) + return test.deletePError + }) + return etcdcron, test.cronClientError + }) + + scheme := runtime.NewScheme() + require.NoError(t, corev1.AddToScheme(scheme)) + + nsReaderBuilder := clientfake.NewClientBuilder().WithScheme(scheme) + if test.ns != nil { + nsReaderBuilder.WithObjects(test.ns) + } + + nsctrl := &namespace{ + cron: cron, + nsReader: nsReaderBuilder.Build(), + } + + result, err := nsctrl.Reconcile(context.Background(), req) + assert.Equal(t, ctrl.Result{}, result) + assert.Equal(t, test.expErr, err) + assert.ElementsMatch(t, test.expDeletePrefixes, prefixCalled) + }) + } +} diff --git a/pkg/scheduler/server/internal/cron/cron.go b/pkg/scheduler/server/internal/cron/cron.go new file mode 100644 index 00000000000..8226d67e9f1 --- /dev/null +++ b/pkg/scheduler/server/internal/cron/cron.go @@ -0,0 +1,184 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cron + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + etcdcron "github.com/diagridio/go-etcd-cron" + "github.com/diagridio/go-etcd-cron/api" + clientv3 "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/server/v3/embed" + + "github.com/dapr/dapr/pkg/healthz" + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/pkg/scheduler/server/internal/pool" + "github.com/dapr/kit/concurrency" + "github.com/dapr/kit/logger" +) + +var log = logger.NewLogger("dapr.scheduler.server.cron") + +type Options struct { + ReplicaCount uint32 + ReplicaID uint32 + Config *embed.Config + ConnectionPool *pool.Pool + Healthz healthz.Healthz +} + +// Interface manages the cron framework, exposing a client to schedule jobs. +type Interface interface { + // Run starts the cron server, blocking until the context is canceled. + Run(ctx context.Context) error + + // Client returns a client to schedule jobs with the underlying cron + // framework and database. Blocks until Etcd and the Cron library are ready. + Client(ctx context.Context) (etcdcron.Interface, error) +} + +type cron struct { + replicaCount uint32 + replicaID uint32 + + config *embed.Config + connectionPool *pool.Pool + etcdcron etcdcron.Interface + + readyCh chan struct{} + hzETCD healthz.Target +} + +func New(opts Options) Interface { + return &cron{ + replicaCount: opts.ReplicaCount, + replicaID: opts.ReplicaID, + config: opts.Config, + connectionPool: opts.ConnectionPool, + readyCh: make(chan struct{}), + hzETCD: opts.Healthz.AddTarget(), + } +} + +func (c *cron) Run(ctx context.Context) error { + defer c.hzETCD.NotReady() + + log.Info("Starting etcd") + + etcd, err := embed.StartEtcd(c.config) + if err != nil { + return err + } + defer etcd.Close() + + select { + case <-etcd.Server.ReadyNotify(): + log.Info("Etcd server is ready!") + case <-ctx.Done(): + return ctx.Err() + } + + log.Info("Starting EtcdCron") + + endpoints := make([]string, 0, len(etcd.Clients)) + for _, peer := range etcd.Clients { + endpoints = append(endpoints, peer.Addr().String()) + } + + client, err := clientv3.New(clientv3.Config{ + Endpoints: endpoints, + }) + if err != nil { + return err + } + + // pass in initial cluster endpoints, but with client ports + c.etcdcron, err = etcdcron.New(etcdcron.Options{ + Client: client, + Namespace: "dapr", + PartitionID: c.replicaID, + PartitionTotal: c.replicaCount, + TriggerFn: c.triggerJob, + }) + if err != nil { + return fmt.Errorf("fail to create etcd-cron: %s", err) + } + close(c.readyCh) + + c.hzETCD.Ready() + + return concurrency.NewRunnerManager( + func(ctx context.Context) error { + if err := c.etcdcron.Run(ctx); !errors.Is(err, context.DeadlineExceeded) { + return err + } + return nil + }, + func(ctx context.Context) error { + defer log.Info("EtcdCron shutting down") + select { + case err := <-etcd.Err(): + return err + case <-ctx.Done(): + return nil + } + }, + ).Run(ctx) +} + +// Client returns the Cron client, blocking until Etcd and the Cron library are +// ready. +func (c *cron) Client(ctx context.Context) (etcdcron.Interface, error) { + select { + case <-c.readyCh: + return c.etcdcron, nil + case <-ctx.Done(): + return nil, ctx.Err() + } +} + +func (c *cron) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { + log.Debugf("Triggering job: %s", req.GetName()) + + ctx, cancel := context.WithTimeout(ctx, time.Second*45) + defer cancel() + + var meta schedulerv1pb.JobMetadata + if err := req.GetMetadata().UnmarshalTo(&meta); err != nil { + log.Errorf("Error unmarshalling metadata: %s", err) + return true + } + + idx := strings.LastIndex(req.GetName(), "||") + if idx == -1 || len(req.GetName()) <= idx+2 { + log.Errorf("Job name is malformed: %s", req.GetName()) + return true + } + + if err := c.connectionPool.Send(ctx, &pool.JobEvent{ + Name: req.GetName()[idx+2:], + Data: req.GetPayload(), + Metadata: &meta, + }); err != nil { + // TODO: add job to a queue or something to try later this should be + // another long running go routine that accepts this job on a channel + log.Errorf("Error sending job to connection stream: %s", err) + } + + return true +} diff --git a/pkg/scheduler/server/internal/cron/fake/fake.go b/pkg/scheduler/server/internal/cron/fake/fake.go new file mode 100644 index 00000000000..6704a201c9d --- /dev/null +++ b/pkg/scheduler/server/internal/cron/fake/fake.go @@ -0,0 +1,55 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "context" + + etcdcron "github.com/diagridio/go-etcd-cron" +) + +type Fake struct { + runFn func(context.Context) error + clientFn func(context.Context) (etcdcron.Interface, error) +} + +func New() *Fake { + return &Fake{ + runFn: func(ctx context.Context) error { + <-ctx.Done() + return ctx.Err() + }, + clientFn: func(context.Context) (etcdcron.Interface, error) { + return nil, nil + }, + } +} + +func (f *Fake) WithRun(fn func(context.Context) error) *Fake { + f.runFn = fn + return f +} + +func (f *Fake) WithClient(fn func(context.Context) (etcdcron.Interface, error)) *Fake { + f.clientFn = fn + return f +} + +func (f *Fake) Run(ctx context.Context) error { + return f.runFn(ctx) +} + +func (f *Fake) Client(ctx context.Context) (etcdcron.Interface, error) { + return f.clientFn(ctx) +} diff --git a/pkg/scheduler/server/internal/cron/fake/fake_test.go b/pkg/scheduler/server/internal/cron/fake/fake_test.go new file mode 100644 index 00000000000..0af043d20d6 --- /dev/null +++ b/pkg/scheduler/server/internal/cron/fake/fake_test.go @@ -0,0 +1,24 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "testing" + + "github.com/dapr/dapr/pkg/scheduler/server/internal/cron" +) + +func Test_Fake(t *testing.T) { + var _ cron.Interface = new(Fake) +} diff --git a/pkg/scheduler/server/internal/conn.go b/pkg/scheduler/server/internal/pool/conn.go similarity index 99% rename from pkg/scheduler/server/internal/conn.go rename to pkg/scheduler/server/internal/pool/conn.go index 450c69d647e..b5dbe80d53a 100644 --- a/pkg/scheduler/server/internal/conn.go +++ b/pkg/scheduler/server/internal/pool/conn.go @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package internal +package pool import ( "context" diff --git a/pkg/scheduler/server/internal/pool.go b/pkg/scheduler/server/internal/pool/pool.go similarity index 99% rename from pkg/scheduler/server/internal/pool.go rename to pkg/scheduler/server/internal/pool/pool.go index e9efd4e6a76..f7d90bfc40e 100644 --- a/pkg/scheduler/server/internal/pool.go +++ b/pkg/scheduler/server/internal/pool/pool.go @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package internal +package pool import ( "context" @@ -52,7 +52,7 @@ type JobEvent struct { Metadata *schedulerv1pb.JobMetadata } -func NewPool() *Pool { +func New() *Pool { return &Pool{ nsPool: make(map[string]*namespacedPool), closeCh: make(chan struct{}), diff --git a/pkg/scheduler/server/internal/serialize/names.go b/pkg/scheduler/server/internal/serialize/names.go new file mode 100644 index 00000000000..8bece16e960 --- /dev/null +++ b/pkg/scheduler/server/internal/serialize/names.go @@ -0,0 +1,21 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serialize + +func PrefixesFromNamespace(namespace string) []string { + return []string{ + "actorreminder||" + namespace, + "app||" + namespace, + } +} diff --git a/pkg/scheduler/server/internal/serialize/serialize.go b/pkg/scheduler/server/internal/serialize/serialize.go new file mode 100644 index 00000000000..fd9495cd8ab --- /dev/null +++ b/pkg/scheduler/server/internal/serialize/serialize.go @@ -0,0 +1,116 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serialize + +import ( + "context" + "errors" + "fmt" + "strings" + + "google.golang.org/protobuf/types/known/anypb" + + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/pkg/scheduler/server/internal/authz" + "github.com/dapr/dapr/pkg/security" +) + +type Options struct { + Security security.Handler +} + +type Serializer struct { + authz *authz.Authz +} + +type Request interface { + GetName() string + GetMetadata() *schedulerv1pb.JobMetadata +} + +type Job struct { + name string + meta *anypb.Any +} + +func New(opts Options) *Serializer { + return &Serializer{ + authz: authz.New(authz.Options{ + Security: opts.Security, + }), + } +} + +func (s *Serializer) FromRequest(ctx context.Context, req Request) (*Job, error) { + if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { + return nil, err + } + + meta, err := anypb.New(req.GetMetadata()) + if err != nil { + return nil, err + } + + name, err := buildJobName(req.GetName(), req.GetMetadata()) + if err != nil { + return nil, err + } + + return &Job{ + meta: meta, + name: name, + }, nil +} + +func (s *Serializer) FromWatch(stream schedulerv1pb.Scheduler_WatchJobsServer) (*schedulerv1pb.WatchJobsRequestInitial, error) { + req, err := stream.Recv() + if err != nil { + return nil, err + } + + initial := req.GetInitial() + if initial == nil { + return nil, errors.New("initial request is required on stream connection") + } + + if err := s.authz.WatchInitial(stream.Context(), initial); err != nil { + return nil, err + } + + return initial, nil +} + +func (j *Job) Name() string { + return j.name +} + +func (j *Job) Metadata() *anypb.Any { + return j.meta +} + +func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) { + joinStrings := func(ss ...string) string { + return strings.Join(ss, "||") + } + + switch t := meta.GetTarget(); t.GetType().(type) { + case *schedulerv1pb.JobTargetMetadata_Actor: + actor := t.GetActor() + return joinStrings("actorreminder", meta.GetNamespace(), actor.GetType(), actor.GetId(), name), nil + case *schedulerv1pb.JobTargetMetadata_Job: + return joinStrings("app", meta.GetNamespace(), meta.GetAppId(), name), nil + default: + return "", fmt.Errorf("unknown job type: %v", t) + } +} diff --git a/pkg/scheduler/server/server.go b/pkg/scheduler/server/server.go index dd95f3c9be0..9990db14bf4 100644 --- a/pkg/scheduler/server/server.go +++ b/pkg/scheduler/server/server.go @@ -22,17 +22,22 @@ import ( "sync" "sync/atomic" +<<<<<<< HEAD "github.com/diagridio/go-etcd-cron/api" "github.com/diagridio/go-etcd-cron/cron" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/server/v3/embed" +======= +>>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) "google.golang.org/grpc" "github.com/dapr/dapr/pkg/healthz" "github.com/dapr/dapr/pkg/modes" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" - "github.com/dapr/dapr/pkg/scheduler/server/authz" - "github.com/dapr/dapr/pkg/scheduler/server/internal" + "github.com/dapr/dapr/pkg/scheduler/server/internal/controller" + "github.com/dapr/dapr/pkg/scheduler/server/internal/cron" + "github.com/dapr/dapr/pkg/scheduler/server/internal/pool" + "github.com/dapr/dapr/pkg/scheduler/server/internal/serialize" "github.com/dapr/dapr/pkg/security" "github.com/dapr/kit/concurrency" "github.com/dapr/kit/logger" @@ -46,6 +51,7 @@ type Options struct { ListenAddress string Port int Mode modes.DaprMode + KubeConfig *string ReplicaCount uint32 ReplicaID uint32 DataDir string @@ -65,21 +71,24 @@ type Options struct { type Server struct { listenAddress string port int - replicaCount uint32 - replicaID uint32 sec security.Handler +<<<<<<< HEAD authz *authz.Authz config *embed.Config cron api.Interface connectionPool *internal.Pool // Connection pool for sidecars +======= + serializer *serialize.Serializer + cron cron.Interface + connectionPool *pool.Pool // Connection pool for sidecars + controller concurrency.Runner +>>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) hzAPIServer healthz.Target - hzETCD healthz.Target wg sync.WaitGroup running atomic.Bool - readyCh chan struct{} closeCh chan struct{} } @@ -90,21 +99,41 @@ func New(opts Options) (*Server, error) { return nil, err } + connectionPool := pool.New() + + cron := cron.New(cron.Options{ + ReplicaCount: opts.ReplicaCount, + ReplicaID: opts.ReplicaID, + ConnectionPool: connectionPool, + Config: config, + Healthz: opts.Healthz, + }) + + var ctrl concurrency.Runner + if opts.Mode == modes.KubernetesMode { + var err error + ctrl, err = controller.New(controller.Options{ + KubeConfig: opts.KubeConfig, + Cron: cron, + Healthz: opts.Healthz, + }) + if err != nil { + return nil, err + } + } + return &Server{ - port: opts.Port, - listenAddress: opts.ListenAddress, - replicaCount: opts.ReplicaCount, - replicaID: opts.ReplicaID, - sec: opts.Security, - authz: authz.New(authz.Options{ + port: opts.Port, + listenAddress: opts.ListenAddress, + sec: opts.Security, + connectionPool: connectionPool, + controller: ctrl, + cron: cron, + serializer: serialize.New(serialize.Options{ Security: opts.Security, }), - config: config, - connectionPool: internal.NewPool(), - readyCh: make(chan struct{}), - closeCh: make(chan struct{}), - hzAPIServer: opts.Healthz.AddTarget(), - hzETCD: opts.Healthz.AddTarget(), + closeCh: make(chan struct{}), + hzAPIServer: opts.Healthz.AddTarget(), }, nil } @@ -115,17 +144,23 @@ func (s *Server) Run(ctx context.Context) error { log.Info("Dapr Scheduler is starting...") - defer s.wg.Wait() - return concurrency.NewRunnerManager( + runners := []concurrency.Runner{ s.connectionPool.Run, s.runServer, - s.runEtcdCron, + s.cron.Run, func(ctx context.Context) error { <-ctx.Done() close(s.closeCh) return nil }, - ).Run(ctx) + } + + if s.controller != nil { + runners = append(runners, s.controller) + } + + defer s.wg.Wait() + return concurrency.NewRunnerManager(runners...).Run(ctx) } func (s *Server) runServer(ctx context.Context) error { @@ -162,6 +197,7 @@ func (s *Server) runServer(ctx context.Context) error { }, ).Run(ctx) } +<<<<<<< HEAD func (s *Server) runEtcdCron(ctx context.Context) error { defer s.hzETCD.NotReady() @@ -229,3 +265,5 @@ func (s *Server) runEtcdCron(ctx context.Context) error { }, ).Run(ctx) } +======= +>>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) diff --git a/pkg/scheduler/server/server_test.go b/pkg/scheduler/server/server_test.go index ffe7de18aef..4b1126f4008 100644 --- a/pkg/scheduler/server/server_test.go +++ b/pkg/scheduler/server/server_test.go @@ -14,15 +14,10 @@ limitations under the License. package server import ( - "net/url" - "runtime" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/dapr/dapr/pkg/healthz" - "github.com/dapr/dapr/pkg/modes" ) func TestParseClientPorts(t *testing.T) { @@ -65,209 +60,3 @@ func TestParseClientPorts(t *testing.T) { assert.Equal(t, "5001", clientPorts["scheduler1"]) }) } - -func TestServerConf(t *testing.T) { - t.Run("KubernetesMode", func(t *testing.T) { - opts := Options{ - Security: nil, - ListenAddress: "", - Port: 0, - Mode: modes.KubernetesMode, - ReplicaCount: 0, - ReplicaID: 0, - DataDir: "", - EtcdID: "id2", - EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, - EtcdClientPorts: []string{"id1=5001", "id2=5002"}, - EtcdClientHTTPPorts: []string{"id1=5003", "id2=5004"}, - EtcdSpaceQuota: 0, - EtcdCompactionMode: "", - EtcdCompactionRetention: "", - Healthz: healthz.New(), - } - - s, err := New(opts) - if err != nil { - t.Fatalf("failed to create server: %s", err) - } - - config := s.config - - assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) - - clientURL := url.URL{ - Scheme: "http", - Host: "0.0.0.0:5002", - } - - assert.Equal(t, clientURL, config.ListenPeerUrls[0]) - assert.Equal(t, clientURL, config.ListenClientUrls[0]) - - clientHTTPURL := url.URL{ - Scheme: "http", - Host: "0.0.0.0:5004", - } - assert.Equal(t, clientHTTPURL, config.ListenClientHttpUrls[0]) - }) - - t.Run("StandaloneMode", func(t *testing.T) { - opts := Options{ - Security: nil, - ListenAddress: "", - Port: 0, - Mode: modes.StandaloneMode, - ReplicaCount: 0, - ReplicaID: 0, - DataDir: "./data", - EtcdID: "id2", - EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, - EtcdClientPorts: []string{"id1=5001", "id2=5002"}, - EtcdClientHTTPPorts: []string{"id1=5003", "id2=5004"}, - EtcdSpaceQuota: 0, - EtcdCompactionMode: "", - EtcdCompactionRetention: "", - Healthz: healthz.New(), - } - - s, err := New(opts) - if err != nil { - t.Fatalf("failed to create server: %s", err) - } - - config := s.config - - assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) - if runtime.GOOS == "windows" { - assert.Equal(t, "data\\default-id2", config.Dir) - } else { - assert.Equal(t, "data/default-id2", config.Dir) - } - - clientURL := url.URL{ - Scheme: "http", - Host: "localhost:5002", - } - - assert.Equal(t, clientURL, config.ListenPeerUrls[0]) - assert.Equal(t, clientURL, config.ListenClientUrls[0]) - - clientHTTPURL := url.URL{ - Scheme: "http", - Host: "localhost:5004", - } - assert.Equal(t, clientHTTPURL, config.ListenClientHttpUrls[0]) - }) - - t.Run("StandaloneMode without client http ports", func(t *testing.T) { - opts := Options{ - Security: nil, - ListenAddress: "", - Port: 0, - Mode: modes.StandaloneMode, - ReplicaCount: 0, - ReplicaID: 0, - DataDir: "./data", - EtcdID: "id2", - EtcdInitialPeers: []string{"id1=http://localhost:5001", "id2=http://localhost:5002"}, - EtcdClientPorts: []string{"id1=5001", "id2=5002"}, - EtcdClientHTTPPorts: nil, - EtcdSpaceQuota: 0, - EtcdCompactionMode: "", - EtcdCompactionRetention: "", - Healthz: healthz.New(), - } - - s, err := New(opts) - if err != nil { - t.Fatalf("failed to create server: %s", err) - } - - config := s.config - - assert.Equal(t, "id1=http://localhost:5001,id2=http://localhost:5002", config.InitialCluster) - - clientURL := url.URL{ - Scheme: "http", - Host: "localhost:5002", - } - - assert.Equal(t, clientURL, config.ListenPeerUrls[0]) - assert.Equal(t, clientURL, config.ListenClientUrls[0]) - - assert.Empty(t, config.ListenClientHttpUrls) - }) - - t.Run("StandaloneMode listen on 0.0.0.0 when a host", func(t *testing.T) { - opts := Options{ - Security: nil, - ListenAddress: "", - Port: 0, - Mode: modes.StandaloneMode, - ReplicaCount: 0, - ReplicaID: 0, - DataDir: "./data", - EtcdID: "id2", - EtcdInitialPeers: []string{"id1=http://hello1:5001", "id2=http://hello2:5002"}, - EtcdClientPorts: []string{"id1=5001", "id2=5002"}, - EtcdClientHTTPPorts: nil, - EtcdSpaceQuota: 0, - EtcdCompactionMode: "", - EtcdCompactionRetention: "", - Healthz: healthz.New(), - } - - s, err := New(opts) - if err != nil { - t.Fatalf("failed to create server: %s", err) - } - - config := s.config - - assert.Equal(t, "id1=http://hello1:5001,id2=http://hello2:5002", config.InitialCluster) - - clientURL := url.URL{ - Scheme: "http", - Host: "0.0.0.0:5002", - } - assert.Equal(t, clientURL, config.ListenPeerUrls[0]) - assert.Equal(t, clientURL, config.ListenClientUrls[0]) - assert.Empty(t, config.ListenClientHttpUrls) - }) - - t.Run("StandaloneMode listen on IP when an IP", func(t *testing.T) { - opts := Options{ - Security: nil, - ListenAddress: "", - Port: 0, - Mode: modes.StandaloneMode, - ReplicaCount: 0, - ReplicaID: 0, - DataDir: "./data", - EtcdID: "id2", - EtcdInitialPeers: []string{"id1=http://1.2.3.4:5001", "id2=http://1.2.3.4:5002"}, - EtcdClientPorts: []string{"id1=5001", "id2=5002"}, - EtcdClientHTTPPorts: nil, - EtcdSpaceQuota: 0, - EtcdCompactionMode: "", - EtcdCompactionRetention: "", - Healthz: healthz.New(), - } - - s, err := New(opts) - if err != nil { - t.Fatalf("failed to create server: %s", err) - } - - config := s.config - - assert.Equal(t, "id1=http://1.2.3.4:5001,id2=http://1.2.3.4:5002", config.InitialCluster) - - clientURL := url.URL{ - Scheme: "http", - Host: "1.2.3.4:5002", - } - assert.Equal(t, clientURL, config.ListenPeerUrls[0]) - assert.Equal(t, clientURL, config.ListenClientUrls[0]) - assert.Empty(t, config.ListenClientHttpUrls) - }) -} diff --git a/tests/integration/framework/manifest/manifest.go b/tests/integration/framework/manifest/manifest.go new file mode 100644 index 00000000000..7fd202a76ff --- /dev/null +++ b/tests/integration/framework/manifest/manifest.go @@ -0,0 +1,36 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package manifest + +import ( + apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/dapr/dapr/pkg/apis/common" + compapi "github.com/dapr/dapr/pkg/apis/components/v1alpha1" +) + +func ActorInMemoryStateComponent(ns, name string) compapi.Component { + return compapi.Component{ + TypeMeta: metav1.TypeMeta{Kind: "Component", APIVersion: "dapr.io/v1alpha1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: ns, Name: name}, + Spec: compapi.ComponentSpec{ + Type: "state.in-memory", + Version: "v1", + Metadata: []common.NameValuePair{ + {Name: "actorStateStore", Value: common.DynamicValue{JSON: apiextv1.JSON{Raw: []byte(`"true"`)}}}, + }, + }, + } +} diff --git a/tests/integration/framework/process/daprd/daprd.go b/tests/integration/framework/process/daprd/daprd.go index 4d7d9a60928..9b96f312936 100644 --- a/tests/integration/framework/process/daprd/daprd.go +++ b/tests/integration/framework/process/daprd/daprd.go @@ -473,3 +473,11 @@ func (d *Daprd) meta(t assert.TestingT, ctx context.Context) metaResponse { return meta } + +func (d *Daprd) ActorInvokeURL(actorType, actorID, method string) string { + return fmt.Sprintf("http://%s/v1.0/actors/%s/%s/method/%s", d.HTTPAddress(), actorType, actorID, method) +} + +func (d *Daprd) ActorReminderURL(actorType, actorID, method string) string { + return fmt.Sprintf("http://%s/v1.0/actors/%s/%s/reminders/%s", d.HTTPAddress(), actorType, actorID, method) +} diff --git a/tests/integration/framework/process/kubernetes/informer/informer.go b/tests/integration/framework/process/kubernetes/informer/informer.go index c563c870c46..f8d40f236b0 100644 --- a/tests/integration/framework/process/kubernetes/informer/informer.go +++ b/tests/integration/framework/process/kubernetes/informer/informer.go @@ -74,9 +74,15 @@ func (i *Informer) Handler(t *testing.T, wrapped http.Handler) http.HandlerFunc split = split[2:] } if split[0] == "namespaces" { - split = split[2:] + if len(split) > 1 { + split = split[2:] + gvk.Kind = split[0] + } else { + gvk.Kind = "Namespace" + } + } else { + gvk.Kind = split[0] } - gvk.Kind = split[0] w.Header().Add("Transfer-Encoding", "chunked") w.Header().Add("Content-Type", "application/json") @@ -147,6 +153,8 @@ func (i *Informer) objToGVK(t *testing.T, obj runtime.Object) schema.GroupVersio return schema.GroupVersionKind{Group: "", Version: "v1", Kind: "secrets"} case *corev1.ConfigMap: return schema.GroupVersionKind{Group: "", Version: "v1", Kind: "configmaps"} + case *corev1.Namespace: + return schema.GroupVersionKind{Group: "", Version: "v1", Kind: "namespaces"} default: require.Fail(t, "unknown type: %T", obj) return schema.GroupVersionKind{} diff --git a/tests/integration/framework/process/kubernetes/options.go b/tests/integration/framework/process/kubernetes/options.go index f9b4fa98c09..176b7fc41d6 100644 --- a/tests/integration/framework/process/kubernetes/options.go +++ b/tests/integration/framework/process/kubernetes/options.go @@ -86,6 +86,10 @@ func WithClusterDaprSubscriptionV2ListFromStore(t *testing.T, store *store.Store return handleClusterListResourceFromStore(t, "/apis/dapr.io/v2alpha1/subscriptions", store) } +func WithClusterNamespaceListFromStore(t *testing.T, store *store.Store) Option { + return handleClusterListResourceFromStore(t, "/api/v1/namespaces", store) +} + func WithClusterDaprHTTPEndpointList(t *testing.T, endpoints *httpendapi.HTTPEndpointList) Option { return handleClusterListResource(t, "/apis/dapr.io/v1alpha1/httpendpoints", endpoints) } @@ -110,6 +114,10 @@ func WithClusterServiceAccountList(t *testing.T, services *corev1.ServiceAccount return handleClusterListResource(t, "/api/v1/serviceaccounts", services) } +func WithClusterNamespaceList(t *testing.T, namespaces *corev1.NamespaceList) Option { + return handleClusterListResource(t, "/api/v1/namespaces", namespaces) +} + func WithDaprConfigurationGet(t *testing.T, config *configapi.Configuration) Option { return handleGetResource(t, "/apis/dapr.io/v1alpha1", "configurations", config.Namespace, config.Name, config) } @@ -155,6 +163,7 @@ func WithBaseOperatorAPI(t *testing.T, td spiffeid.TrustDomain, ns string, sentr WithClusterDaprSubscriptionListV2(t, &subv2api.SubscriptionList{TypeMeta: metav1.TypeMeta{APIVersion: "dapr.io/v2alpha1", Kind: "SubscriptionList"}}), WithClusterDaprHTTPEndpointList(t, &httpendapi.HTTPEndpointList{TypeMeta: metav1.TypeMeta{APIVersion: "dapr.io/v1alpha1", Kind: "HTTPEndpointList"}}), WithClusterDaprResiliencyList(t, &resapi.ResiliencyList{TypeMeta: metav1.TypeMeta{APIVersion: "dapr.io/v1alpha1", Kind: "ResiliencyList"}}), + WithClusterNamespaceList(t, &corev1.NamespaceList{TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "NamespaceList"}}), } { op(o) } diff --git a/tests/integration/framework/process/kubernetes/store/store.go b/tests/integration/framework/process/kubernetes/store/store.go index f6635520523..9d914187002 100644 --- a/tests/integration/framework/process/kubernetes/store/store.go +++ b/tests/integration/framework/process/kubernetes/store/store.go @@ -45,6 +45,17 @@ func (s *Store) Add(objs ...client.Object) { } } +func (s *Store) Delete(objs ...client.Object) { + s.lock.Lock() + defer s.lock.Unlock() + if s.objs == nil { + s.objs = make(map[string]client.Object) + } + for _, obj := range objs { + delete(s.objs, obj.GetNamespace()+"/"+obj.GetName()) + } +} + func (s *Store) Set(objs ...client.Object) { s.lock.Lock() defer s.lock.Unlock() diff --git a/tests/integration/framework/process/placement/options.go b/tests/integration/framework/process/placement/options.go index cb0f21ceef6..1ee7fc8ff78 100644 --- a/tests/integration/framework/process/placement/options.go +++ b/tests/integration/framework/process/placement/options.go @@ -13,7 +13,13 @@ limitations under the License. package placement -import "github.com/dapr/dapr/tests/integration/framework/process/exec" +import ( + "testing" + + "github.com/dapr/dapr/tests/integration/framework/process/exec" + "github.com/dapr/dapr/tests/integration/framework/process/sentry" + "github.com/dapr/kit/ptr" +) // Option is a function that configures the process. type Option func(*options) @@ -91,6 +97,14 @@ func WithSentryAddress(sentryAddress string) Option { } } +func WithSentry(t *testing.T, sentry *sentry.Sentry) Option { + return func(o *options) { + o.tlsEnabled = true + o.sentryAddress = ptr.Of(sentry.Address()) + o.trustAnchorsFile = ptr.Of(sentry.TrustAnchorsFile(t)) + } +} + func WithTrustAnchorsFile(file string) Option { return func(o *options) { o.trustAnchorsFile = &file diff --git a/tests/integration/framework/process/scheduler/options.go b/tests/integration/framework/process/scheduler/options.go index 2c2fabc0f78..184c48eb248 100644 --- a/tests/integration/framework/process/scheduler/options.go +++ b/tests/integration/framework/process/scheduler/options.go @@ -37,6 +37,8 @@ type options struct { listenAddress string sentry *sentry.Sentry dataDir *string + kubeconfig *string + mode *string } func WithExecOptions(execOptions ...exec.Option) Option { @@ -123,3 +125,15 @@ func WithDataDir(dataDir string) Option { o.dataDir = &dataDir } } + +func WithKubeconfig(kubeconfig string) Option { + return func(o *options) { + o.kubeconfig = &kubeconfig + } +} + +func WithMode(mode string) Option { + return func(o *options) { + o.mode = &mode + } +} diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 7e4cea0ed7d..4a2008cfc6c 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -127,6 +127,13 @@ func New(t *testing.T, fopts ...Option) *Scheduler { ) } + if opts.kubeconfig != nil { + args = append(args, "--kubeconfig="+*opts.kubeconfig) + } + if opts.mode != nil { + args = append(args, "--mode="+*opts.mode) + } + clientPorts := make(map[string]string) for _, input := range opts.etcdClientPorts { idAndPort := strings.Split(input, "=") @@ -336,12 +343,12 @@ func (s *Scheduler) Metrics(t *testing.T, ctx context.Context) map[string]float6 return metrics } -func (s *Scheduler) EtcdClient(t *testing.T) *clientv3.Client { +func (s *Scheduler) ETCDClient(t *testing.T) *clientv3.Client { t.Helper() client, err := clientv3.New(clientv3.Config{ - Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, - DialTimeout: 15 * time.Second, + Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, + DialTimeout: 40 * time.Second, }) require.NoError(t, err) diff --git a/tests/integration/suite/actors/reminders/scheduler/basic.go b/tests/integration/suite/actors/reminders/scheduler/basic.go index e95ebc424f6..b3d3717d8c6 100644 --- a/tests/integration/suite/actors/reminders/scheduler/basic.go +++ b/tests/integration/suite/actors/reminders/scheduler/basic.go @@ -15,7 +15,6 @@ package scheduler import ( "context" - "fmt" "net/http" "os" "path/filepath" @@ -96,9 +95,8 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { client := client.HTTP(t) - daprdURL := fmt.Sprintf("http://%s/v1.0/actors/myactortype/myactorid", b.daprd.HTTPAddress()) - - req, err := http.NewRequestWithContext(ctx, http.MethodPost, daprdURL+"/method/foo", nil) + aurl := b.daprd.ActorInvokeURL("myactortype", "myactorid", "foo") + req, err := http.NewRequestWithContext(ctx, http.MethodPost, aurl, nil) require.NoError(t, err) require.EventuallyWithT(t, func(c *assert.CollectT) { @@ -110,7 +108,8 @@ func (b *basic) Run(t *testing.T, ctx context.Context) { }, time.Second*10, time.Millisecond*10, "actor not ready in time") body := `{"dueTime": "1s", "data": "reminderdata"}` - req, err = http.NewRequestWithContext(ctx, http.MethodPost, daprdURL+"/reminders/remindermethod", strings.NewReader(body)) + aurl = b.daprd.ActorReminderURL("myactortype", "myactorid", "remindermethod") + req, err = http.NewRequestWithContext(ctx, http.MethodPost, aurl, strings.NewReader(body)) require.NoError(t, err) resp, err := client.Do(req) diff --git a/tests/integration/suite/daprd/jobs/jobs.go b/tests/integration/suite/daprd/jobs/jobs.go index dedf3a74775..a9c09733fe3 100644 --- a/tests/integration/suite/daprd/jobs/jobs.go +++ b/tests/integration/suite/daprd/jobs/jobs.go @@ -16,5 +16,6 @@ package jobs import ( _ "github.com/dapr/dapr/tests/integration/suite/daprd/jobs/grpc" _ "github.com/dapr/dapr/tests/integration/suite/daprd/jobs/http" + _ "github.com/dapr/dapr/tests/integration/suite/daprd/jobs/kubernetes" _ "github.com/dapr/dapr/tests/integration/suite/daprd/jobs/streaming" ) diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go new file mode 100644 index 00000000000..76663465afa --- /dev/null +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -0,0 +1,152 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + "context" + "net/http" + "testing" + "time" + + "github.com/spiffe/go-spiffe/v2/spiffeid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + clientv3 "go.etcd.io/etcd/client/v3" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + compapi "github.com/dapr/dapr/pkg/apis/components/v1alpha1" + configapi "github.com/dapr/dapr/pkg/apis/configuration/v1alpha1" + rtv1 "github.com/dapr/dapr/pkg/proto/runtime/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/manifest" + "github.com/dapr/dapr/tests/integration/framework/process/daprd" + "github.com/dapr/dapr/tests/integration/framework/process/http/app" + "github.com/dapr/dapr/tests/integration/framework/process/kubernetes" + "github.com/dapr/dapr/tests/integration/framework/process/kubernetes/store" + "github.com/dapr/dapr/tests/integration/framework/process/operator" + "github.com/dapr/dapr/tests/integration/framework/process/placement" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/framework/process/sentry" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" +) + +func init() { + suite.Register(new(namespace)) +} + +type namespace struct { + store *store.Store + daprd *daprd.Daprd + scheduler *scheduler.Scheduler +} + +func (n *namespace) Setup(t *testing.T) []framework.Option { + sentry := sentry.New(t) + + app := app.New(t, + app.WithConfig(`{"entities": ["myactortype"]}`), + app.WithHandlerFunc("/actors/myactortype/myactorid/method/foo", func(http.ResponseWriter, *http.Request) {}), + ) + + n.store = store.New(metav1.GroupVersionKind{ + Version: "v1", + Kind: "Namespace", + }) + n.store.Add(&corev1.Namespace{ + TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }) + + kubeapi := kubernetes.New(t, + kubernetes.WithBaseOperatorAPI(t, spiffeid.RequireTrustDomainFromString("localhost"), "default", sentry.Port()), + kubernetes.WithClusterDaprConfigurationList(t, &configapi.ConfigurationList{ + Items: []configapi.Configuration{{ + ObjectMeta: metav1.ObjectMeta{Namespace: "default", Name: "schedulerreminders"}, + Spec: configapi.ConfigurationSpec{ + Features: []configapi.FeatureSpec{{Name: "SchedulerReminders", Enabled: ptr.Of(true)}}, + }, + }}, + }), + kubernetes.WithClusterDaprComponentList(t, &compapi.ComponentList{ + Items: []compapi.Component{manifest.ActorInMemoryStateComponent("default", "foo")}, + }), + kubernetes.WithClusterNamespaceListFromStore(t, n.store), + ) + + n.scheduler = scheduler.New(t, + scheduler.WithSentry(sentry), + scheduler.WithKubeconfig(kubeapi.KubeconfigPath(t)), + scheduler.WithMode("kubernetes"), + ) + + operator := operator.New(t, + operator.WithNamespace("default"), + operator.WithKubeconfigPath(kubeapi.KubeconfigPath(t)), + operator.WithTrustAnchorsFile(sentry.TrustAnchorsFile(t)), + ) + + placement := placement.New(t, placement.WithSentry(t, sentry)) + + n.daprd = daprd.New(t, + daprd.WithMode("kubernetes"), + daprd.WithNamespace("default"), + daprd.WithSentry(t, sentry), + daprd.WithSchedulerAddresses(n.scheduler.Address()), + daprd.WithAppPort(app.Port()), + daprd.WithDisableK8sSecretStore(true), + daprd.WithControlPlaneAddress(operator.Address()), + daprd.WithPlacementAddresses(placement.Address()), + daprd.WithConfigs("schedulerreminders"), + ) + + return []framework.Option{ + framework.WithProcesses(app, sentry, kubeapi, n.scheduler, placement, operator, n.daprd), + } +} + +func (n *namespace) Run(t *testing.T, ctx context.Context) { + n.daprd.WaitUntilRunning(t, ctx) + + client := n.daprd.GRPCClient(t, ctx) + _, err := client.ScheduleJobAlpha1(ctx, &rtv1.ScheduleJobRequest{ + Job: &rtv1.Job{Name: "test", Schedule: ptr.Of("@daily")}, + }) + require.NoError(t, err) + + _, err = client.RegisterActorReminder(ctx, &rtv1.RegisterActorReminderRequest{ + Name: "test", + DueTime: "1000s", + ActorType: "myactortype", + ActorId: "myactorid", + }) + require.NoError(t, err) + + etcdClient := n.scheduler.ETCDClient(t).KV + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Len(t, resp.Kvs, 2) + + n.store.Delete(&corev1.Namespace{ + TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }) + + assert.EventuallyWithT(t, func(c *assert.CollectT) { + resp, err = etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Empty(c, resp.Kvs) + }, time.Second*10, 10*time.Millisecond) +} diff --git a/tests/integration/suite/scheduler/kubernetes/namespace.go b/tests/integration/suite/scheduler/kubernetes/namespace.go new file mode 100644 index 00000000000..789ae6c5e00 --- /dev/null +++ b/tests/integration/suite/scheduler/kubernetes/namespace.go @@ -0,0 +1,125 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + clientv3 "go.etcd.io/etcd/client/v3" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/tests/integration/framework" + "github.com/dapr/dapr/tests/integration/framework/process/kubernetes" + "github.com/dapr/dapr/tests/integration/framework/process/kubernetes/store" + "github.com/dapr/dapr/tests/integration/framework/process/scheduler" + "github.com/dapr/dapr/tests/integration/framework/process/sentry" + "github.com/dapr/dapr/tests/integration/suite" + "github.com/dapr/kit/ptr" +) + +func init() { + suite.Register(new(namespace)) +} + +type namespace struct { + sentry *sentry.Sentry + scheduler *scheduler.Scheduler + store *store.Store +} + +func (n *namespace) Setup(t *testing.T) []framework.Option { + n.sentry = sentry.New(t) + + n.store = store.New(metav1.GroupVersionKind{ + Version: "v1", + Kind: "Namespace", + }) + n.store.Add(&corev1.Namespace{ + TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }) + + kubeapi := kubernetes.New(t, + kubernetes.WithClusterNamespaceListFromStore(t, n.store), + ) + + n.scheduler = scheduler.New(t, + scheduler.WithSentry(n.sentry), + scheduler.WithKubeconfig(kubeapi.KubeconfigPath(t)), + scheduler.WithMode("kubernetes"), + ) + + return []framework.Option{ + framework.WithProcesses(n.sentry, kubeapi, n.scheduler), + } +} + +func (n *namespace) Run(t *testing.T, ctx context.Context) { + n.sentry.WaitUntilRunning(t, ctx) + n.scheduler.WaitUntilRunning(t, ctx) + + client := n.scheduler.ClientMTLS(t, ctx, "myapp") + + _, err := client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ + Name: "testJob", + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@daily")}, + Metadata: &schedulerv1pb.JobMetadata{ + AppId: "myapp", + Namespace: "default", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }, + }, + }) + require.NoError(t, err) + + _, err = client.ScheduleJob(ctx, &schedulerv1pb.ScheduleJobRequest{ + Name: "testJob", + Job: &schedulerv1pb.Job{Schedule: ptr.Of("@daily")}, + Metadata: &schedulerv1pb.JobMetadata{ + AppId: "myapp", + Namespace: "default", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{Id: "test", Type: "test"}, + }, + }, + }, + }) + require.NoError(t, err) + + etcdClient := n.scheduler.ETCDClient(t).KV + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Len(t, resp.Kvs, 2) + + n.store.Delete(&corev1.Namespace{ + TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }) + + assert.EventuallyWithT(t, func(c *assert.CollectT) { + resp, err = etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Empty(c, resp.Kvs) + }, time.Second*10, 10*time.Millisecond) +} diff --git a/tests/integration/suite/scheduler/scheduler.go b/tests/integration/suite/scheduler/scheduler.go index a7899fdaf02..5e61c59e293 100644 --- a/tests/integration/suite/scheduler/scheduler.go +++ b/tests/integration/suite/scheduler/scheduler.go @@ -17,6 +17,7 @@ import ( _ "github.com/dapr/dapr/tests/integration/suite/scheduler/api" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/authz" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/helm" + _ "github.com/dapr/dapr/tests/integration/suite/scheduler/kubernetes" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/metrics" _ "github.com/dapr/dapr/tests/integration/suite/scheduler/quorum" ) From ef21d2515367e437d07f04b8b3c0e4dd36d67f49 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Sun, 8 Sep 2024 17:34:23 +0100 Subject: [PATCH 098/112] Fix namespace controller integration tests Signed-off-by: joshvanl --- .../server/internal/controller/controller.go | 3 +- .../process/kubernetes/informer/informer.go | 2 +- .../suite/daprd/jobs/kubernetes/namespace.go | 36 +++++++++---------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/pkg/scheduler/server/internal/controller/controller.go b/pkg/scheduler/server/internal/controller/controller.go index ada5b3b7ebf..85c9d8352d7 100644 --- a/pkg/scheduler/server/internal/controller/controller.go +++ b/pkg/scheduler/server/internal/controller/controller.go @@ -24,7 +24,6 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/builder" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "github.com/dapr/dapr/pkg/healthz" @@ -81,7 +80,7 @@ func New(opts Options) (concurrency.Runner, error) { if err := ctrl.NewControllerManagedBy(mgr). Named("namespaces"). - For(new(corev1.Namespace), builder.OnlyMetadata). + For(new(corev1.Namespace)). Complete(&namespace{ nsReader: mgr.GetCache(), cron: opts.Cron, diff --git a/tests/integration/framework/process/kubernetes/informer/informer.go b/tests/integration/framework/process/kubernetes/informer/informer.go index f8d40f236b0..b6fb5c12807 100644 --- a/tests/integration/framework/process/kubernetes/informer/informer.go +++ b/tests/integration/framework/process/kubernetes/informer/informer.go @@ -78,7 +78,7 @@ func (i *Informer) Handler(t *testing.T, wrapped http.Handler) http.HandlerFunc split = split[2:] gvk.Kind = split[0] } else { - gvk.Kind = "Namespace" + gvk.Kind = "namespaces" } } else { gvk.Kind = split[0] diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index 76663465afa..9f5f3925213 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -34,7 +34,6 @@ import ( "github.com/dapr/dapr/tests/integration/framework/process/daprd" "github.com/dapr/dapr/tests/integration/framework/process/http/app" "github.com/dapr/dapr/tests/integration/framework/process/kubernetes" - "github.com/dapr/dapr/tests/integration/framework/process/kubernetes/store" "github.com/dapr/dapr/tests/integration/framework/process/operator" "github.com/dapr/dapr/tests/integration/framework/process/placement" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" @@ -48,9 +47,10 @@ func init() { } type namespace struct { - store *store.Store daprd *daprd.Daprd scheduler *scheduler.Scheduler + placement *placement.Placement + kubeapi *kubernetes.Kubernetes } func (n *namespace) Setup(t *testing.T) []framework.Option { @@ -61,16 +61,7 @@ func (n *namespace) Setup(t *testing.T) []framework.Option { app.WithHandlerFunc("/actors/myactortype/myactorid/method/foo", func(http.ResponseWriter, *http.Request) {}), ) - n.store = store.New(metav1.GroupVersionKind{ - Version: "v1", - Kind: "Namespace", - }) - n.store.Add(&corev1.Namespace{ - TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, - ObjectMeta: metav1.ObjectMeta{Name: "default"}, - }) - - kubeapi := kubernetes.New(t, + n.kubeapi = kubernetes.New(t, kubernetes.WithBaseOperatorAPI(t, spiffeid.RequireTrustDomainFromString("localhost"), "default", sentry.Port()), kubernetes.WithClusterDaprConfigurationList(t, &configapi.ConfigurationList{ Items: []configapi.Configuration{{ @@ -83,22 +74,27 @@ func (n *namespace) Setup(t *testing.T) []framework.Option { kubernetes.WithClusterDaprComponentList(t, &compapi.ComponentList{ Items: []compapi.Component{manifest.ActorInMemoryStateComponent("default", "foo")}, }), - kubernetes.WithClusterNamespaceListFromStore(t, n.store), + kubernetes.WithClusterNamespaceList(t, &corev1.NamespaceList{ + Items: []corev1.Namespace{{ + TypeMeta: metav1.TypeMeta{Kind: "Namespace", APIVersion: "v1"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }}, + }), ) n.scheduler = scheduler.New(t, scheduler.WithSentry(sentry), - scheduler.WithKubeconfig(kubeapi.KubeconfigPath(t)), + scheduler.WithKubeconfig(n.kubeapi.KubeconfigPath(t)), scheduler.WithMode("kubernetes"), ) operator := operator.New(t, operator.WithNamespace("default"), - operator.WithKubeconfigPath(kubeapi.KubeconfigPath(t)), + operator.WithKubeconfigPath(n.kubeapi.KubeconfigPath(t)), operator.WithTrustAnchorsFile(sentry.TrustAnchorsFile(t)), ) - placement := placement.New(t, placement.WithSentry(t, sentry)) + n.placement = placement.New(t, placement.WithSentry(t, sentry)) n.daprd = daprd.New(t, daprd.WithMode("kubernetes"), @@ -108,17 +104,19 @@ func (n *namespace) Setup(t *testing.T) []framework.Option { daprd.WithAppPort(app.Port()), daprd.WithDisableK8sSecretStore(true), daprd.WithControlPlaneAddress(operator.Address()), - daprd.WithPlacementAddresses(placement.Address()), + daprd.WithPlacementAddresses(n.placement.Address()), daprd.WithConfigs("schedulerreminders"), ) return []framework.Option{ - framework.WithProcesses(app, sentry, kubeapi, n.scheduler, placement, operator, n.daprd), + framework.WithProcesses(app, sentry, n.kubeapi, n.scheduler, n.placement, operator, n.daprd), } } func (n *namespace) Run(t *testing.T, ctx context.Context) { n.daprd.WaitUntilRunning(t, ctx) + n.scheduler.WaitUntilRunning(t, ctx) + n.placement.WaitUntilRunning(t, ctx) client := n.daprd.GRPCClient(t, ctx) _, err := client.ScheduleJobAlpha1(ctx, &rtv1.ScheduleJobRequest{ @@ -139,7 +137,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) assert.Len(t, resp.Kvs, 2) - n.store.Delete(&corev1.Namespace{ + n.kubeapi.Informer().Delete(t, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, ObjectMeta: metav1.ObjectMeta{Name: "default"}, }) From ebf1c69dc86274ff2c2c00a56b245dd74b5cd85d Mon Sep 17 00:00:00 2001 From: joshvanl Date: Mon, 9 Sep 2024 22:48:22 +0100 Subject: [PATCH 099/112] Adds Eventually for getting KV for reminder registration Signed-off-by: joshvanl --- .../suite/daprd/jobs/kubernetes/namespace.go | 10 ++++++---- .../suite/scheduler/kubernetes/namespace.go | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index 9f5f3925213..09d4d168bcf 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -133,9 +133,11 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) etcdClient := n.scheduler.ETCDClient(t).KV - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) - require.NoError(t, err) - assert.Len(t, resp.Kvs, 2) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Len(c, resp.Kvs, 2) + }, time.Second*10, 10*time.Millisecond) n.kubeapi.Informer().Delete(t, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, @@ -143,7 +145,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err = etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) diff --git a/tests/integration/suite/scheduler/kubernetes/namespace.go b/tests/integration/suite/scheduler/kubernetes/namespace.go index 789ae6c5e00..2cdc9e985c3 100644 --- a/tests/integration/suite/scheduler/kubernetes/namespace.go +++ b/tests/integration/suite/scheduler/kubernetes/namespace.go @@ -108,9 +108,11 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { require.NoError(t, err) etcdClient := n.scheduler.ETCDClient(t).KV - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) - require.NoError(t, err) - assert.Len(t, resp.Kvs, 2) + assert.EventuallyWithT(t, func(c *assert.CollectT) { + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + require.NoError(t, err) + assert.Len(c, resp.Kvs, 2) + }, time.Second*10, 10*time.Millisecond) n.store.Delete(&corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, @@ -118,7 +120,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err = etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) From 91ac8c24060bac9cffff84efcd5fa22a0af44323 Mon Sep 17 00:00:00 2001 From: Fabian Martinez <46371672+famarting@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:26:08 +0200 Subject: [PATCH 100/112] add keepalives to public api grpc server (#8204) Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com> --- pkg/api/grpc/server.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pkg/api/grpc/server.go b/pkg/api/grpc/server.go index 82a002e0c43..af943b7d7b4 100644 --- a/pkg/api/grpc/server.go +++ b/pkg/api/grpc/server.go @@ -111,6 +111,32 @@ var ( // NewAPIServer returns a new user facing gRPC API server. func NewAPIServer(opts Options) Server { apiServerInfoLogger.SetOutputLevel(logger.LogLevel("info")) + + // This is equivalent to "infinity" time (see: https://github.com/grpc/grpc-go/blob/master/internal/transport/defaults.go) + const infinity = time.Duration(math.MaxInt64) + + serverOpts := []grpcGo.ServerOption{ + grpcGo.KeepaliveEnforcementPolicy(grpcKeepalive.EnforcementPolicy{ + // If a client pings more than once every 8s, terminate the connection + MinTime: 8 * time.Second, + // Allow pings even when there are no active streams + PermitWithoutStream: true, + }), + grpcGo.KeepaliveParams(grpcKeepalive.ServerParameters{ + // Do not set a max age + MaxConnectionAge: infinity, + // Do not forcefully close connections if there are pending RPCs + MaxConnectionAgeGrace: infinity, + // If a client is idle for 3m, send a GOAWAY + // This is equivalent to the max idle time set in the client + MaxConnectionIdle: 3 * time.Minute, + // Ping the client if it is idle for 10s to ensure the connection is still active + Time: 10 * time.Second, + // Wait 5s for the ping ack before assuming the connection is dead + Timeout: 5 * time.Second, + }), + } + return &server{ api: opts.API, config: opts.Config, @@ -125,6 +151,7 @@ func NewAPIServer(opts Options) Server { workflowEngine: opts.WorkflowEngine, htarget: opts.Healthz.AddTarget(), closeCh: make(chan struct{}), + grpcServerOpts: serverOpts, } } From fd7457f4de0970aa37470c8bf81455a9254ba70d Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 10 Sep 2024 15:46:51 +0100 Subject: [PATCH 101/112] Update diagridio/go-etcd-cron to v0.3.0 Signed-off-by: joshvanl --- go.mod | 3 +- go.sum | 4 +- pkg/scheduler/server/api.go | 14 +--- .../internal/controller/namespace_test.go | 6 +- pkg/scheduler/server/internal/cron/cron.go | 8 +- .../server/internal/cron/fake/fake.go | 10 +-- .../server/internal/serialize/serialize.go | 28 ++++++- pkg/scheduler/server/server.go | 84 ------------------- .../framework/process/scheduler/scheduler.go | 2 +- 9 files changed, 44 insertions(+), 115 deletions(-) diff --git a/go.mod b/go.mod index 924c119302e..35274102a3d 100644 --- a/go.mod +++ b/go.mod @@ -68,6 +68,7 @@ require ( golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/net v0.29.0 golang.org/x/sync v0.8.0 + google.golang.org/appengine v1.6.8 google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 google.golang.org/grpc v1.67.0 @@ -492,8 +493,6 @@ replace ( // Needed due to a deprecated method used in functional tests replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4 -replace github.com/diagridio/go-etcd-cron => github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e - // Uncomment for local development for testing with changes in the components-contrib && kit repositories. // Don't commit with this uncommented! // diff --git a/go.sum b/go.sum index 4822f0bb339..6d0c5c7f2b5 100644 --- a/go.sum +++ b/go.sum @@ -1042,8 +1042,6 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e h1:sStHT4YuOotqyj5behRYAPGM9QdYXy1EiZXEmai0Nf4= -github.com/joshvanl/go-etcd-cron v0.0.0-20240901031816-5173b9308d3e/go.mod h1:yYzzG6/Qgq4jlRi/ZIri2zgKkxhghxiA8u7a4Q7tIYQ= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -2274,6 +2272,8 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/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= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/pkg/scheduler/server/api.go b/pkg/scheduler/server/api.go index d86f9cd75c5..a200208823d 100644 --- a/pkg/scheduler/server/api.go +++ b/pkg/scheduler/server/api.go @@ -20,7 +20,6 @@ import ( "strings" "github.com/diagridio/go-etcd-cron/api" - "google.golang.org/appengine/log" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/pkg/scheduler/monitoring" @@ -111,22 +110,17 @@ func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) ( } func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error) { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-s.readyCh: - } - - if err := s.authz.Metadata(ctx, req.GetMetadata()); err != nil { + cron, err := s.cron.Client(ctx) + if err != nil { return nil, err } - prefix, err := buildJobPrefix(req.GetMetadata()) + prefix, err := s.serializer.PrefixFromList(ctx, req.GetMetadata()) if err != nil { return nil, err } - list, err := s.cron.List(ctx, prefix) + list, err := cron.List(ctx, prefix) if err != nil { return nil, fmt.Errorf("failed to query job list: %w", err) } diff --git a/pkg/scheduler/server/internal/controller/namespace_test.go b/pkg/scheduler/server/internal/controller/namespace_test.go index a0a3106a2f4..51d5a899a30 100644 --- a/pkg/scheduler/server/internal/controller/namespace_test.go +++ b/pkg/scheduler/server/internal/controller/namespace_test.go @@ -17,8 +17,8 @@ import ( "context" "testing" - etcdcron "github.com/diagridio/go-etcd-cron" - etcdcronfake "github.com/diagridio/go-etcd-cron/fake" + "github.com/diagridio/go-etcd-cron/cron" + etcdcronfake "github.com/diagridio/go-etcd-cron/tests/fake" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" @@ -68,7 +68,7 @@ func Test_Reconcile(t *testing.T) { t.Parallel() var prefixCalled []string - cron := cronfake.New().WithClient(func(context.Context) (etcdcron.Interface, error) { + cron := cronfake.New().WithClient(func(context.Context) (cron.Interface, error) { etcdcron := etcdcronfake.New().WithDeletePrefixes(func(_ context.Context, prefixes ...string) error { prefixCalled = append(prefixCalled, prefixes...) return test.deletePError diff --git a/pkg/scheduler/server/internal/cron/cron.go b/pkg/scheduler/server/internal/cron/cron.go index 8226d67e9f1..71869813f66 100644 --- a/pkg/scheduler/server/internal/cron/cron.go +++ b/pkg/scheduler/server/internal/cron/cron.go @@ -20,8 +20,8 @@ import ( "strings" "time" - etcdcron "github.com/diagridio/go-etcd-cron" "github.com/diagridio/go-etcd-cron/api" + etcdcron "github.com/diagridio/go-etcd-cron/cron" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/server/v3/embed" @@ -49,7 +49,7 @@ type Interface interface { // Client returns a client to schedule jobs with the underlying cron // framework and database. Blocks until Etcd and the Cron library are ready. - Client(ctx context.Context) (etcdcron.Interface, error) + Client(ctx context.Context) (api.Interface, error) } type cron struct { @@ -58,7 +58,7 @@ type cron struct { config *embed.Config connectionPool *pool.Pool - etcdcron etcdcron.Interface + etcdcron api.Interface readyCh chan struct{} hzETCD healthz.Target @@ -143,7 +143,7 @@ func (c *cron) Run(ctx context.Context) error { // Client returns the Cron client, blocking until Etcd and the Cron library are // ready. -func (c *cron) Client(ctx context.Context) (etcdcron.Interface, error) { +func (c *cron) Client(ctx context.Context) (api.Interface, error) { select { case <-c.readyCh: return c.etcdcron, nil diff --git a/pkg/scheduler/server/internal/cron/fake/fake.go b/pkg/scheduler/server/internal/cron/fake/fake.go index 6704a201c9d..041acb12a69 100644 --- a/pkg/scheduler/server/internal/cron/fake/fake.go +++ b/pkg/scheduler/server/internal/cron/fake/fake.go @@ -16,12 +16,12 @@ package fake import ( "context" - etcdcron "github.com/diagridio/go-etcd-cron" + "github.com/diagridio/go-etcd-cron/api" ) type Fake struct { runFn func(context.Context) error - clientFn func(context.Context) (etcdcron.Interface, error) + clientFn func(context.Context) (api.Interface, error) } func New() *Fake { @@ -30,7 +30,7 @@ func New() *Fake { <-ctx.Done() return ctx.Err() }, - clientFn: func(context.Context) (etcdcron.Interface, error) { + clientFn: func(context.Context) (api.Interface, error) { return nil, nil }, } @@ -41,7 +41,7 @@ func (f *Fake) WithRun(fn func(context.Context) error) *Fake { return f } -func (f *Fake) WithClient(fn func(context.Context) (etcdcron.Interface, error)) *Fake { +func (f *Fake) WithClient(fn func(context.Context) (api.Interface, error)) *Fake { f.clientFn = fn return f } @@ -50,6 +50,6 @@ func (f *Fake) Run(ctx context.Context) error { return f.runFn(ctx) } -func (f *Fake) Client(ctx context.Context) (etcdcron.Interface, error) { +func (f *Fake) Client(ctx context.Context) (api.Interface, error) { return f.clientFn(ctx) } diff --git a/pkg/scheduler/server/internal/serialize/serialize.go b/pkg/scheduler/server/internal/serialize/serialize.go index fd9495cd8ab..6b28e4bb93b 100644 --- a/pkg/scheduler/server/internal/serialize/serialize.go +++ b/pkg/scheduler/server/internal/serialize/serialize.go @@ -73,6 +73,26 @@ func (s *Serializer) FromRequest(ctx context.Context, req Request) (*Job, error) }, nil } +func (s *Serializer) PrefixFromList(ctx context.Context, req *schedulerv1pb.JobMetadata) (string, error) { + if err := s.authz.Metadata(ctx, req); err != nil { + return "", err + } + + switch t := req.GetTarget(); t.GetType().(type) { + case *schedulerv1pb.JobTargetMetadata_Actor: + actor := t.GetActor() + s := joinStrings("actorreminder", req.GetNamespace(), actor.GetType()) + if len(actor.GetId()) > 0 { + s = joinStrings(s, actor.GetId()) + } + return s, nil + case *schedulerv1pb.JobTargetMetadata_Job: + return joinStrings("app", req.GetNamespace(), req.GetAppId()), nil + default: + return "", fmt.Errorf("unknown job type: %v", t) + } +} + func (s *Serializer) FromWatch(stream schedulerv1pb.Scheduler_WatchJobsServer) (*schedulerv1pb.WatchJobsRequestInitial, error) { req, err := stream.Recv() if err != nil { @@ -100,10 +120,6 @@ func (j *Job) Metadata() *anypb.Any { } func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) { - joinStrings := func(ss ...string) string { - return strings.Join(ss, "||") - } - switch t := meta.GetTarget(); t.GetType().(type) { case *schedulerv1pb.JobTargetMetadata_Actor: actor := t.GetActor() @@ -114,3 +130,7 @@ func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) return "", fmt.Errorf("unknown job type: %v", t) } } + +func joinStrings(ss ...string) string { + return strings.Join(ss, "||") +} diff --git a/pkg/scheduler/server/server.go b/pkg/scheduler/server/server.go index 9990db14bf4..b06ed0ec337 100644 --- a/pkg/scheduler/server/server.go +++ b/pkg/scheduler/server/server.go @@ -22,13 +22,6 @@ import ( "sync" "sync/atomic" -<<<<<<< HEAD - "github.com/diagridio/go-etcd-cron/api" - "github.com/diagridio/go-etcd-cron/cron" - clientv3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/server/v3/embed" -======= ->>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) "google.golang.org/grpc" "github.com/dapr/dapr/pkg/healthz" @@ -73,17 +66,10 @@ type Server struct { port int sec security.Handler -<<<<<<< HEAD - authz *authz.Authz - config *embed.Config - cron api.Interface - connectionPool *internal.Pool // Connection pool for sidecars -======= serializer *serialize.Serializer cron cron.Interface connectionPool *pool.Pool // Connection pool for sidecars controller concurrency.Runner ->>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) hzAPIServer healthz.Target @@ -197,73 +183,3 @@ func (s *Server) runServer(ctx context.Context) error { }, ).Run(ctx) } -<<<<<<< HEAD - -func (s *Server) runEtcdCron(ctx context.Context) error { - defer s.hzETCD.NotReady() - - log.Info("Starting etcd") - - etcd, err := embed.StartEtcd(s.config) - if err != nil { - return err - } - defer etcd.Close() - - select { - case <-etcd.Server.ReadyNotify(): - log.Info("Etcd server is ready!") - case <-ctx.Done(): - return ctx.Err() - } - - log.Info("Starting EtcdCron") - - endpoints := make([]string, 0, len(etcd.Clients)) - for _, peer := range etcd.Clients { - endpoints = append(endpoints, peer.Addr().String()) - } - - client, err := clientv3.New(clientv3.Config{ - Endpoints: endpoints, - MaxCallRecvMsgSize: math.MaxInt32, - }) - if err != nil { - return err - } - - // pass in initial cluster endpoints, but with client ports - s.cron, err = cron.New(cron.Options{ - Client: client, - Namespace: "dapr", - PartitionID: s.replicaID, - PartitionTotal: s.replicaCount, - TriggerFn: s.triggerJob, - }) - if err != nil { - return fmt.Errorf("fail to create etcd-cron: %s", err) - } - close(s.readyCh) - - s.hzETCD.Ready() - - return concurrency.NewRunnerManager( - func(ctx context.Context) error { - if err := s.cron.Run(ctx); !errors.Is(err, context.DeadlineExceeded) { - return err - } - return nil - }, - func(ctx context.Context) error { - defer log.Info("EtcdCron shutting down") - select { - case err := <-etcd.Err(): - return err - case <-ctx.Done(): - return nil - } - }, - ).Run(ctx) -} -======= ->>>>>>> 4735e839d (Scheduler: Adds Kubernetes namespace controller) diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 4a2008cfc6c..132ab77e81d 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -361,7 +361,7 @@ func (s *Scheduler) ETCDClient(t *testing.T) *clientv3.Client { func (s *Scheduler) EtcdJobs(t *testing.T, ctx context.Context) []*mvccpb.KeyValue { t.Helper() - resp, err := s.EtcdClient(t).KV.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := s.ETCDClient(t).KV.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) require.NoError(t, err) return resp.Kvs } From 5df95cbc194fe3620cc04df8fd4df658ec99ce70 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 18 Sep 2024 15:40:33 +0100 Subject: [PATCH 102/112] Increase timeout for job be in Etcd Signed-off-by: joshvanl --- tests/integration/suite/daprd/jobs/kubernetes/namespace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index 09d4d168bcf..b9843420a6d 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -137,7 +137,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) require.NoError(t, err) assert.Len(c, resp.Kvs, 2) - }, time.Second*10, 10*time.Millisecond) + }, time.Second*20, 10*time.Millisecond) n.kubeapi.Informer().Delete(t, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, From 28d4927d68c46ee64b557294608b92b3317cdcce Mon Sep 17 00:00:00 2001 From: joshvanl Date: Fri, 4 Oct 2024 13:22:58 +0100 Subject: [PATCH 103/112] Linting Signed-off-by: joshvanl --- cmd/scheduler/options/options.go | 3 ++- pkg/scheduler/server/internal/controller/controller.go | 3 ++- pkg/scheduler/server/internal/controller/namespace_test.go | 1 - tests/integration/framework/process/scheduler/scheduler.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/scheduler/options/options.go b/cmd/scheduler/options/options.go index 8837ffd7fa1..d175cb9f7c5 100644 --- a/cmd/scheduler/options/options.go +++ b/cmd/scheduler/options/options.go @@ -14,6 +14,7 @@ limitations under the License. package options import ( + "errors" "fmt" "strconv" "strings" @@ -139,7 +140,7 @@ func New(origArgs []string) (*Options, error) { if fs.Changed("kubeconfig") { if opts.Mode != string(modes.KubernetesMode) { - return nil, fmt.Errorf("kubeconfig flag is only valid in --mode=kubernetes") + return nil, errors.New("kubeconfig flag is only valid in --mode=kubernetes") } opts.KubeConfig = &opts.kubeconfig } diff --git a/pkg/scheduler/server/internal/controller/controller.go b/pkg/scheduler/server/internal/controller/controller.go index 85c9d8352d7..5b67d9d5449 100644 --- a/pkg/scheduler/server/internal/controller/controller.go +++ b/pkg/scheduler/server/internal/controller/controller.go @@ -15,6 +15,7 @@ package controller import ( "context" + "errors" "fmt" "os" @@ -98,7 +99,7 @@ func New(opts Options) (concurrency.Runner, error) { return fmt.Errorf("unable to get informer: %w", err) } if !mgr.GetCache().WaitForCacheSync(ctx) { - return fmt.Errorf("unable to sync cache") + return errors.New("unable to sync cache") } hzTarget.Ready() log.Info("Controller ready") diff --git a/pkg/scheduler/server/internal/controller/namespace_test.go b/pkg/scheduler/server/internal/controller/namespace_test.go index 51d5a899a30..76ee2919229 100644 --- a/pkg/scheduler/server/internal/controller/namespace_test.go +++ b/pkg/scheduler/server/internal/controller/namespace_test.go @@ -63,7 +63,6 @@ func Test_Reconcile(t *testing.T) { req := ctrl.Request{NamespacedName: types.NamespacedName{Name: "test-ns"}} for name, test := range tests { - test := test t.Run(name, func(t *testing.T) { t.Parallel() diff --git a/tests/integration/framework/process/scheduler/scheduler.go b/tests/integration/framework/process/scheduler/scheduler.go index 132ab77e81d..2d0475d4bc7 100644 --- a/tests/integration/framework/process/scheduler/scheduler.go +++ b/tests/integration/framework/process/scheduler/scheduler.go @@ -347,7 +347,7 @@ func (s *Scheduler) ETCDClient(t *testing.T) *clientv3.Client { t.Helper() client, err := clientv3.New(clientv3.Config{ - Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())}, + Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()}, DialTimeout: 40 * time.Second, }) require.NoError(t, err) From ff0e4231e8b2dd8bc00b7f3992c4e410b14b79fc Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 8 Oct 2024 16:19:11 +0100 Subject: [PATCH 104/112] Adds informer waits for scheduler namespace informer Signed-off-by: joshvanl --- .../process/kubernetes/informer/informer.go | 60 ++++++++++++++++++- .../suite/daprd/jobs/kubernetes/namespace.go | 2 +- .../suite/scheduler/kubernetes/namespace.go | 27 ++++----- 3 files changed, 71 insertions(+), 18 deletions(-) diff --git a/tests/integration/framework/process/kubernetes/informer/informer.go b/tests/integration/framework/process/kubernetes/informer/informer.go index b6fb5c12807..e4a0ac70e8c 100644 --- a/tests/integration/framework/process/kubernetes/informer/informer.go +++ b/tests/integration/framework/process/kubernetes/informer/informer.go @@ -14,11 +14,15 @@ limitations under the License. package informer import ( + "bytes" + "context" "encoding/json" + "math/rand/v2" "net/http" "strings" "sync" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -41,11 +45,14 @@ import ( type Informer struct { lock sync.Mutex active map[string][][]byte + + informed map[uint64]chan *metav1.WatchEvent } func New() *Informer { return &Informer{ - active: make(map[string][][]byte), + active: make(map[string][][]byte), + informed: make(map[uint64]chan *metav1.WatchEvent), } } @@ -89,8 +96,18 @@ func (i *Informer) Handler(t *testing.T, wrapped http.Handler) http.HandlerFunc w.WriteHeader(http.StatusOK) if len(i.active[gvk.String()]) > 0 { + var event metav1.WatchEvent + assert.NoError(t, json.Unmarshal(i.active[gvk.String()][0], &event)) w.Write(i.active[gvk.String()][0]) i.active[gvk.String()] = i.active[gvk.String()][1:] + + for _, ch := range i.informed { + select { + case ch <- &event: + case <-time.After(3 * time.Second): + t.Errorf("failed to send informed event to subscriber") + } + } } w.(http.Flusher).Flush() } @@ -111,6 +128,47 @@ func (i *Informer) Delete(t *testing.T, obj runtime.Object) { i.inform(t, obj, string(watch.Deleted)) } +func (i *Informer) DeleteWait(t *testing.T, ctx context.Context, obj runtime.Object) { + t.Helper() + + i.lock.Lock() + //nolint:gosec + ui := rand.Uint64() + ch := make(chan *metav1.WatchEvent) + i.informed[ui] = ch + i.lock.Unlock() + + defer func() { + i.lock.Lock() + close(ch) + delete(i.informed, ui) + i.lock.Unlock() + }() + + i.Delete(t, obj) + + exp, err := json.Marshal(obj) + require.NoError(t, err) + + for { + select { + case <-ctx.Done(): + assert.Fail(t, "failed to wait for delete event to occur") + return + case e := <-ch: + if e.Type != string(watch.Deleted) { + continue + } + + if !bytes.Equal(exp, e.Object.Raw) { + continue + } + + return + } + } +} + func (i *Informer) inform(t *testing.T, obj runtime.Object, event string) { t.Helper() i.lock.Lock() diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index b9843420a6d..37400838ee4 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -139,7 +139,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { assert.Len(c, resp.Kvs, 2) }, time.Second*20, 10*time.Millisecond) - n.kubeapi.Informer().Delete(t, &corev1.Namespace{ + n.kubeapi.Informer().DeleteWait(t, ctx, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, ObjectMeta: metav1.ObjectMeta{Name: "default"}, }) diff --git a/tests/integration/suite/scheduler/kubernetes/namespace.go b/tests/integration/suite/scheduler/kubernetes/namespace.go index 2cdc9e985c3..ac1814cb4f0 100644 --- a/tests/integration/suite/scheduler/kubernetes/namespace.go +++ b/tests/integration/suite/scheduler/kubernetes/namespace.go @@ -27,7 +27,6 @@ import ( schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" "github.com/dapr/dapr/tests/integration/framework" "github.com/dapr/dapr/tests/integration/framework/process/kubernetes" - "github.com/dapr/dapr/tests/integration/framework/process/kubernetes/store" "github.com/dapr/dapr/tests/integration/framework/process/scheduler" "github.com/dapr/dapr/tests/integration/framework/process/sentry" "github.com/dapr/dapr/tests/integration/suite" @@ -41,33 +40,29 @@ func init() { type namespace struct { sentry *sentry.Sentry scheduler *scheduler.Scheduler - store *store.Store + kubeapi *kubernetes.Kubernetes } func (n *namespace) Setup(t *testing.T) []framework.Option { n.sentry = sentry.New(t) - n.store = store.New(metav1.GroupVersionKind{ - Version: "v1", - Kind: "Namespace", - }) - n.store.Add(&corev1.Namespace{ - TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, - ObjectMeta: metav1.ObjectMeta{Name: "default"}, - }) - - kubeapi := kubernetes.New(t, - kubernetes.WithClusterNamespaceListFromStore(t, n.store), + n.kubeapi = kubernetes.New(t, + kubernetes.WithClusterNamespaceList(t, &corev1.NamespaceList{ + Items: []corev1.Namespace{{ + TypeMeta: metav1.TypeMeta{Kind: "Namespace", APIVersion: "v1"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, + }}, + }), ) n.scheduler = scheduler.New(t, scheduler.WithSentry(n.sentry), - scheduler.WithKubeconfig(kubeapi.KubeconfigPath(t)), + scheduler.WithKubeconfig(n.kubeapi.KubeconfigPath(t)), scheduler.WithMode("kubernetes"), ) return []framework.Option{ - framework.WithProcesses(n.sentry, kubeapi, n.scheduler), + framework.WithProcesses(n.sentry, n.kubeapi, n.scheduler), } } @@ -114,7 +109,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { assert.Len(c, resp.Kvs, 2) }, time.Second*10, 10*time.Millisecond) - n.store.Delete(&corev1.Namespace{ + n.kubeapi.Informer().DeleteWait(t, ctx, &corev1.Namespace{ TypeMeta: metav1.TypeMeta{APIVersion: "v1", Kind: "Namespace"}, ObjectMeta: metav1.ObjectMeta{Name: "default"}, }) From 743f4f4af86483cd0d54c17895ee9b737a7c881f Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 8 Oct 2024 16:53:11 +0100 Subject: [PATCH 105/112] Use filepath join for Etcd get path to account for windows Signed-off-by: joshvanl --- tests/integration/suite/daprd/jobs/kubernetes/namespace.go | 5 +++-- tests/integration/suite/scheduler/kubernetes/namespace.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index 37400838ee4..637c4a67bd7 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -16,6 +16,7 @@ package kubernetes import ( "context" "net/http" + "path/filepath" "testing" "time" @@ -134,7 +135,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { etcdClient := n.scheduler.ETCDClient(t).KV assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) require.NoError(t, err) assert.Len(c, resp.Kvs, 2) }, time.Second*20, 10*time.Millisecond) @@ -145,7 +146,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) diff --git a/tests/integration/suite/scheduler/kubernetes/namespace.go b/tests/integration/suite/scheduler/kubernetes/namespace.go index ac1814cb4f0..9b973568985 100644 --- a/tests/integration/suite/scheduler/kubernetes/namespace.go +++ b/tests/integration/suite/scheduler/kubernetes/namespace.go @@ -15,6 +15,7 @@ package kubernetes import ( "context" + "path/filepath" "testing" "time" @@ -104,7 +105,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { etcdClient := n.scheduler.ETCDClient(t).KV assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) require.NoError(t, err) assert.Len(c, resp.Kvs, 2) }, time.Second*10, 10*time.Millisecond) @@ -115,7 +116,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, "dapr/jobs", clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) From 2f3d97c4f91f2f615f42b3e45736650b7622fd7d Mon Sep 17 00:00:00 2001 From: joshvanl Date: Thu, 10 Oct 2024 23:44:23 +0100 Subject: [PATCH 106/112] Review comments Signed-off-by: joshvanl --- cmd/scheduler/options/options.go | 3 + .../server/internal/serialize/serialize.go | 11 +- .../internal/serialize/serialize_test.go | 102 ++++++++++++++++++ .../process/kubernetes/informer/informer.go | 2 + .../process/kubernetes/store/store.go | 1 + 5 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 pkg/scheduler/server/internal/serialize/serialize_test.go diff --git a/cmd/scheduler/options/options.go b/cmd/scheduler/options/options.go index d175cb9f7c5..e8d6c09de43 100644 --- a/cmd/scheduler/options/options.go +++ b/cmd/scheduler/options/options.go @@ -87,6 +87,9 @@ func New(origArgs []string) (*Options, error) { fs.StringVar(&opts.SentryAddress, "sentry-address", fmt.Sprintf("dapr-sentry.%s.svc:443", security.CurrentNamespace()), "Address of the Sentry service") fs.StringVar(&opts.Mode, "mode", string(modes.StandaloneMode), "Runtime mode for Dapr Scheduler") fs.StringVar(&opts.kubeconfig, "kubeconfig", "", "Kubernetes mode only. Absolute path to the kubeconfig file.") + if err := fs.MarkHidden("kubeconfig"); err != nil { + panic(err) + } fs.StringVar(&opts.ID, "id", "dapr-scheduler-server-0", "Scheduler server ID") fs.Uint32Var(&opts.ReplicaCount, "replica-count", 1, "The total number of scheduler replicas in the cluster") diff --git a/pkg/scheduler/server/internal/serialize/serialize.go b/pkg/scheduler/server/internal/serialize/serialize.go index 6b28e4bb93b..842361f2f76 100644 --- a/pkg/scheduler/server/internal/serialize/serialize.go +++ b/pkg/scheduler/server/internal/serialize/serialize.go @@ -62,7 +62,7 @@ func (s *Serializer) FromRequest(ctx context.Context, req Request) (*Job, error) return nil, err } - name, err := buildJobName(req.GetName(), req.GetMetadata()) + name, err := buildJobName(req) if err != nil { return nil, err } @@ -119,7 +119,14 @@ func (j *Job) Metadata() *anypb.Any { return j.meta } -func buildJobName(name string, meta *schedulerv1pb.JobMetadata) (string, error) { +func buildJobName(req Request) (string, error) { + joinStrings := func(ss ...string) string { + return strings.Join(ss, "||") + } + + name := req.GetName() + meta := req.GetMetadata() + switch t := meta.GetTarget(); t.GetType().(type) { case *schedulerv1pb.JobTargetMetadata_Actor: actor := t.GetActor() diff --git a/pkg/scheduler/server/internal/serialize/serialize_test.go b/pkg/scheduler/server/internal/serialize/serialize_test.go new file mode 100644 index 00000000000..a5867ba7fff --- /dev/null +++ b/pkg/scheduler/server/internal/serialize/serialize_test.go @@ -0,0 +1,102 @@ +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serialize + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" +) + +func Test_buildJobName(t *testing.T) { + t.Parallel() + + tests := map[string]struct { + req Request + expName string + expErr bool + }{ + "nil meta should return error": { + req: &schedulerv1pb.ScheduleJobRequest{ + Name: "test", + Metadata: nil, + }, + expName: "", + expErr: true, + }, + "meta with nil target should return error": { + req: &schedulerv1pb.ScheduleJobRequest{ + Name: "test", + Metadata: new(schedulerv1pb.JobMetadata), + }, + expName: "", + expErr: true, + }, + "job meta should return concatenated name": { + req: &schedulerv1pb.ScheduleJobRequest{ + Name: "test", + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "myns", AppId: "myapp", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: new(schedulerv1pb.TargetJob), + }, + }}, + }, + expName: "app||myns||myapp||test", + expErr: false, + }, + "nil job meta should return concatenated name": { + req: &schedulerv1pb.ScheduleJobRequest{ + Name: "test", + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "myns", AppId: "myapp", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Job{ + Job: nil, + }, + }}, + }, + expName: "app||myns||myapp||test", + expErr: false, + }, + "actor meta should return concatenated name": { + req: &schedulerv1pb.ScheduleJobRequest{ + Name: "test", + Metadata: &schedulerv1pb.JobMetadata{ + Namespace: "myns", AppId: "myapp", + Target: &schedulerv1pb.JobTargetMetadata{ + Type: &schedulerv1pb.JobTargetMetadata_Actor{ + Actor: &schedulerv1pb.TargetActorReminder{ + Type: "myactortype", Id: "myactorid", + }, + }, + }}, + }, + expName: "actorreminder||myns||myactortype||myactorid||test", + expErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + t.Parallel() + got, err := buildJobName(test.req) + assert.Equal(t, err != nil, test.expErr) + assert.Equal(t, test.expName, got) + }) + } +} diff --git a/tests/integration/framework/process/kubernetes/informer/informer.go b/tests/integration/framework/process/kubernetes/informer/informer.go index e4a0ac70e8c..5cb455196c9 100644 --- a/tests/integration/framework/process/kubernetes/informer/informer.go +++ b/tests/integration/framework/process/kubernetes/informer/informer.go @@ -81,6 +81,8 @@ func (i *Informer) Handler(t *testing.T, wrapped http.Handler) http.HandlerFunc split = split[2:] } if split[0] == "namespaces" { + // namespace resources are special cased in the Kubernetes CRUD resource + // URL, so we need to handle them differently. if len(split) > 1 { split = split[2:] gvk.Kind = split[0] diff --git a/tests/integration/framework/process/kubernetes/store/store.go b/tests/integration/framework/process/kubernetes/store/store.go index 9d914187002..88a861ca152 100644 --- a/tests/integration/framework/process/kubernetes/store/store.go +++ b/tests/integration/framework/process/kubernetes/store/store.go @@ -50,6 +50,7 @@ func (s *Store) Delete(objs ...client.Object) { defer s.lock.Unlock() if s.objs == nil { s.objs = make(map[string]client.Object) + return } for _, obj := range objs { delete(s.objs, obj.GetNamespace()+"/"+obj.GetName()) From 0182c0f874b4eb4e61b7c1b776c09b67a8fbbaeb Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 16 Oct 2024 16:42:47 +0100 Subject: [PATCH 107/112] Fix scheduler trigger metrics Signed-off-by: joshvanl --- .../server/internal/controller/namespace_test.go | 4 ++-- pkg/scheduler/server/internal/cron/cron.go | 6 ++++++ pkg/scheduler/server/internal/serialize/serialize.go | 4 ---- .../server/internal/serialize/serialize_test.go | 11 +++++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkg/scheduler/server/internal/controller/namespace_test.go b/pkg/scheduler/server/internal/controller/namespace_test.go index 76ee2919229..19d9be7dc22 100644 --- a/pkg/scheduler/server/internal/controller/namespace_test.go +++ b/pkg/scheduler/server/internal/controller/namespace_test.go @@ -17,7 +17,7 @@ import ( "context" "testing" - "github.com/diagridio/go-etcd-cron/cron" + "github.com/diagridio/go-etcd-cron/api" etcdcronfake "github.com/diagridio/go-etcd-cron/tests/fake" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -67,7 +67,7 @@ func Test_Reconcile(t *testing.T) { t.Parallel() var prefixCalled []string - cron := cronfake.New().WithClient(func(context.Context) (cron.Interface, error) { + cron := cronfake.New().WithClient(func(context.Context) (api.Interface, error) { etcdcron := etcdcronfake.New().WithDeletePrefixes(func(_ context.Context, prefixes ...string) error { prefixCalled = append(prefixCalled, prefixes...) return test.deletePError diff --git a/pkg/scheduler/server/internal/cron/cron.go b/pkg/scheduler/server/internal/cron/cron.go index 71869813f66..36c9d1d3e96 100644 --- a/pkg/scheduler/server/internal/cron/cron.go +++ b/pkg/scheduler/server/internal/cron/cron.go @@ -27,6 +27,7 @@ import ( "github.com/dapr/dapr/pkg/healthz" schedulerv1pb "github.com/dapr/dapr/pkg/proto/scheduler/v1" + "github.com/dapr/dapr/pkg/scheduler/monitoring" "github.com/dapr/dapr/pkg/scheduler/server/internal/pool" "github.com/dapr/kit/concurrency" "github.com/dapr/kit/logger" @@ -170,6 +171,7 @@ func (c *cron) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { return true } + now := time.Now() if err := c.connectionPool.Send(ctx, &pool.JobEvent{ Name: req.GetName()[idx+2:], Data: req.GetPayload(), @@ -180,5 +182,9 @@ func (c *cron) triggerJob(ctx context.Context, req *api.TriggerRequest) bool { log.Errorf("Error sending job to connection stream: %s", err) } + monitoring.RecordTriggerDuration(now) + + monitoring.RecordJobsTriggeredCount(&meta) + return true } diff --git a/pkg/scheduler/server/internal/serialize/serialize.go b/pkg/scheduler/server/internal/serialize/serialize.go index 842361f2f76..d48678f9a4e 100644 --- a/pkg/scheduler/server/internal/serialize/serialize.go +++ b/pkg/scheduler/server/internal/serialize/serialize.go @@ -120,10 +120,6 @@ func (j *Job) Metadata() *anypb.Any { } func buildJobName(req Request) (string, error) { - joinStrings := func(ss ...string) string { - return strings.Join(ss, "||") - } - name := req.GetName() meta := req.GetMetadata() diff --git a/pkg/scheduler/server/internal/serialize/serialize_test.go b/pkg/scheduler/server/internal/serialize/serialize_test.go index a5867ba7fff..7aa61293f3c 100644 --- a/pkg/scheduler/server/internal/serialize/serialize_test.go +++ b/pkg/scheduler/server/internal/serialize/serialize_test.go @@ -54,7 +54,8 @@ func Test_buildJobName(t *testing.T) { Type: &schedulerv1pb.JobTargetMetadata_Job{ Job: new(schedulerv1pb.TargetJob), }, - }}, + }, + }, }, expName: "app||myns||myapp||test", expErr: false, @@ -68,7 +69,8 @@ func Test_buildJobName(t *testing.T) { Type: &schedulerv1pb.JobTargetMetadata_Job{ Job: nil, }, - }}, + }, + }, }, expName: "app||myns||myapp||test", expErr: false, @@ -84,7 +86,8 @@ func Test_buildJobName(t *testing.T) { Type: "myactortype", Id: "myactorid", }, }, - }}, + }, + }, }, expName: "actorreminder||myns||myactortype||myactorid||test", expErr: false, @@ -95,7 +98,7 @@ func Test_buildJobName(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() got, err := buildJobName(test.req) - assert.Equal(t, err != nil, test.expErr) + assert.Equal(t, test.expErr, err != nil) assert.Equal(t, test.expName, got) }) } From 672d49f0d596feb226c5c6212e4f008c74b762b0 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 16 Oct 2024 17:21:33 +0100 Subject: [PATCH 108/112] go mod tidy Signed-off-by: joshvanl --- go.mod | 1 - go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/go.mod b/go.mod index 35274102a3d..61ff61a94a6 100644 --- a/go.mod +++ b/go.mod @@ -68,7 +68,6 @@ require ( golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/net v0.29.0 golang.org/x/sync v0.8.0 - google.golang.org/appengine v1.6.8 google.golang.org/genproto/googleapis/api v0.0.0-20240924160255-9d4c2d233b61 google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61 google.golang.org/grpc v1.67.0 diff --git a/go.sum b/go.sum index 6d0c5c7f2b5..c7533ce959e 100644 --- a/go.sum +++ b/go.sum @@ -2272,8 +2272,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/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= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= From db3d10e32a37d8de97fdd9006aae461a778d34e8 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 16 Oct 2024 17:56:40 +0100 Subject: [PATCH 109/112] Construct Etcd key paths manually, instead of legacy filepath.Join Signed-off-by: joshvanl --- tests/integration/suite/daprd/jobs/kubernetes/namespace.go | 5 ++--- tests/integration/suite/scheduler/kubernetes/namespace.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go index 637c4a67bd7..065f5f71a8a 100644 --- a/tests/integration/suite/daprd/jobs/kubernetes/namespace.go +++ b/tests/integration/suite/daprd/jobs/kubernetes/namespace.go @@ -16,7 +16,6 @@ package kubernetes import ( "context" "net/http" - "path/filepath" "testing" "time" @@ -135,7 +134,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { etcdClient := n.scheduler.ETCDClient(t).KV assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs/", clientv3.WithPrefix()) require.NoError(t, err) assert.Len(c, resp.Kvs, 2) }, time.Second*20, 10*time.Millisecond) @@ -146,7 +145,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs/", clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) diff --git a/tests/integration/suite/scheduler/kubernetes/namespace.go b/tests/integration/suite/scheduler/kubernetes/namespace.go index 9b973568985..3462edb6e02 100644 --- a/tests/integration/suite/scheduler/kubernetes/namespace.go +++ b/tests/integration/suite/scheduler/kubernetes/namespace.go @@ -15,7 +15,6 @@ package kubernetes import ( "context" - "path/filepath" "testing" "time" @@ -105,7 +104,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { etcdClient := n.scheduler.ETCDClient(t).KV assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs/", clientv3.WithPrefix()) require.NoError(t, err) assert.Len(c, resp.Kvs, 2) }, time.Second*10, 10*time.Millisecond) @@ -116,7 +115,7 @@ func (n *namespace) Run(t *testing.T, ctx context.Context) { }) assert.EventuallyWithT(t, func(c *assert.CollectT) { - resp, err := etcdClient.Get(ctx, filepath.Join("dapr", "jobs"), clientv3.WithPrefix()) + resp, err := etcdClient.Get(ctx, "dapr/jobs/", clientv3.WithPrefix()) require.NoError(t, err) assert.Empty(c, resp.Kvs) }, time.Second*10, 10*time.Millisecond) From 3138e090e51f6b468526a439888b93a186938a87 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Wed, 16 Oct 2024 18:50:14 -0700 Subject: [PATCH 110/112] Register LLM components (#8206) * register llm components Signed-off-by: yaron2 * rename file Signed-off-by: yaron2 --------- Signed-off-by: yaron2 --- .../components/conversation_anthropic.go | 27 +++++++++++++++++++ cmd/daprd/components/conversation_bedrock.go | 27 +++++++++++++++++++ .../components/conversation_huggingface.go | 27 +++++++++++++++++++ cmd/daprd/components/conversation_mistral.go | 27 +++++++++++++++++++ go.mod | 7 +++-- go.sum | 14 +++++++--- 6 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 cmd/daprd/components/conversation_anthropic.go create mode 100644 cmd/daprd/components/conversation_bedrock.go create mode 100644 cmd/daprd/components/conversation_huggingface.go create mode 100644 cmd/daprd/components/conversation_mistral.go diff --git a/cmd/daprd/components/conversation_anthropic.go b/cmd/daprd/components/conversation_anthropic.go new file mode 100644 index 00000000000..9504567f2b5 --- /dev/null +++ b/cmd/daprd/components/conversation_anthropic.go @@ -0,0 +1,27 @@ +//go:build allcomponents + +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package components + +import ( + "github.com/dapr/components-contrib/conversation/anthropic" + "github.com/dapr/dapr/pkg/components/conversation" +) + +func init() { + conversation.DefaultRegistry.RegisterComponent(anthropic.NewAnthropic, "anthropic") +} diff --git a/cmd/daprd/components/conversation_bedrock.go b/cmd/daprd/components/conversation_bedrock.go new file mode 100644 index 00000000000..71c1e3f6a48 --- /dev/null +++ b/cmd/daprd/components/conversation_bedrock.go @@ -0,0 +1,27 @@ +//go:build allcomponents + +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package components + +import ( + "github.com/dapr/components-contrib/conversation/aws/bedrock" + "github.com/dapr/dapr/pkg/components/conversation" +) + +func init() { + conversation.DefaultRegistry.RegisterComponent(bedrock.NewAWSBedrock, "aws.bedrock") +} diff --git a/cmd/daprd/components/conversation_huggingface.go b/cmd/daprd/components/conversation_huggingface.go new file mode 100644 index 00000000000..4faf5cce889 --- /dev/null +++ b/cmd/daprd/components/conversation_huggingface.go @@ -0,0 +1,27 @@ +//go:build allcomponents + +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package components + +import ( + "github.com/dapr/components-contrib/conversation/huggingface" + "github.com/dapr/dapr/pkg/components/conversation" +) + +func init() { + conversation.DefaultRegistry.RegisterComponent(huggingface.NewHuggingface, "huggingface") +} diff --git a/cmd/daprd/components/conversation_mistral.go b/cmd/daprd/components/conversation_mistral.go new file mode 100644 index 00000000000..f8318cbbadd --- /dev/null +++ b/cmd/daprd/components/conversation_mistral.go @@ -0,0 +1,27 @@ +//go:build allcomponents + +/* +Copyright 2024 The Dapr Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package components + +import ( + "github.com/dapr/components-contrib/conversation/mistral" + "github.com/dapr/dapr/pkg/components/conversation" +) + +func init() { + conversation.DefaultRegistry.RegisterComponent(mistral.NewMistral, "mistral") +} diff --git a/go.mod b/go.mod index 61ff61a94a6..442c7504512 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/argoproj/argo-rollouts v1.4.1 github.com/cenkalti/backoff/v4 v4.3.0 github.com/cloudevents/sdk-go/v2 v2.15.2 - github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 + github.com/dapr/components-contrib v1.14.1-0.20241016043026-4ca04dbb61c5 github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 github.com/diagridio/go-etcd-cron v0.3.1-0.20241003173209-b36ada3e33a3 github.com/evanphx/json-patch/v5 v5.9.0 @@ -121,6 +121,7 @@ require ( github.com/Azure/go-amqp v1.0.5 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/Code-Hex/go-generics-cache v1.3.1 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/IBM/sarama v1.42.2 // indirect github.com/OneOfOne/xxhash v1.2.8 // indirect @@ -158,6 +159,7 @@ require ( github.com/aws/aws-msk-iam-sasl-signer-go v1.0.0 // indirect github.com/aws/aws-sdk-go v1.50.19 // indirect github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect github.com/aws/aws-sdk-go-v2/config v1.27.39 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect @@ -165,6 +167,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.17.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect @@ -221,6 +224,7 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/gage-technologies/mistral-go v1.0.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-kit/kit v0.10.0 // indirect @@ -371,7 +375,6 @@ require ( github.com/riferrei/srclient v0.6.0 // indirect github.com/rs/zerolog v1.31.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sashabaranov/go-openai v1.27.1 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sendgrid/rest v2.6.9+incompatible // indirect github.com/sendgrid/sendgrid-go v3.13.0+incompatible // indirect diff --git a/go.sum b/go.sum index c7533ce959e..5b9c28a7cd4 100644 --- a/go.sum +++ b/go.sum @@ -117,6 +117,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Code-Hex/go-generics-cache v1.3.1 h1:i8rLwyhoyhaerr7JpjtYjJZUcCbWOdiYO3fZXLiEC4g= +github.com/Code-Hex/go-generics-cache v1.3.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -273,6 +275,8 @@ github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZw github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= @@ -292,6 +296,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0 github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.17.3 h1:PtP2Zzf3uy94EsVOW+tB7gNt63fFZEHuS9IRWg5q250= +github.com/aws/aws-sdk-go-v2/service/bedrockruntime v1.17.3/go.mod h1:4zuvYEUJm0Vq8tb3gcb2sl04A9I1AA5DKAefbYPA4VM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= @@ -456,8 +462,8 @@ github.com/dancannon/gorethink v4.0.0+incompatible h1:KFV7Gha3AuqT+gr0B/eKvGhbjm github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0 h1:7M9X/b7glTRxQV5LDiJ7zl0kt5an7i91juttIteMws8= -github.com/dapr/components-contrib v1.14.1-0.20241014230403-1cbedb3c0ef0/go.mod h1:bnOi3nIPO8c5S1cgjbcmvak8WZxrtBZUEfzaNKRpypY= +github.com/dapr/components-contrib v1.14.1-0.20241016043026-4ca04dbb61c5 h1:c1Bfqei43MdJNopWi7k1nGIPtPCM79s/dtma/VZc0YM= +github.com/dapr/components-contrib v1.14.1-0.20241016043026-4ca04dbb61c5/go.mod h1:QD8/ByqnXu7oCG/cqlBpmYMCdmGpwJmeKJnT1Nxhzws= github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744 h1:GZxwr7os1PAnVt/q1FVBJBMaudbRJ7fkZthhmPwBDvI= github.com/dapr/kit v0.13.1-0.20240924041040-2d6ff15a9744/go.mod h1:Hz1W2LmWfA4UX/12MdA+brsf+np6f/1dJt6C6F63cjI= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -575,6 +581,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/gage-technologies/mistral-go v1.0.0 h1:Hwk0uJO+Iq4kMX/EwbfGRUq9zkO36w7HZ/g53N4N73A= +github.com/gage-technologies/mistral-go v1.0.0/go.mod h1:tF++Xt7U975GcLlzhrjSQb8l/x+PrriO9QEdsgm9l28= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= @@ -1492,8 +1500,6 @@ github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWR github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE= github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= -github.com/sashabaranov/go-openai v1.27.1 h1:7Nx6db5NXbcoutNmAUQulEQZEpHG/SkzfexP2X5RWMk= -github.com/sashabaranov/go-openai v1.27.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= From 027155e0fd30e86d1d65f56fb16b75ded72b9bf7 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Thu, 17 Oct 2024 15:41:43 +0100 Subject: [PATCH 111/112] Fixes flaky `scheduler/idtype` and `TestMonitorLeadership` tests (#7973) * Fixes using testing.T instead of assert.Collect Signed-off-by: Elena Kolevska * Accounts for internal raft leadership transfer timeout in test Signed-off-by: Elena Kolevska --------- Signed-off-by: Elena Kolevska Co-authored-by: Yaron Schneider --- pkg/placement/leadership_test.go | 7 ++++++- .../suite/actors/reminders/scheduler/idtypes.go | 2 +- .../integration/suite/actors/reminders/scheduler/remote.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/placement/leadership_test.go b/pkg/placement/leadership_test.go index 875327a5fbb..d6934153fb6 100644 --- a/pkg/placement/leadership_test.go +++ b/pkg/placement/leadership_test.go @@ -97,7 +97,12 @@ func TestMonitorLeadership(t *testing.T) { }, time.Second*15, 10*time.Millisecond, "raft server two was not set as leader in time") // Transfer leadership back to the original leader - underlyingRaftServers[secondServerID].LeadershipTransferToServer(hashicorpRaft.ServerID(raftServers[leaderIdx].GetID()), hashicorpRaft.ServerAddress(raftServers[leaderIdx].GetRaftBind())) + var future hashicorpRaft.Future + require.Eventually(t, func() bool { + future = underlyingRaftServers[secondServerID].LeadershipTransferToServer(hashicorpRaft.ServerID(raftServers[leaderIdx].GetID()), hashicorpRaft.ServerAddress(raftServers[leaderIdx].GetRaftBind())) + return future.Error() == nil + }, time.Second*15, 500*time.Millisecond, "raft leadership transfer timeout") + require.Eventually(t, func() bool { return raftServers[leaderIdx].IsLeader() && placementServers[leaderIdx].hasLeadership.Load() }, time.Second*15, 10*time.Millisecond, "server was not properly re-elected in time") diff --git a/tests/integration/suite/actors/reminders/scheduler/idtypes.go b/tests/integration/suite/actors/reminders/scheduler/idtypes.go index 9b523cf6c22..e44c198c206 100644 --- a/tests/integration/suite/actors/reminders/scheduler/idtypes.go +++ b/tests/integration/suite/actors/reminders/scheduler/idtypes.go @@ -167,7 +167,7 @@ func (i *idtype) Run(t *testing.T, ctx context.Context) { require.EventuallyWithT(t, func(c *assert.CollectT) { invoke := fmt.Sprintf("%s/%s/%s/method/foo", daprdURL, i.actorDaprds[x].actorTypes[y].typename, i.actorDaprds[x].actorTypes[y].ids[z]) req, err := http.NewRequestWithContext(ctx, http.MethodPost, invoke, nil) - require.NoError(t, err) + require.NoError(c, err) resp, err := client.Do(req) if assert.NoError(c, err) { assert.NoError(c, resp.Body.Close()) diff --git a/tests/integration/suite/actors/reminders/scheduler/remote.go b/tests/integration/suite/actors/reminders/scheduler/remote.go index 1f73dccfdd8..44ee503f4b1 100644 --- a/tests/integration/suite/actors/reminders/scheduler/remote.go +++ b/tests/integration/suite/actors/reminders/scheduler/remote.go @@ -155,7 +155,7 @@ func (r *remote) Run(t *testing.T, ctx context.Context) { }, time.Second*5, time.Millisecond*10) require.EventuallyWithT(t, func(c *assert.CollectT) { - assert.ElementsMatch(t, r.actorIDs, r.methodcalled.Load().([]string)) + assert.ElementsMatch(c, r.actorIDs, r.methodcalled.Load().([]string)) }, time.Second*10, time.Millisecond*10) assert.GreaterOrEqual(t, r.daprd1called.Load(), uint64(0)) From 2cbded5c79f113171bb107d408e1ca6f1a80bf0e Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Fri, 18 Oct 2024 22:56:49 +0100 Subject: [PATCH 112/112] Fix flakey raft ha test (#8197) * Fixes nil pointer Signed-off-by: Elena Kolevska linter Signed-off-by: Elena Kolevska handles timeout Signed-off-by: Elena Kolevska * Removes time sleep Signed-off-by: Elena Kolevska * removes dummy line that caused flakiness Signed-off-by: Elena Kolevska * removes time sleep Signed-off-by: Elena Kolevska * timeout tweak Signed-off-by: Elena Kolevska * Extra check for good measure Signed-off-by: Elena Kolevska --------- Signed-off-by: Elena Kolevska --- pkg/placement/raft/ha_test.go | 71 +++++++++++------------------------ 1 file changed, 22 insertions(+), 49 deletions(-) diff --git a/pkg/placement/raft/ha_test.go b/pkg/placement/raft/ha_test.go index fa19cb0de8a..b0539e968c5 100644 --- a/pkg/placement/raft/ha_test.go +++ b/pkg/placement/raft/ha_test.go @@ -79,13 +79,6 @@ func TestRaftHA(t *testing.T) { // Run tests t.Run("elects leader with 3 nodes", func(t *testing.T) { - // It is painful that we have to include a `time.Sleep` here, but due to - // the non-deterministic behaviour of the raft library we are using we will - // later fail on slower test runner machines. A clock timer wait means we - // have a _better_ chance of being in the right spot in the state machine - // and the network has died down. Ideally we should move to a different - // raft library that is more deterministic and reliable for our use case. - time.Sleep(time.Second * 3) require.NotEqual(t, -1, findLeader(t, raftServers)) }) @@ -110,20 +103,14 @@ func TestRaftHA(t *testing.T) { follower = (oldLeader + 1) % 3 retrieveValidState(t, raftServers[follower], testMembers[0]) - t.Run("new leader after leader fails", func(t *testing.T) { + t.Run("new leader is elected after leader fails", func(t *testing.T) { + // Stop the current leader raftServerCancel[oldLeader]() raftServers[oldLeader] = nil - // It is painful that we have to include a `time.Sleep` here, but due to - // the non-deterministic behaviour of the raft library we are using we will - // later fail on slower test runner machines. A clock timer wait means we - // have a _better_ chance of being in the right spot in the state machine - // and the network has died down. Ideally we should move to a different - // raft library that is more deterministic and reliable for our use case. - time.Sleep(time.Second * 3) - require.Eventually(t, func() bool { - return oldLeader != findLeader(t, raftServers) + newLeader := findLeader(t, raftServers) + return oldLeader != newLeader && newLeader != -1 }, time.Second*10, time.Millisecond*100) }) }) @@ -143,13 +130,6 @@ func TestRaftHA(t *testing.T) { }) t.Run("leave only leader node running", func(t *testing.T) { - // It is painful that we have to include a `time.Sleep` here, but due to - // the non-deterministic behaviour of the raft library we are using we will - // fail in a few lines on slower test runner machines. A clock timer wait - // means we have a _better_ chance of being in the right spot in the state - // machine. Ideally we should move to a different raft library that is more - // deterministic and reliable. - time.Sleep(time.Second * 3) leader := findLeader(t, raftServers) for i := range raftServers { if i != leader { @@ -177,22 +157,16 @@ func TestRaftHA(t *testing.T) { }, time.Second*5, time.Millisecond*100, "leader did not step down") }) - // It is painful that we have to include a `time.Sleep` here, but due to - // the non-deterministic behaviour of the raft library we are using we will - // fail in a few lines on slower test runner machines. A clock timer wait - // means we have a _better_ chance of being in the right spot in the state - // machine. Ideally we should move to a different raft library that is more - // deterministic and reliable. - time.Sleep(time.Second * 6) - t.Run("leader elected when second node comes up", func(t *testing.T) { - for oldSvr := range 3 { - if raftServers[oldSvr] == nil { + oldSvr := -1 + for i := range 3 { + if raftServers[i] == nil { + oldSvr = i break } } + require.NotEqual(t, -1, oldSvr, "no server to replace") - oldSvr := 2 raftServers[oldSvr], ready[oldSvr], raftServerCancel[oldSvr] = createRaftServer(t, oldSvr, peers) select { case <-ready[oldSvr]: @@ -249,14 +223,6 @@ func TestRaftHA(t *testing.T) { } } - // It is painful that we have to include a `time.Sleep` here, but due to - // the non-deterministic behaviour of the raft library we are using we will - // later fail on slower test runner machines. A clock timer wait means we - // have a _better_ chance of being in the right spot in the state machine - // and the network has died down. Ideally we should move to a different - // raft library that is more deterministic and reliable for our use case. - time.Sleep(time.Second * 3) - // Restart all nodes for i := range 3 { raftServers[i], ready[i], raftServerCancel[i] = createRaftServer(t, i, peers) @@ -322,19 +288,26 @@ func createRaftServer(t *testing.T, nodeID int, peers []PeerInfo) (*Server, <-ch go func() { defer close(ready) for { - timeoutCtx, timeoutCancel := context.WithTimeout(ctx, time.Second*5) - defer timeoutCancel() - r, err := srv.Raft(timeoutCtx) - assert.NoError(t, err) - if r.State() == hcraft.Follower || r.State() == hcraft.Leader { + select { + case <-ctx.Done(): return + default: + timeoutCtx, timeoutCancel := context.WithTimeout(ctx, time.Second*5) + r, err := srv.Raft(timeoutCtx) + if err == nil && (r.State() == hcraft.Follower || r.State() == hcraft.Leader) { + timeoutCancel() + return + } + timeoutCancel() } } }() + // Advance the clock to trigger elections more quickly go func() { for { select { + case <-ctx.Done(): case <-ready: case <-time.After(time.Millisecond): clock.Step(time.Second * 2) @@ -375,7 +348,7 @@ func findLeader(t *testing.T, raftServers []*Server) int { } return true - }, time.Second*30, time.Second, "no leader elected") + }, time.Second*30, 500*time.Millisecond, "no leader elected") return n }