From 0b3337bd69ecae190d881560e8112e183617b3eb Mon Sep 17 00:00:00 2001 From: frouioui Date: Sun, 14 Jan 2024 00:04:40 +0000 Subject: [PATCH 1/3] upgrade vitess dependency to latest Signed-off-by: GitHub --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e208785c..00e5da49 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.11.3 sigs.k8s.io/kustomize v2.0.3+incompatible - vitess.io/vitess v0.10.3-0.20240105212102-ce203d2d6103 + vitess.io/vitess v0.10.3-0.20240112195828-c53420174d46 ) require ( @@ -44,7 +44,7 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/aquarapid/vaultlib v0.5.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.49.15 // indirect + github.com/aws/aws-sdk-go v1.49.16 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index f42558fc..15c1ff8a 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.49.15 h1:aH9bSV4kL4ziH0AMtuYbukGIVebXddXBL0cKZ1zj15k= -github.com/aws/aws-sdk-go v1.49.15/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.49.16 h1:KAQwhLg296hfffRdh+itA9p7Nx/3cXS/qOa3uF9ssig= +github.com/aws/aws-sdk-go v1.49.16/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -829,5 +829,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -vitess.io/vitess v0.10.3-0.20240105212102-ce203d2d6103 h1:pBDUquh+9Lz3qc8NCcR4LW5roKwpmJKFeDbQVJ3AqWE= -vitess.io/vitess v0.10.3-0.20240105212102-ce203d2d6103/go.mod h1:cp3hFMQehTDX0ry0U+/hmOG8wJyZKfg7UEWj65L3B/o= +vitess.io/vitess v0.10.3-0.20240112195828-c53420174d46 h1:Hlh5hJg4qvjhlprzTCmHIbP6AAlgE5SiHQy61sTb0Hs= +vitess.io/vitess v0.10.3-0.20240112195828-c53420174d46/go.mod h1:h03CHnbFzUMOVVxA9hLgBircydRKqeeyjhDqBjZmp+0= From d667105e37dc59f83a70a3d5e7c1afe9b98a2d06 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Mon, 15 Jan 2024 11:17:09 -0600 Subject: [PATCH 2/3] Fix call to ShowWorkflow Signed-off-by: Florent Poinsard --- pkg/controller/vitesskeyspace/reconcile_resharding.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/controller/vitesskeyspace/reconcile_resharding.go b/pkg/controller/vitesskeyspace/reconcile_resharding.go index f5c3ff02..e43b4fde 100644 --- a/pkg/controller/vitesskeyspace/reconcile_resharding.go +++ b/pkg/controller/vitesskeyspace/reconcile_resharding.go @@ -21,6 +21,7 @@ import ( "fmt" "reflect" "sort" + vtctldatapb "vitess.io/vitess/go/vt/proto/vtctldata" corev1 "k8s.io/api/core/v1" @@ -55,7 +56,11 @@ func (r *reconcileHandler) reconcileResharding(ctx context.Context) (reconcile.R // Look for a resharding workflow. If we find a second one bail out. var reshardingWorkflow *wrangler.ReplicationStatusResult for _, workflowName := range workflowList { - workflow, err := r.wr.ShowWorkflow(ctx, workflowName, r.vtk.Spec.Name) + var shards []string + for _, shard := range r.vtk.Spec.ShardTemplates() { + shards = append(shards, shard.KeyRange.String()) + } + workflow, err := r.wr.ShowWorkflow(ctx, workflowName, r.vtk.Spec.Name, shards) if err != nil { // The only reason this would fail is if runVExec fails. This could be a topo communication failure or any number // of indeterminable failures. We probably want to requeu faster than the resync period to try again, but wait a bit in From 5f4d1615ac8bacc90231b6215b681f27fd71eecf Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Tue, 16 Jan 2024 14:55:06 -0600 Subject: [PATCH 3/3] pass nil to ShowWorkflow Signed-off-by: Florent Poinsard --- pkg/controller/vitesskeyspace/reconcile_resharding.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/controller/vitesskeyspace/reconcile_resharding.go b/pkg/controller/vitesskeyspace/reconcile_resharding.go index e43b4fde..263ea27a 100644 --- a/pkg/controller/vitesskeyspace/reconcile_resharding.go +++ b/pkg/controller/vitesskeyspace/reconcile_resharding.go @@ -56,11 +56,7 @@ func (r *reconcileHandler) reconcileResharding(ctx context.Context) (reconcile.R // Look for a resharding workflow. If we find a second one bail out. var reshardingWorkflow *wrangler.ReplicationStatusResult for _, workflowName := range workflowList { - var shards []string - for _, shard := range r.vtk.Spec.ShardTemplates() { - shards = append(shards, shard.KeyRange.String()) - } - workflow, err := r.wr.ShowWorkflow(ctx, workflowName, r.vtk.Spec.Name, shards) + workflow, err := r.wr.ShowWorkflow(ctx, workflowName, r.vtk.Spec.Name, nil) if err != nil { // The only reason this would fail is if runVExec fails. This could be a topo communication failure or any number // of indeterminable failures. We probably want to requeu faster than the resync period to try again, but wait a bit in