From 045d7b862502d1be6f54770319fb69f4be34dd95 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 21 Mar 2024 22:59:35 +0100 Subject: [PATCH 01/25] `slack-vitess-r15.0.5`: add `slack_cross_cell` custom durability policy Signed-off-by: Tim Vaillancourt --- go.mod | 5 ++-- go.sum | 11 +++++-- .../reparentutil/slack_cross_cell_shim.go | 30 +++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 go/vt/vtctl/reparentutil/slack_cross_cell_shim.go diff --git a/go.mod b/go.mod index 3166c13c9c8..95400b7b55a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.20 +go 1.22.1 require ( cloud.google.com/go/storage v1.10.0 @@ -100,7 +100,7 @@ require ( google.golang.org/grpc v1.45.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b - google.golang.org/protobuf v1.28.0 + google.golang.org/protobuf v1.33.0 gopkg.in/DataDog/dd-trace-go.v1 v1.17.0 gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/gcfg.v1 v1.2.3 @@ -118,6 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 + github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index b9a439e07a5..18005c165f0 100644 --- a/go.sum +++ b/go.sum @@ -357,6 +357,7 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -665,6 +666,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= +github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9 h1:G3kBp1eg/UwwilrZctn034jG3aR46stRfk4kj8cXZv4= +github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1200,8 +1203,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/DataDog/dd-trace-go.v1 v1.17.0 h1:j9vAp9Re9bbtA/QFehkJpNba/6W2IbJtNuXZophCa54= gopkg.in/DataDog/dd-trace-go.v1 v1.17.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1292,7 +1295,9 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= @@ -1306,9 +1311,11 @@ modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= +modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= +modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go new file mode 100644 index 00000000000..a2cb7cbbc90 --- /dev/null +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -0,0 +1,30 @@ +package reparentutil + +import ( + slackdur "github.com/slackhq/vitess-addons/go/durability/cross_cell" + + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" +) + +type slackCrossCell struct { + *slackdur.SlackCrossCell +} + +func (scc *slackCrossCell) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { + return scc.PromotionRule(tablet) +} + +func (scc *slackCrossCell) semiSyncAckers(tablet *topodatapb.Tablet) int { + return scc.SemiSyncAckers(tablet) +} + +func (scc *slackCrossCell) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { + return scc.IsReplicaSemiSync(primary, replica) +} + +func init() { + RegisterDurability("slack_cross_cell", func() Durabler { + return &slackCrossCell{} + }) +} From 1aacfe257b19c2b70c4a28767ccb17a732f28a19 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 21 Mar 2024 23:03:37 +0100 Subject: [PATCH 02/25] go mod tidy Signed-off-by: Tim Vaillancourt --- go.mod | 4 ++-- go.sum | 9 ++------- go/vt/vtctl/reparentutil/slack_cross_cell_shim.go | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 95400b7b55a..f4bc8bda981 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module vitess.io/vitess -go 1.22.1 +go 1.20 require ( cloud.google.com/go/storage v1.10.0 @@ -118,7 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9 + github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index 18005c165f0..e637aecec9d 100644 --- a/go.sum +++ b/go.sum @@ -357,7 +357,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -666,8 +665,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9 h1:G3kBp1eg/UwwilrZctn034jG3aR46stRfk4kj8cXZv4= -github.com/slackhq/vitess-addons v0.0.0-20240321214652-79422279fce9/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= +github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd h1:4SYow5q25qAGVvVdFcJYUi9PsX7MkCwe/QZHvrRVwkk= +github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1295,9 +1294,7 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= @@ -1311,11 +1308,9 @@ modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= -modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE= -modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go index a2cb7cbbc90..fdf45b3b52e 100644 --- a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -3,8 +3,8 @@ package reparentutil import ( slackdur "github.com/slackhq/vitess-addons/go/durability/cross_cell" - topodatapb "vitess.io/vitess/go/vt/proto/topodata" - "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" + "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" ) type slackCrossCell struct { From bcc647d958ed2023c30e844e6fe3f2f1a761691a Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 21 Mar 2024 23:04:22 +0100 Subject: [PATCH 03/25] go mod tidy Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f4bc8bda981..a75a745fc30 100644 --- a/go.mod +++ b/go.mod @@ -118,7 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd + github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index e637aecec9d..79ae9bd1db7 100644 --- a/go.sum +++ b/go.sum @@ -665,8 +665,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd h1:4SYow5q25qAGVvVdFcJYUi9PsX7MkCwe/QZHvrRVwkk= -github.com/slackhq/vitess-addons v0.0.0-20240321215950-7d24cfb581dd/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= +github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7 h1:L5QwBBw/m2zTWRkdsUEvUz8PrR/briegekfByWLk3Ik= +github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= From a79cfbf9d7fbbf07f1e4cf7ac33bae0b6684534c Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Thu, 21 Mar 2024 23:11:03 +0100 Subject: [PATCH 04/25] go mod tidy again Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- go/vt/vtctl/reparentutil/slack_cross_cell_shim.go | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a75a745fc30..d0c0fdbb1aa 100644 --- a/go.mod +++ b/go.mod @@ -118,7 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7 + github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index 79ae9bd1db7..ae093dbae7b 100644 --- a/go.sum +++ b/go.sum @@ -665,8 +665,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7 h1:L5QwBBw/m2zTWRkdsUEvUz8PrR/briegekfByWLk3Ik= -github.com/slackhq/vitess-addons v0.0.0-20240321220355-8e45e000ffb7/go.mod h1:Xw9hWvoVFxf98ERP1N2tuWOVSP0Fu/EXmCOkF4SDf8I= +github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69 h1:4d6l81yVf3r2JYjxYoTbB680Jt+rlGr4k5+kWiBJugY= +github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go index fdf45b3b52e..d9db0d88916 100644 --- a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -7,6 +7,9 @@ import ( "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" ) +// slackCrossCell is a wrapper-struct that wraps the SlackCrossCell Durabler-interface +// implementation (from github.com/slackhq/vitess-addons) using the private struct +// methods the Durabiler interface (unfortunately) requires. type slackCrossCell struct { *slackdur.SlackCrossCell } From 6abed010590f93b24d7b7b25393fc207a741a928 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 22 Mar 2024 00:57:35 +0100 Subject: [PATCH 05/25] Use tag Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d0c0fdbb1aa..c463a8dd875 100644 --- a/go.mod +++ b/go.mod @@ -118,7 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69 + github.com/slackhq/vitess-addons v0.15.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index ae093dbae7b..472a57b3ad4 100644 --- a/go.sum +++ b/go.sum @@ -665,8 +665,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69 h1:4d6l81yVf3r2JYjxYoTbB680Jt+rlGr4k5+kWiBJugY= -github.com/slackhq/vitess-addons v0.0.0-20240321221001-895df2884c69/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= +github.com/slackhq/vitess-addons v0.15.0 h1:zTRiWZTa/tfrp5jj5+QAZ/rpM8BGi3uMNC4ModthZxo= +github.com/slackhq/vitess-addons v0.15.0/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= From 461ac0f06d6474ca269288e2672cfc515e4b7597 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 22 Mar 2024 01:21:35 +0100 Subject: [PATCH 06/25] use v0.15.1 Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- go/vt/vtctl/reparentutil/slack_cross_cell_shim.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index c463a8dd875..8d7201c8f5a 100644 --- a/go.mod +++ b/go.mod @@ -118,7 +118,7 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.15.0 + github.com/slackhq/vitess-addons v0.15.1 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/sync v0.3.0 golang.org/x/tools/cmd/cover v0.1.0-deprecated diff --git a/go.sum b/go.sum index 472a57b3ad4..6ad41ba9446 100644 --- a/go.sum +++ b/go.sum @@ -665,8 +665,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.15.0 h1:zTRiWZTa/tfrp5jj5+QAZ/rpM8BGi3uMNC4ModthZxo= -github.com/slackhq/vitess-addons v0.15.0/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= +github.com/slackhq/vitess-addons v0.15.1 h1:TtIBZJegU3oS/+JlFyiyUlnLjlmySs8vB6Zj4gFn07E= +github.com/slackhq/vitess-addons v0.15.1/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go index d9db0d88916..50d48aa33e8 100644 --- a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -1,7 +1,7 @@ package reparentutil import ( - slackdur "github.com/slackhq/vitess-addons/go/durability/cross_cell" + slackdurability "github.com/slackhq/vitess-addons/go/durability" topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" @@ -11,7 +11,7 @@ import ( // implementation (from github.com/slackhq/vitess-addons) using the private struct // methods the Durabiler interface (unfortunately) requires. type slackCrossCell struct { - *slackdur.SlackCrossCell + *slackdurability.SlackCrossCell } func (scc *slackCrossCell) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { From f6b4cf0c70efa9f0338833611f9cd5d349c5139a Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 22 Mar 2024 01:24:28 +0100 Subject: [PATCH 07/25] update shim Signed-off-by: Tim Vaillancourt --- go/vt/vtctl/reparentutil/slack_cross_cell_shim.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go index 50d48aa33e8..5c622ad403f 100644 --- a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -1,7 +1,7 @@ package reparentutil import ( - slackdurability "github.com/slackhq/vitess-addons/go/durability" + "github.com/slackhq/vitess-addons/go/durability" topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" @@ -11,7 +11,7 @@ import ( // implementation (from github.com/slackhq/vitess-addons) using the private struct // methods the Durabiler interface (unfortunately) requires. type slackCrossCell struct { - *slackdurability.SlackCrossCell + *durability.SlackCrossCell } func (scc *slackCrossCell) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { From bd451f797619ca415165f8dc31ff823ed1c36be9 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 29 Mar 2024 08:15:52 +0100 Subject: [PATCH 08/25] Make `Durabler` interface methods public (#15548) Signed-off-by: Tim Vaillancourt Signed-off-by: Manan Gupta Co-authored-by: Manan Gupta --- go/vt/vtctl/reparentutil/durability.go | 66 ++++++++++----------- go/vt/vtctl/reparentutil/durability_test.go | 2 +- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/go/vt/vtctl/reparentutil/durability.go b/go/vt/vtctl/reparentutil/durability.go index 735965c3afa..8fd1634faa0 100644 --- a/go/vt/vtctl/reparentutil/durability.go +++ b/go/vt/vtctl/reparentutil/durability.go @@ -55,13 +55,13 @@ func init() { // Durabler is the interface which is used to get the promotion rules for candidates and the semi sync setup type Durabler interface { - // promotionRule represents the precedence in which we want to tablets to be promoted. + // PromotionRule represents the precedence in which we want to tablets to be promoted. // The higher the promotion rule of a tablet, the more we want it to be promoted in case of a failover - promotionRule(*topodatapb.Tablet) promotionrule.CandidatePromotionRule - // semiSyncAckers represents the number of semi-sync ackers required for a given tablet if it were to become the PRIMARY instance - semiSyncAckers(*topodatapb.Tablet) int - // isReplicaSemiSync returns whether the "replica" should send semi-sync acks if "primary" were to become the PRIMARY instance - isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool + PromotionRule(*topodatapb.Tablet) promotionrule.CandidatePromotionRule + // SemiSyncAckers represents the number of semi-sync ackers required for a given tablet if it were to become the PRIMARY instance + SemiSyncAckers(*topodatapb.Tablet) int + // IsReplicaSemiSync returns whether the "replica" should send semi-sync acks if "primary" were to become the PRIMARY instance + IsReplicaSemiSync(primary, replica *topodatapb.Tablet) bool } func RegisterDurability(name string, newDurablerFunc NewDurabler) { @@ -94,13 +94,13 @@ func PromotionRule(durability Durabler, tablet *topodatapb.Tablet) promotionrule if tablet == nil || tablet.Alias == nil { return promotionrule.MustNot } - return durability.promotionRule(tablet) + return durability.PromotionRule(tablet) } // SemiSyncAckers returns the primary semi-sync setting for the instance. // 0 means none. Non-zero specifies the number of required ackers. func SemiSyncAckers(durability Durabler, tablet *topodatapb.Tablet) int { - return durability.semiSyncAckers(tablet) + return durability.SemiSyncAckers(tablet) } // IsReplicaSemiSync returns the replica semi-sync setting from the tablet record. @@ -110,7 +110,7 @@ func IsReplicaSemiSync(durability Durabler, primary, replica *topodatapb.Tablet) if primary == nil || primary.Alias == nil || replica == nil || replica.Alias == nil { return false } - return durability.isReplicaSemiSync(primary, replica) + return durability.IsReplicaSemiSync(primary, replica) } //======================================================================= @@ -118,8 +118,8 @@ func IsReplicaSemiSync(durability Durabler, primary, replica *topodatapb.Tablet) // durabilityNone has no semi-sync and returns NeutralPromoteRule for Primary and Replica tablet types, MustNotPromoteRule for everything else type durabilityNone struct{} -// promotionRule implements the Durabler interface -func (d *durabilityNone) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { +// PromotionRule implements the Durabler interface +func (d *durabilityNone) PromotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { switch tablet.Type { case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA: return promotionrule.Neutral @@ -127,13 +127,13 @@ func (d *durabilityNone) promotionRule(tablet *topodatapb.Tablet) promotionrule. return promotionrule.MustNot } -// semiSyncAckers implements the Durabler interface -func (d *durabilityNone) semiSyncAckers(tablet *topodatapb.Tablet) int { +// SemiSyncAckers implements the Durabler interface +func (d *durabilityNone) SemiSyncAckers(tablet *topodatapb.Tablet) int { return 0 } -// isReplicaSemiSync implements the Durabler interface -func (d *durabilityNone) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { +// IsReplicaSemiSync implements the Durabler interface +func (d *durabilityNone) IsReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { return false } @@ -143,8 +143,8 @@ func (d *durabilityNone) isReplicaSemiSync(primary, replica *topodatapb.Tablet) // It returns NeutralPromoteRule for Primary and Replica tablet types, MustNotPromoteRule for everything else type durabilitySemiSync struct{} -// promotionRule implements the Durabler interface -func (d *durabilitySemiSync) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { +// PromotionRule implements the Durabler interface +func (d *durabilitySemiSync) PromotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { switch tablet.Type { case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA: return promotionrule.Neutral @@ -152,13 +152,13 @@ func (d *durabilitySemiSync) promotionRule(tablet *topodatapb.Tablet) promotionr return promotionrule.MustNot } -// semiSyncAckers implements the Durabler interface -func (d *durabilitySemiSync) semiSyncAckers(tablet *topodatapb.Tablet) int { +// SemiSyncAckers implements the Durabler interface +func (d *durabilitySemiSync) SemiSyncAckers(tablet *topodatapb.Tablet) int { return 1 } -// isReplicaSemiSync implements the Durabler interface -func (d *durabilitySemiSync) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { +// IsReplicaSemiSync implements the Durabler interface +func (d *durabilitySemiSync) IsReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { switch replica.Type { case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA: return true @@ -173,8 +173,8 @@ func (d *durabilitySemiSync) isReplicaSemiSync(primary, replica *topodatapb.Tabl // It returns NeutralPromoteRule for Primary and Replica tablet types, MustNotPromoteRule for everything else type durabilityCrossCell struct{} -// promotionRule implements the Durabler interface -func (d *durabilityCrossCell) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { +// PromotionRule implements the Durabler interface +func (d *durabilityCrossCell) PromotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { switch tablet.Type { case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA: return promotionrule.Neutral @@ -182,13 +182,13 @@ func (d *durabilityCrossCell) promotionRule(tablet *topodatapb.Tablet) promotion return promotionrule.MustNot } -// semiSyncAckers implements the Durabler interface -func (d *durabilityCrossCell) semiSyncAckers(tablet *topodatapb.Tablet) int { +// SemiSyncAckers implements the Durabler interface +func (d *durabilityCrossCell) SemiSyncAckers(tablet *topodatapb.Tablet) int { return 1 } -// isReplicaSemiSync implements the Durabler interface -func (d *durabilityCrossCell) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { +// IsReplicaSemiSync implements the Durabler interface +func (d *durabilityCrossCell) IsReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { switch replica.Type { case topodatapb.TabletType_PRIMARY, topodatapb.TabletType_REPLICA: return primary.Alias.Cell != replica.Alias.Cell @@ -201,8 +201,8 @@ func (d *durabilityCrossCell) isReplicaSemiSync(primary, replica *topodatapb.Tab // durabilityTest is like durabilityNone. It overrides the type for a specific tablet to prefer. It is only meant to be used for testing purposes! type durabilityTest struct{} -// promotionRule implements the Durabler interface -func (d *durabilityTest) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { +// PromotionRule implements the Durabler interface +func (d *durabilityTest) PromotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { if topoproto.TabletAliasString(tablet.Alias) == "zone2-0000000200" { return promotionrule.Prefer } @@ -214,12 +214,12 @@ func (d *durabilityTest) promotionRule(tablet *topodatapb.Tablet) promotionrule. return promotionrule.MustNot } -// semiSyncAckers implements the Durabler interface -func (d *durabilityTest) semiSyncAckers(tablet *topodatapb.Tablet) int { +// SemiSyncAckers implements the Durabler interface +func (d *durabilityTest) SemiSyncAckers(tablet *topodatapb.Tablet) int { return 0 } -// isReplicaSemiSync implements the Durabler interface -func (d *durabilityTest) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { +// IsReplicaSemiSync implements the Durabler interface +func (d *durabilityTest) IsReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { return false } diff --git a/go/vt/vtctl/reparentutil/durability_test.go b/go/vt/vtctl/reparentutil/durability_test.go index 857718174c5..c519817c312 100644 --- a/go/vt/vtctl/reparentutil/durability_test.go +++ b/go/vt/vtctl/reparentutil/durability_test.go @@ -268,7 +268,7 @@ func TestDurabilityTest(t *testing.T) { for _, testcase := range testcases { t.Run(topoproto.TabletAliasString(testcase.tablet.Alias), func(t *testing.T) { - rule := durabilityRules.promotionRule(testcase.tablet) + rule := durabilityRules.PromotionRule(testcase.tablet) assert.Equal(t, testcase.promotionRule, rule) }) } From a8699b0198e00b48be1ab6d7c0def56015cffdcc Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 15:44:42 +0200 Subject: [PATCH 09/25] Update `slack_cross_cell` shim Signed-off-by: Tim Vaillancourt --- .../reparentutil/slack_cross_cell_shim.go | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go index 5c622ad403f..64d0cb8eda0 100644 --- a/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go +++ b/go/vt/vtctl/reparentutil/slack_cross_cell_shim.go @@ -1,33 +1,9 @@ package reparentutil -import ( - "github.com/slackhq/vitess-addons/go/durability" - - topodatapb "vitess.io/vitess/go/vt/proto/topodata" - "vitess.io/vitess/go/vt/vtctl/reparentutil/promotionrule" -) - -// slackCrossCell is a wrapper-struct that wraps the SlackCrossCell Durabler-interface -// implementation (from github.com/slackhq/vitess-addons) using the private struct -// methods the Durabiler interface (unfortunately) requires. -type slackCrossCell struct { - *durability.SlackCrossCell -} - -func (scc *slackCrossCell) promotionRule(tablet *topodatapb.Tablet) promotionrule.CandidatePromotionRule { - return scc.PromotionRule(tablet) -} - -func (scc *slackCrossCell) semiSyncAckers(tablet *topodatapb.Tablet) int { - return scc.SemiSyncAckers(tablet) -} - -func (scc *slackCrossCell) isReplicaSemiSync(primary, replica *topodatapb.Tablet) bool { - return scc.IsReplicaSemiSync(primary, replica) -} +import "github.com/slackhq/vitess-addons/go/durability" func init() { RegisterDurability("slack_cross_cell", func() Durabler { - return &slackCrossCell{} + return &durability.SlackCrossCell{} }) } From 0e3a0ee71d2fcdff6db7ace5c48660b6fd7291dd Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 15:47:50 +0200 Subject: [PATCH 10/25] go mod tidy Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 71199bda70c..d84c079ea82 100644 --- a/go.mod +++ b/go.mod @@ -118,8 +118,8 @@ require ( require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 - github.com/slackhq/vitess-addons v0.15.1 github.com/planetscale/log v0.0.0-20221118170849-fb599bc35c50 + github.com/slackhq/vitess-addons v0.15.1 github.com/slok/noglog v0.2.0 go.uber.org/zap v1.23.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 From 162ca8ca9e7bc42650bf985733c66451432304a9 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 15:49:09 +0200 Subject: [PATCH 11/25] go mod tidy again Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d84c079ea82..bfa353f1cf9 100644 --- a/go.mod +++ b/go.mod @@ -119,7 +119,7 @@ require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 github.com/planetscale/log v0.0.0-20221118170849-fb599bc35c50 - github.com/slackhq/vitess-addons v0.15.1 + github.com/slackhq/vitess-addons v0.15.2 github.com/slok/noglog v0.2.0 go.uber.org/zap v1.23.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 diff --git a/go.sum b/go.sum index 92aced7372e..2a0af4469f2 100644 --- a/go.sum +++ b/go.sum @@ -670,8 +670,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.15.1 h1:TtIBZJegU3oS/+JlFyiyUlnLjlmySs8vB6Zj4gFn07E= -github.com/slackhq/vitess-addons v0.15.1/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= +github.com/slackhq/vitess-addons v0.15.2 h1:DcDULONlUI3rz5jPb9bHKEJo6qpWX/gbI7LCPANHE8A= +github.com/slackhq/vitess-addons v0.15.2/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= github.com/slok/noglog v0.2.0 h1:1czu4l2EoJ8L92UwdSXXa1Y+c5TIjFAFm2P+mjej95E= github.com/slok/noglog v0.2.0/go.mod h1:TfKxwpEZPT+UA83bQ6RME146k0MM4e8mwHLf6bhcGDI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= From b9669aae4e3bb2f79e13dea90fe857560ec7032a Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 20:28:46 +0200 Subject: [PATCH 12/25] Allow private go module from vitess-additions repo Signed-off-by: Tim Vaillancourt --- .github/workflows/cluster_endtoend_12.yml | 6 ++++++ .github/workflows/cluster_endtoend_13.yml | 6 ++++++ .github/workflows/cluster_endtoend_15.yml | 6 ++++++ .github/workflows/cluster_endtoend_18.yml | 6 ++++++ .github/workflows/cluster_endtoend_21.yml | 6 ++++++ .github/workflows/cluster_endtoend_22.yml | 6 ++++++ .../cluster_endtoend_ers_prs_newfeatures_heavy.yml | 6 ++++++ .github/workflows/cluster_endtoend_mysql80.yml | 6 ++++++ .github/workflows/cluster_endtoend_mysql_server_vault.yml | 6 ++++++ .../workflows/cluster_endtoend_onlineddl_declarative.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_ghost.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_revert.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_revertible.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_scheduler.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_singleton.yml | 6 ++++++ .github/workflows/cluster_endtoend_onlineddl_vrepl.yml | 6 ++++++ .../workflows/cluster_endtoend_onlineddl_vrepl_stress.yml | 6 ++++++ .../cluster_endtoend_onlineddl_vrepl_stress_suite.yml | 6 ++++++ .../workflows/cluster_endtoend_onlineddl_vrepl_suite.yml | 6 ++++++ .github/workflows/cluster_endtoend_schemadiff_vrepl.yml | 6 ++++++ .github/workflows/cluster_endtoend_tabletmanager_consul.yml | 6 ++++++ .../workflows/cluster_endtoend_tabletmanager_tablegc.yml | 6 ++++++ .../workflows/cluster_endtoend_tabletmanager_throttler.yml | 6 ++++++ ...uster_endtoend_tabletmanager_throttler_custom_config.yml | 6 ++++++ .../workflows/cluster_endtoend_topo_connection_cache.yml | 6 ++++++ .../cluster_endtoend_vreplication_across_db_versions.yml | 6 ++++++ .github/workflows/cluster_endtoend_vreplication_basic.yml | 6 ++++++ .../workflows/cluster_endtoend_vreplication_cellalias.yml | 6 ++++++ ...ster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml | 6 ++++++ .../workflows/cluster_endtoend_vreplication_multicell.yml | 6 ++++++ .github/workflows/cluster_endtoend_vreplication_v2.yml | 6 ++++++ .github/workflows/cluster_endtoend_vstream_failover.yml | 6 ++++++ .../cluster_endtoend_vstream_stoponreshard_false.yml | 6 ++++++ .../cluster_endtoend_vstream_stoponreshard_true.yml | 6 ++++++ .../cluster_endtoend_vstream_with_keyspaces_to_watch.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtbackup_transform.yml | 6 ++++++ ...uster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_concurrentdml.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_gen4.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_general_heavy.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_godriver.yml | 6 ++++++ .../workflows/cluster_endtoend_vtgate_partial_keyspace.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_queries.yml | 6 ++++++ .../workflows/cluster_endtoend_vtgate_readafterwrite.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_reservedconn.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_schema.yml | 6 ++++++ .../workflows/cluster_endtoend_vtgate_schema_tracker.yml | 6 ++++++ .../cluster_endtoend_vtgate_tablet_healthcheck_cache.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_topo.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_topo_consul.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_topo_etcd.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_transaction.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_unsharded.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtgate_vschema.yml | 6 ++++++ .github/workflows/cluster_endtoend_vtorc.yml | 6 ++++++ .github/workflows/cluster_endtoend_vttablet_prscomplex.yml | 6 ++++++ .github/workflows/cluster_endtoend_xb_backup.yml | 6 ++++++ .github/workflows/cluster_endtoend_xb_recovery.yml | 6 ++++++ .github/workflows/unit_test_mysql80.yml | 6 ++++++ test/templates/cluster_endtoend_test.tpl | 6 ++++++ test/templates/cluster_endtoend_test_docker.tpl | 6 ++++++ test/templates/cluster_endtoend_test_mysql57.tpl | 6 ++++++ test/templates/cluster_endtoend_test_self_hosted.tpl | 5 ++++- test/templates/unit_test.tpl | 6 ++++++ test/templates/unit_test_self_hosted.tpl | 5 ++++- 66 files changed, 392 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 4edaaac301e..71c8f6088c1 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (12) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index 61acfcee509..02e9d153d09 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (13) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index d416c4b4ab5..813beaf9342 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (15) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index be08f6feb5f..a0bfeb0dfe5 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (18) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index ec026526751..94f9b4f42f4 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (21) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_22.yml b/.github/workflows/cluster_endtoend_22.yml index 07a53e1dfe7..ab3393020f5 100644 --- a/.github/workflows/cluster_endtoend_22.yml +++ b/.github/workflows/cluster_endtoend_22.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (22) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index 7d65872e734..9460abf5047 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (ers_prs_newfeatures_heavy) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index 447778a3cfb..a0157213b6c 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (mysql80) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index 47a62151705..694d67537da 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (mysql_server_vault) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml index 92534522720..74d10719db2 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_declarative) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml index 26f7bcb7b06..7449bc2bae6 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_ghost) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index 2e72c5c390a..8300960396f 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_revert) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_revertible.yml b/.github/workflows/cluster_endtoend_onlineddl_revertible.yml index c9fefa27ad6..3ba55a443dd 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revertible.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revertible.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_revertible) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index d946e1e3525..7b79138c236 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_scheduler) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml index 13d7eea220e..1cd3070d209 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_singleton) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index 91505299204..f33b66e5775 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_vrepl) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index 8704906c8a0..b84b8563051 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 08d517d0346..9d9b9c50be9 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index fa0bbfb6bbe..9a934955c3f 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index d35f6692f6b..f2408b87689 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (schemadiff_vrepl) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index 2adb2e6b2df..b7496f4da8d 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (tabletmanager_consul) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index d6d083bb78e..37870eedf70 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (tabletmanager_tablegc) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml index 2e74d92db8a..2ff134df45e 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (tabletmanager_throttler) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml index 544fbedf07a..209c64e6367 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (tabletmanager_throttler_custom_config) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index a1e86705fe9..2f945ff5afb 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (topo_connection_cache) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index a47519f3698..2e3f3d76559 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_across_db_versions) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index dc30677776d..46bd2df92c1 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_basic) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 74b05a65ae5..057d2f05cf2 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_cellalias) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml index 7e5672da583..6c144fc9b9b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_multicell.yml b/.github/workflows/cluster_endtoend_vreplication_multicell.yml index 5d24e9e9d10..b1c8701ec0c 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multicell.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multicell.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_multicell) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 0d77442253c..42433a23dc0 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vreplication_v2) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vstream_failover.yml b/.github/workflows/cluster_endtoend_vstream_failover.yml index 64c14f7cddf..fa111de601a 100644 --- a/.github/workflows/cluster_endtoend_vstream_failover.yml +++ b/.github/workflows/cluster_endtoend_vstream_failover.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vstream_failover) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml index 68498c8fe84..b2dcb464b9b 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vstream_stoponreshard_false) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml index ca6c1cdb117..53c8d06435b 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vstream_stoponreshard_true) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml b/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml index be799a6febe..f06c08719a9 100644 --- a/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml +++ b/.github/workflows/cluster_endtoend_vstream_with_keyspaces_to_watch.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vstream_with_keyspaces_to_watch) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtbackup_transform.yml b/.github/workflows/cluster_endtoend_vtbackup_transform.yml index b99eeb5f3b9..b12d700ce59 100644 --- a/.github/workflows/cluster_endtoend_vtbackup_transform.yml +++ b/.github/workflows/cluster_endtoend_vtbackup_transform.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtbackup_transform) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index 1c61c62b810..f52aa2ea120 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index 8121e3d3e19..4f592c77664 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_concurrentdml) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 2e443c82d19..5ffdad85bf5 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_gen4) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index 6278be78566..1d28f93ae14 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_general_heavy) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index 35422f35daf..76b825182b8 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_godriver) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index 8a40b9b5d07..526a6887d80 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_partial_keyspace) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index 43855c3e883..695a3813ddf 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_queries) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index f78da11ce19..8563ffec34f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_readafterwrite) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index 8655264e632..8ae1e3dd352 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_reservedconn) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 61492eb6b9e..9808b418f95 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_schema) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index 5bc95168504..e38cb0127e3 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_schema_tracker) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index f2ef131d4ec..104d64f71ee 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_tablet_healthcheck_cache) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index f1a0e71e0b1..5e5e2d26127 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_topo) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index 7e9686a8d17..71d19d1392d 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_topo_consul) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 5e9d17c86d9..48cff9d2859 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_topo_etcd) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index 7a6647d18df..b4c48f8cdc9 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_transaction) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index 5d7ceb02d33..ba3e15d0def 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_unsharded) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 13a40897b3a..468037e796c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_vindex_heavy) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index 47e77a65186..25daaf0367f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtgate_vschema) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index 2b4eb469f64..7136bd717cd 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vtorc) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml index 0551694f140..b3241643c62 100644 --- a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml +++ b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (vttablet_prscomplex) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 95e1bdd9b84..6f1b038e566 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (xb_backup) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index d64717bc6eb..54f5cb0c09f 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -11,6 +11,9 @@ jobs: name: Run endtoend tests on Cluster (xb_recovery) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -53,6 +56,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 7d67e7ac438..7dff88d2b63 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -10,6 +10,9 @@ jobs: test: runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -52,6 +55,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@v4 diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 925d35c539b..70dce7ee5d1 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -9,6 +9,9 @@ jobs: name: Run endtoend tests on {{.Name}} runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped @@ -51,6 +54,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index d490a22eb9f..6f7e6e0b349 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -6,6 +6,9 @@ jobs: name: Run endtoend tests on {{.Name}} runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -48,6 +51,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index fd35e8512f9..572a0ec6a1b 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -16,6 +16,9 @@ jobs: name: Run endtoend tests on {{.Name}} runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -58,6 +61,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/test/templates/cluster_endtoend_test_self_hosted.tpl b/test/templates/cluster_endtoend_test_self_hosted.tpl index 0eeb1361489..878582a1512 100644 --- a/test/templates/cluster_endtoend_test_self_hosted.tpl +++ b/test/templates/cluster_endtoend_test_self_hosted.tpl @@ -9,6 +9,9 @@ jobs: name: Run endtoend tests on {{.Name}} runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped @@ -53,7 +56,7 @@ jobs: - name: Run test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 30 - run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard {{.Shard}} -- -- --keep-data=true' + run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c "source build.env && git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ && go run test.go -keep-data=true -docker=false -print-log -follow -shard {{.Shard}} -- -- --keep-data=true" - name: Print Volume Used if: always() && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 95322c8f763..2202739e15d 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -8,6 +8,9 @@ jobs: test: runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped @@ -50,6 +53,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@v4 diff --git a/test/templates/unit_test_self_hosted.tpl b/test/templates/unit_test_self_hosted.tpl index fd9b945c61a..76925e3f4c1 100644 --- a/test/templates/unit_test_self_hosted.tpl +++ b/test/templates/unit_test_self_hosted.tpl @@ -8,6 +8,9 @@ jobs: test: runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -51,7 +54,7 @@ jobs: - name: Run test if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 - run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'make unit_test' + run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c "git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ && make unit_test" - name: Print Volume Used if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' From 20999496414384bd5db9f047c8398056a92e3757 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 20:31:49 +0200 Subject: [PATCH 13/25] Fix typo Signed-off-by: Tim Vaillancourt --- test/templates/cluster_endtoend_test_docker.tpl | 2 +- test/templates/cluster_endtoend_test_mysql57.tpl | 2 +- test/templates/unit_test_self_hosted.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 6f7e6e0b349..e229c524176 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -8,7 +8,7 @@ jobs: group: vitess-ubuntu20 env: GOPRIVATE: github.com/slackhq/vitess-addons - GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 572a0ec6a1b..5d01388d080 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -18,7 +18,7 @@ jobs: group: vitess-ubuntu20 env: GOPRIVATE: github.com/slackhq/vitess-addons - GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped diff --git a/test/templates/unit_test_self_hosted.tpl b/test/templates/unit_test_self_hosted.tpl index 76925e3f4c1..45d0d8ac4bf 100644 --- a/test/templates/unit_test_self_hosted.tpl +++ b/test/templates/unit_test_self_hosted.tpl @@ -10,7 +10,7 @@ jobs: group: vitess-ubuntu20 env: GOPRIVATE: github.com/slackhq/vitess-addons - GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + GH_ACCESS_TOKEN: {{"${{ secrets.GH_ACCESS_TOKEN }}"}} steps: - name: Check if workflow needs to be skipped From c759feaa2ced48ececca91bddea92f404bb2d513 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 20:40:51 +0200 Subject: [PATCH 14/25] Missing non-template update Signed-off-by: Tim Vaillancourt --- .github/workflows/static_checks_etc.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index c7bc01fe2db..bc9d42a9842 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -9,6 +9,9 @@ jobs: name: Static Code Checks Etc runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -96,6 +99,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' run: | From 7d8e61ef88c4ee77c713c93ce6042eb1982f43aa Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 20:49:05 +0200 Subject: [PATCH 15/25] Missing non-template update Signed-off-by: Tim Vaillancourt --- .github/workflows/check_make_vtadmin_authz_testgen.yml | 6 ++++++ .github/workflows/docker_test_cluster_10.yml | 6 ++++++ .github/workflows/docker_test_cluster_25.yml | 6 ++++++ .github/workflows/e2e_race.yml | 6 ++++++ .github/workflows/endtoend.yml | 6 ++++++ .github/workflows/unit_race.yml | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index c2d3c8691d8..4d1596dc035 100644 --- a/.github/workflows/check_make_vtadmin_authz_testgen.yml +++ b/.github/workflows/check_make_vtadmin_authz_testgen.yml @@ -5,6 +5,9 @@ jobs: build: name: Check Make vtadmin_authz_testgen runs-on: ubuntu-latest + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped id: skip-workflow @@ -43,6 +46,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' run: | diff --git a/.github/workflows/docker_test_cluster_10.yml b/.github/workflows/docker_test_cluster_10.yml index de79d6914a8..91c7db8ab55 100644 --- a/.github/workflows/docker_test_cluster_10.yml +++ b/.github/workflows/docker_test_cluster_10.yml @@ -6,6 +6,9 @@ jobs: name: Docker Test Cluster 10 runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -49,6 +52,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | diff --git a/.github/workflows/docker_test_cluster_25.yml b/.github/workflows/docker_test_cluster_25.yml index 86a0c4c8396..9f51c123b14 100644 --- a/.github/workflows/docker_test_cluster_25.yml +++ b/.github/workflows/docker_test_cluster_25.yml @@ -6,6 +6,9 @@ jobs: name: Docker Test Cluster 25 runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped @@ -49,6 +52,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index 4098a9e9659..ff7b4420dec 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -6,6 +6,9 @@ jobs: name: End-to-End Test (Race) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped id: skip-workflow @@ -47,6 +50,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index 3f68901ecc8..923a20bea11 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -6,6 +6,9 @@ jobs: name: End-to-End Test runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped id: skip-workflow @@ -47,6 +50,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' run: | diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 3d181c5f19c..2b990659a3a 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -10,6 +10,9 @@ jobs: name: Unit Test (Race) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Check if workflow needs to be skipped id: skip-workflow @@ -51,6 +54,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' run: | From 49d58c5a8eb75e543f2f5a2342880a032a7820ea Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 20:53:36 +0200 Subject: [PATCH 16/25] Missing non-template update, pt 3 Signed-off-by: Tim Vaillancourt --- .github/workflows/local_example.yml | 6 ++++++ .github/workflows/region_example.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index 6602ff0df8c..59ad7c0dbe4 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -5,6 +5,9 @@ jobs: build: name: Local example using ${{ matrix.topo }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} strategy: matrix: os: [ubuntu-latest] @@ -52,6 +55,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - uses: actions/setup-node@v3 if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' with: diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index 4b9aa2d93d2..339eddcebe8 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -5,6 +5,9 @@ jobs: build: name: Region Sharding example using ${{ matrix.topo }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} strategy: matrix: os: [ubuntu-latest] @@ -52,6 +55,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - uses: actions/setup-node@v3 if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' with: From 82b1931ad7bf3e0c3e9736075275c9a67a02b4f2 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 21:07:39 +0200 Subject: [PATCH 17/25] Fix docker tests Signed-off-by: Tim Vaillancourt --- docker/test/run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/test/run.sh b/docker/test/run.sh index e41a529c51d..870cdce425f 100755 --- a/docker/test/run.sh +++ b/docker/test/run.sh @@ -181,6 +181,10 @@ bashcmd=$(append_cmd "$bashcmd" "rm -rf /vt/bin; ln -s /vt/src/vitess.io/vitess/ bashcmd=$(append_cmd "$bashcmd" "rm -rf /vt/lib; ln -s /vt/src/vitess.io/vitess/lib /vt/lib") bashcmd=$(append_cmd "$bashcmd" "rm -rf /vt/vthook; ln -s /vt/src/vitess.io/vitess/vthook /vt/vthook") +# Setup git for private go modules +bashcmd=$(append_cmd "$bashcmd" "export GOPRIVATE=$GOPRIVATE") +bashcmd=$(append_cmd "$bashcmd" "git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/") + # Maven was setup in /vt/dist, may need to reinstall it. bashcmd=$(append_cmd "$bashcmd" "echo 'Checking if mvn needs installing...'; if [[ ! \$(command -v mvn) ]]; then echo 'install maven'; curl -sL --connect-timeout 10 --retry 3 http://www-us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | tar -xz && mv apache-maven-3.3.9 /vt/dist/maven; fi; echo 'mvn check done'") From 292e57c61739d7d8dba680d68e9a479e2c7c03cd Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 21:21:40 +0200 Subject: [PATCH 18/25] make proto Signed-off-by: Tim Vaillancourt --- go/vt/proto/automation/automation.pb.go | 2 +- go/vt/proto/automationservice/automationservice.pb.go | 2 +- go/vt/proto/binlogdata/binlogdata.pb.go | 2 +- go/vt/proto/binlogservice/binlogservice.pb.go | 2 +- go/vt/proto/logutil/logutil.pb.go | 2 +- go/vt/proto/mysqlctl/mysqlctl.pb.go | 2 +- go/vt/proto/query/query.pb.go | 2 +- go/vt/proto/queryservice/queryservice.pb.go | 2 +- go/vt/proto/replicationdata/replicationdata.pb.go | 2 +- go/vt/proto/tableacl/tableacl.pb.go | 2 +- go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go | 2 +- go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go | 2 +- go/vt/proto/throttlerdata/throttlerdata.pb.go | 2 +- go/vt/proto/throttlerservice/throttlerservice.pb.go | 2 +- go/vt/proto/topodata/topodata.pb.go | 2 +- go/vt/proto/vschema/vschema.pb.go | 2 +- go/vt/proto/vtadmin/vtadmin.pb.go | 2 +- go/vt/proto/vtctldata/vtctldata.pb.go | 2 +- go/vt/proto/vtctlservice/vtctlservice.pb.go | 2 +- go/vt/proto/vtgate/vtgate.pb.go | 2 +- go/vt/proto/vtgateservice/vtgateservice.pb.go | 2 +- go/vt/proto/vtrpc/vtrpc.pb.go | 2 +- go/vt/proto/vttest/vttest.pb.go | 2 +- go/vt/proto/vttime/vttime.pb.go | 2 +- go/vt/proto/workflow/workflow.pb.go | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/go/vt/proto/automation/automation.pb.go b/go/vt/proto/automation/automation.pb.go index 5282daee098..25ab033d8a0 100644 --- a/go/vt/proto/automation/automation.pb.go +++ b/go/vt/proto/automation/automation.pb.go @@ -20,7 +20,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: automation.proto diff --git a/go/vt/proto/automationservice/automationservice.pb.go b/go/vt/proto/automationservice/automationservice.pb.go index a179f8f52f7..00b5ca79cbb 100644 --- a/go/vt/proto/automationservice/automationservice.pb.go +++ b/go/vt/proto/automationservice/automationservice.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: automationservice.proto diff --git a/go/vt/proto/binlogdata/binlogdata.pb.go b/go/vt/proto/binlogdata/binlogdata.pb.go index 22d61cfdc5f..f520ca0998c 100644 --- a/go/vt/proto/binlogdata/binlogdata.pb.go +++ b/go/vt/proto/binlogdata/binlogdata.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: binlogdata.proto diff --git a/go/vt/proto/binlogservice/binlogservice.pb.go b/go/vt/proto/binlogservice/binlogservice.pb.go index 2c3b33de1cd..565065a4dc1 100644 --- a/go/vt/proto/binlogservice/binlogservice.pb.go +++ b/go/vt/proto/binlogservice/binlogservice.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: binlogservice.proto diff --git a/go/vt/proto/logutil/logutil.pb.go b/go/vt/proto/logutil/logutil.pb.go index 72409893b4c..b52a8d359c4 100644 --- a/go/vt/proto/logutil/logutil.pb.go +++ b/go/vt/proto/logutil/logutil.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: logutil.proto diff --git a/go/vt/proto/mysqlctl/mysqlctl.pb.go b/go/vt/proto/mysqlctl/mysqlctl.pb.go index a4e67f96fe3..628dc116880 100644 --- a/go/vt/proto/mysqlctl/mysqlctl.pb.go +++ b/go/vt/proto/mysqlctl/mysqlctl.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: mysqlctl.proto diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index b6da31e8183..7b9b42bc0a9 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: query.proto diff --git a/go/vt/proto/queryservice/queryservice.pb.go b/go/vt/proto/queryservice/queryservice.pb.go index 195a49579af..09c5ca8803b 100644 --- a/go/vt/proto/queryservice/queryservice.pb.go +++ b/go/vt/proto/queryservice/queryservice.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: queryservice.proto diff --git a/go/vt/proto/replicationdata/replicationdata.pb.go b/go/vt/proto/replicationdata/replicationdata.pb.go index 7fc537b9cca..9234b7e1ffa 100644 --- a/go/vt/proto/replicationdata/replicationdata.pb.go +++ b/go/vt/proto/replicationdata/replicationdata.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: replicationdata.proto diff --git a/go/vt/proto/tableacl/tableacl.pb.go b/go/vt/proto/tableacl/tableacl.pb.go index c8d91c6cfd8..663acdee2af 100644 --- a/go/vt/proto/tableacl/tableacl.pb.go +++ b/go/vt/proto/tableacl/tableacl.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: tableacl.proto diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index f32eeee32c7..da766ccacfe 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: tabletmanagerdata.proto diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go index 70af0d0ca16..ae1c970d12f 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: tabletmanagerservice.proto diff --git a/go/vt/proto/throttlerdata/throttlerdata.pb.go b/go/vt/proto/throttlerdata/throttlerdata.pb.go index 5aa03276cb0..6e5587afdaf 100644 --- a/go/vt/proto/throttlerdata/throttlerdata.pb.go +++ b/go/vt/proto/throttlerdata/throttlerdata.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: throttlerdata.proto diff --git a/go/vt/proto/throttlerservice/throttlerservice.pb.go b/go/vt/proto/throttlerservice/throttlerservice.pb.go index b2f108003c6..293a7420fa9 100644 --- a/go/vt/proto/throttlerservice/throttlerservice.pb.go +++ b/go/vt/proto/throttlerservice/throttlerservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: throttlerservice.proto diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 99cf8dfe48f..9683f926fea 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -20,7 +20,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: topodata.proto diff --git a/go/vt/proto/vschema/vschema.pb.go b/go/vt/proto/vschema/vschema.pb.go index a6f44d9c23e..3471a311d24 100644 --- a/go/vt/proto/vschema/vschema.pb.go +++ b/go/vt/proto/vschema/vschema.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vschema.proto diff --git a/go/vt/proto/vtadmin/vtadmin.pb.go b/go/vt/proto/vtadmin/vtadmin.pb.go index 961635f1d89..b1e0c437918 100644 --- a/go/vt/proto/vtadmin/vtadmin.pb.go +++ b/go/vt/proto/vtadmin/vtadmin.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtadmin.proto diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index bee3b7c9dad..616e63f0d24 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtctldata.proto diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index fab6c3b40f7..101f5ba60df 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtctlservice.proto diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index 11914d8f3fb..675b4504e7d 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtgate.proto diff --git a/go/vt/proto/vtgateservice/vtgateservice.pb.go b/go/vt/proto/vtgateservice/vtgateservice.pb.go index ce7358d64ec..f531d1b5f0b 100644 --- a/go/vt/proto/vtgateservice/vtgateservice.pb.go +++ b/go/vt/proto/vtgateservice/vtgateservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtgateservice.proto diff --git a/go/vt/proto/vtrpc/vtrpc.pb.go b/go/vt/proto/vtrpc/vtrpc.pb.go index 1988d2b7561..920e9f0b4e0 100644 --- a/go/vt/proto/vtrpc/vtrpc.pb.go +++ b/go/vt/proto/vtrpc/vtrpc.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vtrpc.proto diff --git a/go/vt/proto/vttest/vttest.pb.go b/go/vt/proto/vttest/vttest.pb.go index aaf38b1d046..5297c0e5694 100644 --- a/go/vt/proto/vttest/vttest.pb.go +++ b/go/vt/proto/vttest/vttest.pb.go @@ -41,7 +41,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vttest.proto diff --git a/go/vt/proto/vttime/vttime.pb.go b/go/vt/proto/vttime/vttime.pb.go index d0debf8d2fa..ef0d62f24cc 100644 --- a/go/vt/proto/vttime/vttime.pb.go +++ b/go/vt/proto/vttime/vttime.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: vttime.proto diff --git a/go/vt/proto/workflow/workflow.pb.go b/go/vt/proto/workflow/workflow.pb.go index b102179225a..c0e136f4651 100644 --- a/go/vt/proto/workflow/workflow.pb.go +++ b/go/vt/proto/workflow/workflow.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.33.0 // protoc v3.21.3 // source: workflow.proto From f422a4eea1c0d70ff3c67223d22b34b297057b84 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 21:42:27 +0200 Subject: [PATCH 19/25] fix upgrade/downgrade tests Signed-off-by: Tim Vaillancourt --- .github/workflows/upgrade_downgrade_test_backups_e2e.yml | 6 ++++++ .../upgrade_downgrade_test_backups_e2e_next_release.yml | 6 ++++++ .github/workflows/upgrade_downgrade_test_backups_manual.yml | 6 ++++++ .../upgrade_downgrade_test_backups_manual_next_release.yml | 6 ++++++ .../upgrade_downgrade_test_query_serving_queries.yml | 6 ++++++ ...de_downgrade_test_query_serving_queries_next_release.yml | 6 ++++++ .../upgrade_downgrade_test_query_serving_schema.yml | 6 ++++++ ...ade_downgrade_test_query_serving_schema_next_release.yml | 6 ++++++ .../workflows/upgrade_downgrade_test_reparent_new_vtctl.yml | 6 ++++++ .../upgrade_downgrade_test_reparent_new_vttablet.yml | 6 ++++++ .../workflows/upgrade_downgrade_test_reparent_old_vtctl.yml | 6 ++++++ .../upgrade_downgrade_test_reparent_old_vttablet.yml | 6 ++++++ 12 files changed, 72 insertions(+) diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index f7ce296bc12..d457a711ab8 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -34,6 +34,9 @@ jobs: name: Run Upgrade Downgrade Test - Backups - E2E runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -79,6 +82,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml index 74f4b8d11eb..61a8178e477 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -34,6 +34,9 @@ jobs: name: Run Upgrade Downgrade Test - Backups - E2E - Next Release runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -82,6 +85,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index 5ffbe435d3e..36ec9e13127 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -35,6 +35,9 @@ jobs: name: Run Upgrade Downgrade Test - Backups - Manual runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -81,6 +84,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml index 3b3d39e44e9..bde814324cd 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -35,6 +35,9 @@ jobs: name: Run Upgrade Downgrade Test - Backups - Manual - Next Release runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -84,6 +87,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index 83b7936c3c8..c613b88c46c 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Query Serving (Queries) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -81,6 +84,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml index 3cb6e075e61..81c8f55c76f 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Query Serving (Queries) Next Release runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -84,6 +87,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index 63d55b39f9f..992b63967c3 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Query Serving (Schema) runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -81,6 +84,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml index 4652c163351..f5efc562bef 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml @@ -35,6 +35,9 @@ jobs: if: always() && (needs.get_next_release.result == 'success') name: Run Upgrade Downgrade Test - Query Serving (Schema) Next Release runs-on: ubuntu-latest + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -83,6 +86,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index c5adc952129..7076b293906 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Reparent New Vtctl runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -84,6 +87,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index ec6359c67f1..a952bf33dfc 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Reparent New VTTablet runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_next_release @@ -84,6 +87,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index 3c304c2a3d7..166511e03be 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Reparent Old Vtctl runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -81,6 +84,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index 3eeb9749538..60989c25746 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -36,6 +36,9 @@ jobs: name: Run Upgrade Downgrade Test - Reparent Old VTTablet runs-on: group: vitess-ubuntu20 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} needs: - get_previous_release @@ -81,6 +84,9 @@ jobs: with: go-version: 1.21.8 + - name: Setup github.com/slackhq/vitess-additions access token + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@v4 From 18faa1eb9b91e1eb89c9dfd5be90a107a62d4503 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Mon, 21 Nov 2022 08:00:42 +0100 Subject: [PATCH 20/25] Update all the Go dependencies (#11741) * Update all the Go dependencies This seems to work for the basics just fine, so let's have CI take a run at this as well to update these. Only one small update to the Azure blob storage handling seems needed so far. Signed-off-by: Dirkjan Bussink * Use correct proto comparisons We're using `reflect.DeepEqual` or `testify` helpers that essentially use that in a number of places are comparing protobufs. This is not supported though, protobufs are not comparable with `reflect.DeepEqual`. This is exposed because of the tiny patch bump of protobuf which changes some internal optimization of how it initializes protobufs that breaks all this. Instead, move to the appropriate helpers here. Signed-off-by: Dirkjan Bussink Signed-off-by: Dirkjan Bussink --- go/sqltypes/result_test.go | 39 ++++++------ go/stats/statsd/statsd_test.go | 62 ++++++++++--------- go/vt/mysqlctl/azblobbackupstorage/azblob.go | 2 +- go/vt/vtadmin/api_test.go | 18 +++--- go/vt/vtgate/engine/limit_test.go | 60 +++++++++++------- go/vt/vtgate/executor_dml_test.go | 3 +- go/vt/vtgate/executor_test.go | 6 +- .../tabletmanager/vreplication/engine_test.go | 10 +-- .../tabletserver/connpool/dbconn_test.go | 11 ++-- .../tabletserver/health_streamer_test.go | 11 ++-- .../messager/message_manager_test.go | 12 ++-- .../tabletserver/query_executor_test.go | 14 ++--- .../tabletserver/state_manager_test.go | 2 +- 13 files changed, 132 insertions(+), 118 deletions(-) diff --git a/go/sqltypes/result_test.go b/go/sqltypes/result_test.go index c0525f8dc03..90d2eb9af65 100644 --- a/go/sqltypes/result_test.go +++ b/go/sqltypes/result_test.go @@ -17,7 +17,6 @@ limitations under the License. package sqltypes import ( - "reflect" "testing" "vitess.io/vitess/go/test/utils" @@ -31,20 +30,20 @@ func TestRepair(t *testing.T) { }, { Type: VarChar, }} - in := Result{ + in := &Result{ Rows: [][]Value{ {TestValue(VarBinary, "1"), TestValue(VarBinary, "aa")}, {TestValue(VarBinary, "2"), TestValue(VarBinary, "bb")}, }, } - want := Result{ + want := &Result{ Rows: [][]Value{ {TestValue(Int64, "1"), TestValue(VarChar, "aa")}, {TestValue(Int64, "2"), TestValue(VarChar, "bb")}, }, } in.Repair(fields) - if !reflect.DeepEqual(in, want) { + if !in.Equal(want) { t.Errorf("Repair:\n%#v, want\n%#v", in, want) } } @@ -85,7 +84,7 @@ func TestTruncate(t *testing.T) { } out := in.Truncate(0) - if !reflect.DeepEqual(out, in) { + if !out.Equal(in) { t.Errorf("Truncate(0):\n%v, want\n%v", out, in) } @@ -102,7 +101,7 @@ func TestTruncate(t *testing.T) { {TestValue(Int64, "3")}, }, } - if !reflect.DeepEqual(out, want) { + if !out.Equal(want) { t.Errorf("Truncate(1):\n%v, want\n%v", out, want) } } @@ -279,19 +278,21 @@ func TestStripMetaData(t *testing.T) { }, }} for _, tcase := range testcases { - inCopy := tcase.in.Copy() - out := inCopy.StripMetadata(tcase.includedFields) - if !reflect.DeepEqual(out, tcase.expected) { - t.Errorf("StripMetaData unexpected result for %v: %v", tcase.name, out) - } - if len(tcase.in.Fields) > 0 { - // check the out array is different than the in array. - if out.Fields[0] == inCopy.Fields[0] && tcase.includedFields != querypb.ExecuteOptions_ALL { - t.Errorf("StripMetaData modified original Field for %v", tcase.name) + t.Run(tcase.name, func(t *testing.T) { + inCopy := tcase.in.Copy() + out := inCopy.StripMetadata(tcase.includedFields) + if !out.Equal(tcase.expected) { + t.Errorf("StripMetaData unexpected result for %v: %v", tcase.name, out) + } + if len(tcase.in.Fields) > 0 { + // check the out array is different than the in array. + if out.Fields[0] == inCopy.Fields[0] && tcase.includedFields != querypb.ExecuteOptions_ALL { + t.Errorf("StripMetaData modified original Field for %v", tcase.name) + } } - } - // check we didn't change the original result. - utils.MustMatch(t, tcase.in, inCopy) + // check we didn't change the original result. + utils.MustMatch(t, tcase.in, inCopy) + }) } } @@ -340,7 +341,7 @@ func TestAppendResult(t *testing.T) { result.AppendResult(src) - if !reflect.DeepEqual(result, want) { + if !result.Equal(want) { t.Errorf("Got:\n%#v, want:\n%#v", result, want) } } diff --git a/go/stats/statsd/statsd_test.go b/go/stats/statsd/statsd_test.go index 982ad321f0e..c615da3cdfd 100644 --- a/go/stats/statsd/statsd_test.go +++ b/go/stats/statsd/statsd_test.go @@ -55,8 +55,8 @@ func TestStatsdCounter(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_name:1|c" - assert.Equal(t, result, expected) + expected := "test.counter_name:1|c\n" + assert.Equal(t, expected, result) } }) if !found { @@ -84,8 +84,8 @@ func TestStatsdGauge(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_name:10.000000|g" - assert.Equal(t, result, expected) + expected := "test.gauge_name:10|g\n" + assert.Equal(t, expected, result) } }) if !found { @@ -113,8 +113,8 @@ func TestStatsdGaugeFloat64(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_name_f64:3.140000|g" - assert.Equal(t, result, expected) + expected := "test.gauge_name_f64:3.14|g\n" + assert.Equal(t, expected, result) } }) if !found { @@ -143,8 +143,8 @@ func TestStatsdGaugeFunc(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_func_name:2.000000|g" - assert.Equal(t, result, expected) + expected := "test.gauge_func_name:2|g\n" + assert.Equal(t, expected, result) } }) if !found { @@ -172,8 +172,8 @@ func TestStatsdCounterDuration(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_duration_name:1.000000|ms" - assert.Equal(t, result, expected) + expected := "test.counter_duration_name:1.000000|ms\n" + assert.Equal(t, expected, result) } }) if !found { @@ -203,11 +203,12 @@ func TestStatsdCountersWithSingleLabel(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ + "", "test.counter_with_single_label_name:0|c|#label:tag2", "test.counter_with_single_label_name:2|c|#label:tag1", } for i, res := range result { - assert.Equal(t, res, expected[i]) + assert.Equal(t, expected[i], res) } } }) @@ -236,8 +237,8 @@ func TestStatsdCountersWithMultiLabels(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_with_multiple_label_name:1|c|#label1:foo,label2:bar" - assert.Equal(t, result, expected) + expected := "test.counter_with_multiple_label_name:1|c|#label1:foo,label2:bar\n" + assert.Equal(t, expected, result) } }) if !found { @@ -271,11 +272,12 @@ func TestStatsdCountersFuncWithMultiLabels(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ + "", "test.counter_func_with_multiple_labels_name:1|c|#label1:foo,label2:bar", "test.counter_func_with_multiple_labels_name:2|c|#label1:bar,label2:baz", } for i, res := range result { - assert.Equal(t, res, expected[i]) + assert.Equal(t, expected[i], res) } } }) @@ -304,8 +306,8 @@ func TestStatsdGaugesWithMultiLabels(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauges_with_multiple_label_name:3.000000|g|#label1:foo,label2:bar" - assert.Equal(t, result, expected) + expected := "test.gauges_with_multiple_label_name:3|g|#label1:foo,label2:bar\n" + assert.Equal(t, expected, result) } }) if !found { @@ -339,11 +341,12 @@ func TestStatsdGaugesFuncWithMultiLabels(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ - "test.gauges_func_with_multiple_labels_name:1.000000|g|#label1:foo,label2:bar", - "test.gauges_func_with_multiple_labels_name:2.000000|g|#label1:bar,label2:baz", + "", + "test.gauges_func_with_multiple_labels_name:1|g|#label1:foo,label2:bar", + "test.gauges_func_with_multiple_labels_name:2|g|#label1:bar,label2:baz", } for i, res := range result { - assert.Equal(t, res, expected[i]) + assert.Equal(t, expected[i], res) } } }) @@ -372,8 +375,8 @@ func TestStatsdGaugesWithSingleLabel(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauges_with_single_label_name:1.000000|g|#label1:bar" - assert.Equal(t, result, expected) + expected := "test.gauges_with_single_label_name:1|g|#label1:bar\n" + assert.Equal(t, expected, result) } }) if !found { @@ -401,8 +404,8 @@ func TestStatsdMultiTimings(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.multi_timings_name:10.000000|ms|#label1:foo,label2:bar" - assert.Equal(t, result, expected) + expected := "test.multi_timings_name:10.000000|ms|#label1:foo,label2:bar\n" + assert.Equal(t, expected, result) } }) if !found { @@ -430,8 +433,8 @@ func TestStatsdTimings(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.timings_name:2.000000|ms|#label1:foo" - assert.Equal(t, result, expected) + expected := "test.timings_name:2.000000|ms|#label1:foo\n" + assert.Equal(t, expected, result) } }) if !found { @@ -462,12 +465,13 @@ func TestStatsdHistogram(t *testing.T) { } result := string(bytes[:n]) expected := []string{ - "test.histogram_name:2.000000|h", - "test.histogram_name:3.000000|h", - "test.histogram_name:6.000000|h", + "test.histogram_name:2|h", + "test.histogram_name:3|h", + "test.histogram_name:6|h", + "", } for i, res := range strings.Split(result, "\n") { - assert.Equal(t, res, expected[i]) + assert.Equal(t, expected[i], res) } } }) diff --git a/go/vt/mysqlctl/azblobbackupstorage/azblob.go b/go/vt/mysqlctl/azblobbackupstorage/azblob.go index beddc33333c..660abcc5008 100644 --- a/go/vt/mysqlctl/azblobbackupstorage/azblob.go +++ b/go/vt/mysqlctl/azblobbackupstorage/azblob.go @@ -264,7 +264,7 @@ func (bh *AZBlobBackupHandle) ReadFile(ctx context.Context, filename string) (io } blobURL := containerURL.NewBlobURL(obj) - resp, err := blobURL.Download(ctx, 0, azblob.CountToEnd, azblob.BlobAccessConditions{}, false) + resp, err := blobURL.Download(ctx, 0, azblob.CountToEnd, azblob.BlobAccessConditions{}, false, azblob.ClientProvidedKeyOptions{}) if err != nil { return nil, err } diff --git a/go/vt/vtadmin/api_test.go b/go/vt/vtadmin/api_test.go index 04f758c68c0..f1c9833ca98 100644 --- a/go/vt/vtadmin/api_test.go +++ b/go/vt/vtadmin/api_test.go @@ -567,7 +567,7 @@ func TestFindSchema(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, tt.expected, resp) + assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) }) } @@ -815,7 +815,7 @@ func TestFindSchema(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, expected, schema) + assert.Truef(t, proto.Equal(expected, schema), "expected %v, got %v", expected, schema) }) } @@ -1091,7 +1091,7 @@ func TestGetKeyspace(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, tt.expected, ks) + assert.Truef(t, proto.Equal(tt.expected, ks), "expected %v, got %v", tt.expected, ks) }, vtctlds...) }) } @@ -1575,7 +1575,7 @@ func TestGetSchema(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, tt.expected, resp) + assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) }) }) } @@ -1742,7 +1742,7 @@ func TestGetSchema(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, expected, schema) + assert.Truef(t, proto.Equal(expected, schema), "expected %v, got %v", expected, schema) }) } @@ -2556,7 +2556,7 @@ func TestGetSchemas(t *testing.T) { } assert.NoError(t, err) - assert.ElementsMatch(t, expected.Schemas, resp.Schemas) + assert.Truef(t, proto.Equal(expected, resp), "expected: %v, got: %v", expected, resp) }) } @@ -2717,7 +2717,7 @@ func TestGetSrvVSchema(t *testing.T) { } require.NoError(t, err) - assert.Equal(t, tt.expected, resp) + assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) }) }) } @@ -3609,7 +3609,7 @@ func TestGetVSchema(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, tt.expected, resp) + assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) }) } } @@ -4155,7 +4155,7 @@ func TestGetWorkflow(t *testing.T) { } assert.NoError(t, err) - assert.Equal(t, tt.expected, resp) + assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) }) } } diff --git a/go/vt/vtgate/engine/limit_test.go b/go/vt/vtgate/engine/limit_test.go index 0aacb93fe40..dcdc43880a0 100644 --- a/go/vt/vtgate/engine/limit_test.go +++ b/go/vt/vtgate/engine/limit_test.go @@ -19,7 +19,6 @@ package engine import ( "context" "errors" - "reflect" "testing" "github.com/stretchr/testify/assert" @@ -62,7 +61,7 @@ func TestLimitExecute(t *testing.T) { "a|1", "b|2", ) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -89,7 +88,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, inputResult) { + if !result.Equal(inputResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -110,7 +109,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -136,7 +135,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(2)}, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } } @@ -174,7 +173,7 @@ func TestLimitOffsetExecute(t *testing.T) { "a|1", "b|2", ) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -205,7 +204,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -235,7 +234,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -266,7 +265,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -295,7 +294,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -323,7 +322,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -349,7 +348,7 @@ func TestLimitOffsetExecute(t *testing.T) { } result, err = l.TryExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(1), "o": sqltypes.Int64BindVariable(1)}, false) require.NoError(t, err) - if !reflect.DeepEqual(result, wantResult) { + if !result.Equal(wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } } @@ -387,8 +386,11 @@ func TestLimitStreamExecute(t *testing.T) { "a|1", "b|2", ) - if !reflect.DeepEqual(results, wantResults) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + require.Len(t, results, len(wantResults)) + for i, result := range results { + if !result.Equal(wantResults[i]) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + } } // Test with bind vars. @@ -400,8 +402,11 @@ func TestLimitStreamExecute(t *testing.T) { return nil }) require.NoError(t, err) - if !reflect.DeepEqual(results, wantResults) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + require.Len(t, results, len(wantResults)) + for i, result := range results { + if !result.Equal(wantResults[i]) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + } } // Test with limit equal to input @@ -420,8 +425,11 @@ func TestLimitStreamExecute(t *testing.T) { "---", "c|3", ) - if !reflect.DeepEqual(results, wantResults) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + require.Len(t, results, len(wantResults)) + for i, result := range results { + if !result.Equal(wantResults[i]) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + } } // Test with limit higher than input. @@ -434,8 +442,11 @@ func TestLimitStreamExecute(t *testing.T) { }) require.NoError(t, err) // wantResults is same as before. - if !reflect.DeepEqual(results, wantResults) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + require.Len(t, results, len(wantResults)) + for i, result := range results { + if !result.Equal(wantResults[i]) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + } } } @@ -477,8 +488,11 @@ func TestOffsetStreamExecute(t *testing.T) { "---", "e|5", ) - if !reflect.DeepEqual(results, wantResults) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + require.Len(t, results, len(wantResults)) + for i, result := range results { + if !result.Equal(wantResults[i]) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) + } } } @@ -495,7 +509,7 @@ func TestLimitGetFields(t *testing.T) { got, err := l.GetFields(context.Background(), nil, nil) require.NoError(t, err) - if !reflect.DeepEqual(got, result) { + if !got.Equal(result) { t.Errorf("l.GetFields:\n%v, want\n%v", got, result) } } diff --git a/go/vt/vtgate/executor_dml_test.go b/go/vt/vtgate/executor_dml_test.go index 05fcb59255d..983450c83cd 100644 --- a/go/vt/vtgate/executor_dml_test.go +++ b/go/vt/vtgate/executor_dml_test.go @@ -19,7 +19,6 @@ package vtgate import ( "context" "fmt" - "reflect" "strings" "testing" @@ -1165,7 +1164,7 @@ func TestInsertShardedIgnore(t *testing.T) { query = "insert ignore into insert_ignore_test(pv, owned, verify) values (1, 1, 1)" qr, err := executorExec(executor, query, nil) require.NoError(t, err) - if !reflect.DeepEqual(qr, &sqltypes.Result{}) { + if !qr.Equal(&sqltypes.Result{}) { t.Errorf("qr: %v, want empty result", qr) } assertQueries(t, sbc1, nil) diff --git a/go/vt/vtgate/executor_test.go b/go/vt/vtgate/executor_test.go index 6e80f3841aa..32121c37c79 100644 --- a/go/vt/vtgate/executor_test.go +++ b/go/vt/vtgate/executor_test.go @@ -1110,7 +1110,7 @@ func TestExecutorComment(t *testing.T) { if err != nil { t.Error(err) } - if !reflect.DeepEqual(gotResult, wantResult) { + if !gotResult.Equal(wantResult) { t.Errorf("Exec %s: %v, want %v", stmt, gotResult, wantResult) } } @@ -1453,9 +1453,7 @@ func TestExecutorCreateVindexDDL(t *testing.T) { sbc2.ExecCount.Get(), sbclookup.ExecCount.Get(), } - if !reflect.DeepEqual(gotCount, wantCount) { - t.Errorf("Exec %s: %v, want %v", stmt, gotCount, wantCount) - } + require.Equal(t, wantCount, gotCount) } func TestExecutorAddDropVschemaTableDDL(t *testing.T) { diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go index 4c57f21dca1..66ca9213e26 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go @@ -175,7 +175,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr := &sqltypes.Result{InsertID: 1} - if !reflect.DeepEqual(qr, wantqr) { + if !qr.Equal(wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -217,7 +217,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr = &sqltypes.Result{RowsAffected: 1} - if !reflect.DeepEqual(qr, wantqr) { + if !qr.Equal(wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -257,7 +257,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr = &sqltypes.Result{RowsAffected: 1} - if !reflect.DeepEqual(qr, wantqr) { + if !qr.Equal(wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -355,7 +355,7 @@ func TestEngineSelect(t *testing.T) { if err != nil { t.Fatal(err) } - if !reflect.DeepEqual(qr, wantResult) { + if !qr.Equal(wantResult) { t.Errorf("Exec: %v, want %v", qr, wantResult) } } @@ -558,7 +558,7 @@ func TestCreateDBAndTable(t *testing.T) { t.Fatal(err) } wantqr := &sqltypes.Result{InsertID: 1} - if !reflect.DeepEqual(qr, wantqr) { + if !qr.Equal(wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() diff --git a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go index 5b0401621c0..62ec0b6d12e 100644 --- a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go +++ b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go @@ -20,7 +20,6 @@ import ( "context" "errors" "fmt" - "reflect" "strings" "testing" "time" @@ -79,7 +78,7 @@ func TestDBConnExec(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !reflect.DeepEqual(expectedResult, result) { + if !expectedResult.Equal(result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -152,7 +151,7 @@ func TestDBConnExecLost(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !reflect.DeepEqual(expectedResult, result) { + if !expectedResult.Equal(result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -226,7 +225,7 @@ func TestDBConnDeadline(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !reflect.DeepEqual(expectedResult, result) { + if !expectedResult.Equal(result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -240,7 +239,7 @@ func TestDBConnDeadline(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !reflect.DeepEqual(expectedResult, result) { + if !expectedResult.Equal(result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -405,7 +404,7 @@ func TestDBConnStream(t *testing.T) { if err != nil { t.Fatalf("should not get an error, err: %v", err) } - if !reflect.DeepEqual(expectedResult, &result) { + if !expectedResult.Equal(&result) { t.Errorf("Exec: %v, want %v", expectedResult, &result) } // Stream fail diff --git a/go/vt/vttablet/tabletserver/health_streamer_test.go b/go/vt/vttablet/tabletserver/health_streamer_test.go index 443dc4fafbf..a3c69432f9f 100644 --- a/go/vt/vttablet/tabletserver/health_streamer_test.go +++ b/go/vt/vttablet/tabletserver/health_streamer_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/fakesqldb" @@ -116,7 +117,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { HealthError: "tabletserver uninitialized", }, } - assert.Equal(t, want, shr) + assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) hs.ChangeState(topodatapb.TabletType_REPLICA, time.Time{}, 0, nil, false) shr = <-ch @@ -130,7 +131,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Equal(t, want, shr) + assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) // Test primary and timestamp. now := time.Now() @@ -148,7 +149,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Equal(t, want, shr) + assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) // Test non-serving, and 0 timestamp for non-primary. hs.ChangeState(topodatapb.TabletType_REPLICA, now, 1*time.Second, nil, false) @@ -164,7 +165,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Equal(t, want, shr) + assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) // Test Health error. hs.ChangeState(topodatapb.TabletType_REPLICA, now, 0, errors.New("repl err"), false) @@ -180,7 +181,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Equal(t, want, shr) + assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) } func TestReloadSchema(t *testing.T) { diff --git a/go/vt/vttablet/tabletserver/messager/message_manager_test.go b/go/vt/vttablet/tabletserver/messager/message_manager_test.go index a6158906e5a..28ea5b0a38a 100644 --- a/go/vt/vttablet/tabletserver/messager/message_manager_test.go +++ b/go/vt/vttablet/tabletserver/messager/message_manager_test.go @@ -216,7 +216,7 @@ func TestMessageManagerSend(t *testing.T) { want := &sqltypes.Result{ Fields: testFields, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %v, want %v", got, want) } // Set the channel to verify call to Postpone. @@ -230,7 +230,7 @@ func TestMessageManagerSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %v, want %v", got, want) } @@ -415,7 +415,7 @@ func TestMessageManagerBatchSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %v, want %v", got, row1) } mm.mu.Lock() @@ -432,7 +432,7 @@ func TestMessageManagerBatchSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %+v, want %+v", got, row1) } } @@ -481,7 +481,7 @@ func TestMessageManagerStreamerSimple(t *testing.T) { sqltypes.NewVarBinary("1"), }}, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %v, want %v", got, want) } } @@ -569,7 +569,7 @@ func TestMessageManagerStreamerAndPoller(t *testing.T) { sqltypes.NewVarBinary("3"), }}, } - if got := <-r1.ch; !reflect.DeepEqual(got, want) { + if got := <-r1.ch; !got.Equal(want) { t.Errorf("Received: %v, want %v", got, want) } } diff --git a/go/vt/vttablet/tabletserver/query_executor_test.go b/go/vt/vttablet/tabletserver/query_executor_test.go index 526419c4f49..e8e96614443 100644 --- a/go/vt/vttablet/tabletserver/query_executor_test.go +++ b/go/vt/vttablet/tabletserver/query_executor_test.go @@ -17,17 +17,15 @@ limitations under the License. package tabletserver import ( + "context" "fmt" "io" "math/rand" - "reflect" "strings" "testing" "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" - "context" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -686,7 +684,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(2), }}, } - if !reflect.DeepEqual(got, want) { + if !got.Equal(want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } @@ -718,7 +716,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(3), }}, } - if !reflect.DeepEqual(got, want) { + if !got.Equal(want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } @@ -750,7 +748,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(5), }}, } - if !reflect.DeepEqual(got, want) { + if !got.Equal(want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } } @@ -857,7 +855,7 @@ func TestQueryExecutorTableAcl(t *testing.T) { if err != nil { t.Fatalf("got: %v, want nil", err) } - if !reflect.DeepEqual(got, want) { + if !got.Equal(want) { t.Fatalf("qre.Execute() = %v, want: %v", got, want) } } @@ -901,7 +899,7 @@ func TestQueryExecutorTableAclNoPermission(t *testing.T) { if err != nil { t.Fatalf("got: %v, want nil", err) } - if !reflect.DeepEqual(got, want) { + if !got.Equal(want) { t.Fatalf("qre.Execute() = %v, want: %v", got, want) } tsv.StopService() diff --git a/go/vt/vttablet/tabletserver/state_manager_test.go b/go/vt/vttablet/tabletserver/state_manager_test.go index bb809d5b142..efe57e737cb 100644 --- a/go/vt/vttablet/tabletserver/state_manager_test.go +++ b/go/vt/vttablet/tabletserver/state_manager_test.go @@ -639,7 +639,7 @@ func TestStateManagerNotify(t *testing.T) { TabletAlias: &topodatapb.TabletAlias{}, } sm.hcticks.Stop() - assert.Equal(t, wantshr, gotshr) + assert.Truef(t, proto.Equal(gotshr, wantshr), "got: %v, want: %v", gotshr, wantshr) sm.StopService() } From 1f83b78bd215166a381d50561f3123993e157a72 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Mon, 8 Apr 2024 22:17:32 +0200 Subject: [PATCH 21/25] Resolve signature mismatch Signed-off-by: Tim Vaillancourt --- go/vt/mysqlctl/azblobbackupstorage/azblob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/mysqlctl/azblobbackupstorage/azblob.go b/go/vt/mysqlctl/azblobbackupstorage/azblob.go index 660abcc5008..beddc33333c 100644 --- a/go/vt/mysqlctl/azblobbackupstorage/azblob.go +++ b/go/vt/mysqlctl/azblobbackupstorage/azblob.go @@ -264,7 +264,7 @@ func (bh *AZBlobBackupHandle) ReadFile(ctx context.Context, filename string) (io } blobURL := containerURL.NewBlobURL(obj) - resp, err := blobURL.Download(ctx, 0, azblob.CountToEnd, azblob.BlobAccessConditions{}, false, azblob.ClientProvidedKeyOptions{}) + resp, err := blobURL.Download(ctx, 0, azblob.CountToEnd, azblob.BlobAccessConditions{}, false) if err != nil { return nil, err } From 611941f133d4be1a08a9e95acaa82074a78a82cd Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 9 Apr 2024 14:35:00 +0200 Subject: [PATCH 22/25] revert protobuf version Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bfa353f1cf9..51896091921 100644 --- a/go.mod +++ b/go.mod @@ -100,7 +100,7 @@ require ( google.golang.org/grpc v1.45.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 google.golang.org/grpc/examples v0.0.0-20210430044426-28078834f35b - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.28.0 gopkg.in/DataDog/dd-trace-go.v1 v1.17.0 gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/gcfg.v1 v1.2.3 diff --git a/go.sum b/go.sum index 2a0af4469f2..98f88a3413e 100644 --- a/go.sum +++ b/go.sum @@ -1214,8 +1214,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/DataDog/dd-trace-go.v1 v1.17.0 h1:j9vAp9Re9bbtA/QFehkJpNba/6W2IbJtNuXZophCa54= gopkg.in/DataDog/dd-trace-go.v1 v1.17.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= From 1d0f1362becfdd74b4420f014f5800c29b973f52 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 9 Apr 2024 14:36:38 +0200 Subject: [PATCH 23/25] revert protobuf version, pt 2 Signed-off-by: Tim Vaillancourt --- go/vt/proto/automation/automation.pb.go | 2 +- go/vt/proto/automationservice/automationservice.pb.go | 2 +- go/vt/proto/binlogdata/binlogdata.pb.go | 2 +- go/vt/proto/binlogservice/binlogservice.pb.go | 2 +- go/vt/proto/logutil/logutil.pb.go | 2 +- go/vt/proto/mysqlctl/mysqlctl.pb.go | 2 +- go/vt/proto/query/query.pb.go | 2 +- go/vt/proto/queryservice/queryservice.pb.go | 2 +- go/vt/proto/replicationdata/replicationdata.pb.go | 2 +- go/vt/proto/tableacl/tableacl.pb.go | 2 +- go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go | 2 +- go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go | 2 +- go/vt/proto/throttlerdata/throttlerdata.pb.go | 2 +- go/vt/proto/throttlerservice/throttlerservice.pb.go | 2 +- go/vt/proto/topodata/topodata.pb.go | 2 +- go/vt/proto/vschema/vschema.pb.go | 2 +- go/vt/proto/vtadmin/vtadmin.pb.go | 2 +- go/vt/proto/vtctldata/vtctldata.pb.go | 2 +- go/vt/proto/vtctlservice/vtctlservice.pb.go | 2 +- go/vt/proto/vtgate/vtgate.pb.go | 2 +- go/vt/proto/vtgateservice/vtgateservice.pb.go | 2 +- go/vt/proto/vtrpc/vtrpc.pb.go | 2 +- go/vt/proto/vttest/vttest.pb.go | 2 +- go/vt/proto/vttime/vttime.pb.go | 2 +- go/vt/proto/workflow/workflow.pb.go | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/go/vt/proto/automation/automation.pb.go b/go/vt/proto/automation/automation.pb.go index 25ab033d8a0..5282daee098 100644 --- a/go/vt/proto/automation/automation.pb.go +++ b/go/vt/proto/automation/automation.pb.go @@ -20,7 +20,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: automation.proto diff --git a/go/vt/proto/automationservice/automationservice.pb.go b/go/vt/proto/automationservice/automationservice.pb.go index 00b5ca79cbb..a179f8f52f7 100644 --- a/go/vt/proto/automationservice/automationservice.pb.go +++ b/go/vt/proto/automationservice/automationservice.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: automationservice.proto diff --git a/go/vt/proto/binlogdata/binlogdata.pb.go b/go/vt/proto/binlogdata/binlogdata.pb.go index f520ca0998c..22d61cfdc5f 100644 --- a/go/vt/proto/binlogdata/binlogdata.pb.go +++ b/go/vt/proto/binlogdata/binlogdata.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: binlogdata.proto diff --git a/go/vt/proto/binlogservice/binlogservice.pb.go b/go/vt/proto/binlogservice/binlogservice.pb.go index 565065a4dc1..2c3b33de1cd 100644 --- a/go/vt/proto/binlogservice/binlogservice.pb.go +++ b/go/vt/proto/binlogservice/binlogservice.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: binlogservice.proto diff --git a/go/vt/proto/logutil/logutil.pb.go b/go/vt/proto/logutil/logutil.pb.go index b52a8d359c4..72409893b4c 100644 --- a/go/vt/proto/logutil/logutil.pb.go +++ b/go/vt/proto/logutil/logutil.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: logutil.proto diff --git a/go/vt/proto/mysqlctl/mysqlctl.pb.go b/go/vt/proto/mysqlctl/mysqlctl.pb.go index 628dc116880..a4e67f96fe3 100644 --- a/go/vt/proto/mysqlctl/mysqlctl.pb.go +++ b/go/vt/proto/mysqlctl/mysqlctl.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: mysqlctl.proto diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 7b9b42bc0a9..b6da31e8183 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: query.proto diff --git a/go/vt/proto/queryservice/queryservice.pb.go b/go/vt/proto/queryservice/queryservice.pb.go index 09c5ca8803b..195a49579af 100644 --- a/go/vt/proto/queryservice/queryservice.pb.go +++ b/go/vt/proto/queryservice/queryservice.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: queryservice.proto diff --git a/go/vt/proto/replicationdata/replicationdata.pb.go b/go/vt/proto/replicationdata/replicationdata.pb.go index 9234b7e1ffa..7fc537b9cca 100644 --- a/go/vt/proto/replicationdata/replicationdata.pb.go +++ b/go/vt/proto/replicationdata/replicationdata.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: replicationdata.proto diff --git a/go/vt/proto/tableacl/tableacl.pb.go b/go/vt/proto/tableacl/tableacl.pb.go index 663acdee2af..c8d91c6cfd8 100644 --- a/go/vt/proto/tableacl/tableacl.pb.go +++ b/go/vt/proto/tableacl/tableacl.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: tableacl.proto diff --git a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go index da766ccacfe..f32eeee32c7 100644 --- a/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go +++ b/go/vt/proto/tabletmanagerdata/tabletmanagerdata.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: tabletmanagerdata.proto diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go index ae1c970d12f..70af0d0ca16 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: tabletmanagerservice.proto diff --git a/go/vt/proto/throttlerdata/throttlerdata.pb.go b/go/vt/proto/throttlerdata/throttlerdata.pb.go index 6e5587afdaf..5aa03276cb0 100644 --- a/go/vt/proto/throttlerdata/throttlerdata.pb.go +++ b/go/vt/proto/throttlerdata/throttlerdata.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: throttlerdata.proto diff --git a/go/vt/proto/throttlerservice/throttlerservice.pb.go b/go/vt/proto/throttlerservice/throttlerservice.pb.go index 293a7420fa9..b2f108003c6 100644 --- a/go/vt/proto/throttlerservice/throttlerservice.pb.go +++ b/go/vt/proto/throttlerservice/throttlerservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: throttlerservice.proto diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 9683f926fea..99cf8dfe48f 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -20,7 +20,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: topodata.proto diff --git a/go/vt/proto/vschema/vschema.pb.go b/go/vt/proto/vschema/vschema.pb.go index 3471a311d24..a6f44d9c23e 100644 --- a/go/vt/proto/vschema/vschema.pb.go +++ b/go/vt/proto/vschema/vschema.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vschema.proto diff --git a/go/vt/proto/vtadmin/vtadmin.pb.go b/go/vt/proto/vtadmin/vtadmin.pb.go index b1e0c437918..961635f1d89 100644 --- a/go/vt/proto/vtadmin/vtadmin.pb.go +++ b/go/vt/proto/vtadmin/vtadmin.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtadmin.proto diff --git a/go/vt/proto/vtctldata/vtctldata.pb.go b/go/vt/proto/vtctldata/vtctldata.pb.go index 616e63f0d24..bee3b7c9dad 100644 --- a/go/vt/proto/vtctldata/vtctldata.pb.go +++ b/go/vt/proto/vtctldata/vtctldata.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtctldata.proto diff --git a/go/vt/proto/vtctlservice/vtctlservice.pb.go b/go/vt/proto/vtctlservice/vtctlservice.pb.go index 101f5ba60df..fab6c3b40f7 100644 --- a/go/vt/proto/vtctlservice/vtctlservice.pb.go +++ b/go/vt/proto/vtctlservice/vtctlservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtctlservice.proto diff --git a/go/vt/proto/vtgate/vtgate.pb.go b/go/vt/proto/vtgate/vtgate.pb.go index 675b4504e7d..11914d8f3fb 100644 --- a/go/vt/proto/vtgate/vtgate.pb.go +++ b/go/vt/proto/vtgate/vtgate.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtgate.proto diff --git a/go/vt/proto/vtgateservice/vtgateservice.pb.go b/go/vt/proto/vtgateservice/vtgateservice.pb.go index f531d1b5f0b..ce7358d64ec 100644 --- a/go/vt/proto/vtgateservice/vtgateservice.pb.go +++ b/go/vt/proto/vtgateservice/vtgateservice.pb.go @@ -18,7 +18,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtgateservice.proto diff --git a/go/vt/proto/vtrpc/vtrpc.pb.go b/go/vt/proto/vtrpc/vtrpc.pb.go index 920e9f0b4e0..1988d2b7561 100644 --- a/go/vt/proto/vtrpc/vtrpc.pb.go +++ b/go/vt/proto/vtrpc/vtrpc.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vtrpc.proto diff --git a/go/vt/proto/vttest/vttest.pb.go b/go/vt/proto/vttest/vttest.pb.go index 5297c0e5694..aaf38b1d046 100644 --- a/go/vt/proto/vttest/vttest.pb.go +++ b/go/vt/proto/vttest/vttest.pb.go @@ -41,7 +41,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vttest.proto diff --git a/go/vt/proto/vttime/vttime.pb.go b/go/vt/proto/vttime/vttime.pb.go index ef0d62f24cc..d0debf8d2fa 100644 --- a/go/vt/proto/vttime/vttime.pb.go +++ b/go/vt/proto/vttime/vttime.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: vttime.proto diff --git a/go/vt/proto/workflow/workflow.pb.go b/go/vt/proto/workflow/workflow.pb.go index c0e136f4651..b102179225a 100644 --- a/go/vt/proto/workflow/workflow.pb.go +++ b/go/vt/proto/workflow/workflow.pb.go @@ -19,7 +19,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.28.0 // protoc v3.21.3 // source: workflow.proto From ebe2d5b9f0d48e8534d1dafb3e8a76706c21a237 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 9 Apr 2024 14:52:36 +0200 Subject: [PATCH 24/25] Revert "Update all the Go dependencies (#11741)" This reverts commit 18faa1eb9b91e1eb89c9dfd5be90a107a62d4503. --- go/sqltypes/result_test.go | 39 ++++++------ go/stats/statsd/statsd_test.go | 62 +++++++++---------- go/vt/vtadmin/api_test.go | 18 +++--- go/vt/vtgate/engine/limit_test.go | 60 +++++++----------- go/vt/vtgate/executor_dml_test.go | 3 +- go/vt/vtgate/executor_test.go | 6 +- .../tabletmanager/vreplication/engine_test.go | 10 +-- .../tabletserver/connpool/dbconn_test.go | 11 ++-- .../tabletserver/health_streamer_test.go | 11 ++-- .../messager/message_manager_test.go | 12 ++-- .../tabletserver/query_executor_test.go | 14 +++-- .../tabletserver/state_manager_test.go | 2 +- 12 files changed, 117 insertions(+), 131 deletions(-) diff --git a/go/sqltypes/result_test.go b/go/sqltypes/result_test.go index 90d2eb9af65..c0525f8dc03 100644 --- a/go/sqltypes/result_test.go +++ b/go/sqltypes/result_test.go @@ -17,6 +17,7 @@ limitations under the License. package sqltypes import ( + "reflect" "testing" "vitess.io/vitess/go/test/utils" @@ -30,20 +31,20 @@ func TestRepair(t *testing.T) { }, { Type: VarChar, }} - in := &Result{ + in := Result{ Rows: [][]Value{ {TestValue(VarBinary, "1"), TestValue(VarBinary, "aa")}, {TestValue(VarBinary, "2"), TestValue(VarBinary, "bb")}, }, } - want := &Result{ + want := Result{ Rows: [][]Value{ {TestValue(Int64, "1"), TestValue(VarChar, "aa")}, {TestValue(Int64, "2"), TestValue(VarChar, "bb")}, }, } in.Repair(fields) - if !in.Equal(want) { + if !reflect.DeepEqual(in, want) { t.Errorf("Repair:\n%#v, want\n%#v", in, want) } } @@ -84,7 +85,7 @@ func TestTruncate(t *testing.T) { } out := in.Truncate(0) - if !out.Equal(in) { + if !reflect.DeepEqual(out, in) { t.Errorf("Truncate(0):\n%v, want\n%v", out, in) } @@ -101,7 +102,7 @@ func TestTruncate(t *testing.T) { {TestValue(Int64, "3")}, }, } - if !out.Equal(want) { + if !reflect.DeepEqual(out, want) { t.Errorf("Truncate(1):\n%v, want\n%v", out, want) } } @@ -278,21 +279,19 @@ func TestStripMetaData(t *testing.T) { }, }} for _, tcase := range testcases { - t.Run(tcase.name, func(t *testing.T) { - inCopy := tcase.in.Copy() - out := inCopy.StripMetadata(tcase.includedFields) - if !out.Equal(tcase.expected) { - t.Errorf("StripMetaData unexpected result for %v: %v", tcase.name, out) - } - if len(tcase.in.Fields) > 0 { - // check the out array is different than the in array. - if out.Fields[0] == inCopy.Fields[0] && tcase.includedFields != querypb.ExecuteOptions_ALL { - t.Errorf("StripMetaData modified original Field for %v", tcase.name) - } + inCopy := tcase.in.Copy() + out := inCopy.StripMetadata(tcase.includedFields) + if !reflect.DeepEqual(out, tcase.expected) { + t.Errorf("StripMetaData unexpected result for %v: %v", tcase.name, out) + } + if len(tcase.in.Fields) > 0 { + // check the out array is different than the in array. + if out.Fields[0] == inCopy.Fields[0] && tcase.includedFields != querypb.ExecuteOptions_ALL { + t.Errorf("StripMetaData modified original Field for %v", tcase.name) } - // check we didn't change the original result. - utils.MustMatch(t, tcase.in, inCopy) - }) + } + // check we didn't change the original result. + utils.MustMatch(t, tcase.in, inCopy) } } @@ -341,7 +340,7 @@ func TestAppendResult(t *testing.T) { result.AppendResult(src) - if !result.Equal(want) { + if !reflect.DeepEqual(result, want) { t.Errorf("Got:\n%#v, want:\n%#v", result, want) } } diff --git a/go/stats/statsd/statsd_test.go b/go/stats/statsd/statsd_test.go index c615da3cdfd..982ad321f0e 100644 --- a/go/stats/statsd/statsd_test.go +++ b/go/stats/statsd/statsd_test.go @@ -55,8 +55,8 @@ func TestStatsdCounter(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_name:1|c\n" - assert.Equal(t, expected, result) + expected := "test.counter_name:1|c" + assert.Equal(t, result, expected) } }) if !found { @@ -84,8 +84,8 @@ func TestStatsdGauge(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_name:10|g\n" - assert.Equal(t, expected, result) + expected := "test.gauge_name:10.000000|g" + assert.Equal(t, result, expected) } }) if !found { @@ -113,8 +113,8 @@ func TestStatsdGaugeFloat64(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_name_f64:3.14|g\n" - assert.Equal(t, expected, result) + expected := "test.gauge_name_f64:3.140000|g" + assert.Equal(t, result, expected) } }) if !found { @@ -143,8 +143,8 @@ func TestStatsdGaugeFunc(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauge_func_name:2|g\n" - assert.Equal(t, expected, result) + expected := "test.gauge_func_name:2.000000|g" + assert.Equal(t, result, expected) } }) if !found { @@ -172,8 +172,8 @@ func TestStatsdCounterDuration(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_duration_name:1.000000|ms\n" - assert.Equal(t, expected, result) + expected := "test.counter_duration_name:1.000000|ms" + assert.Equal(t, result, expected) } }) if !found { @@ -203,12 +203,11 @@ func TestStatsdCountersWithSingleLabel(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ - "", "test.counter_with_single_label_name:0|c|#label:tag2", "test.counter_with_single_label_name:2|c|#label:tag1", } for i, res := range result { - assert.Equal(t, expected[i], res) + assert.Equal(t, res, expected[i]) } } }) @@ -237,8 +236,8 @@ func TestStatsdCountersWithMultiLabels(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.counter_with_multiple_label_name:1|c|#label1:foo,label2:bar\n" - assert.Equal(t, expected, result) + expected := "test.counter_with_multiple_label_name:1|c|#label1:foo,label2:bar" + assert.Equal(t, result, expected) } }) if !found { @@ -272,12 +271,11 @@ func TestStatsdCountersFuncWithMultiLabels(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ - "", "test.counter_func_with_multiple_labels_name:1|c|#label1:foo,label2:bar", "test.counter_func_with_multiple_labels_name:2|c|#label1:bar,label2:baz", } for i, res := range result { - assert.Equal(t, expected[i], res) + assert.Equal(t, res, expected[i]) } } }) @@ -306,8 +304,8 @@ func TestStatsdGaugesWithMultiLabels(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauges_with_multiple_label_name:3|g|#label1:foo,label2:bar\n" - assert.Equal(t, expected, result) + expected := "test.gauges_with_multiple_label_name:3.000000|g|#label1:foo,label2:bar" + assert.Equal(t, result, expected) } }) if !found { @@ -341,12 +339,11 @@ func TestStatsdGaugesFuncWithMultiLabels(t *testing.T) { result := strings.Split(string(bytes[:n]), "\n") sort.Strings(result) expected := []string{ - "", - "test.gauges_func_with_multiple_labels_name:1|g|#label1:foo,label2:bar", - "test.gauges_func_with_multiple_labels_name:2|g|#label1:bar,label2:baz", + "test.gauges_func_with_multiple_labels_name:1.000000|g|#label1:foo,label2:bar", + "test.gauges_func_with_multiple_labels_name:2.000000|g|#label1:bar,label2:baz", } for i, res := range result { - assert.Equal(t, expected[i], res) + assert.Equal(t, res, expected[i]) } } }) @@ -375,8 +372,8 @@ func TestStatsdGaugesWithSingleLabel(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.gauges_with_single_label_name:1|g|#label1:bar\n" - assert.Equal(t, expected, result) + expected := "test.gauges_with_single_label_name:1.000000|g|#label1:bar" + assert.Equal(t, result, expected) } }) if !found { @@ -404,8 +401,8 @@ func TestStatsdMultiTimings(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.multi_timings_name:10.000000|ms|#label1:foo,label2:bar\n" - assert.Equal(t, expected, result) + expected := "test.multi_timings_name:10.000000|ms|#label1:foo,label2:bar" + assert.Equal(t, result, expected) } }) if !found { @@ -433,8 +430,8 @@ func TestStatsdTimings(t *testing.T) { t.Fatal(err) } result := string(bytes[:n]) - expected := "test.timings_name:2.000000|ms|#label1:foo\n" - assert.Equal(t, expected, result) + expected := "test.timings_name:2.000000|ms|#label1:foo" + assert.Equal(t, result, expected) } }) if !found { @@ -465,13 +462,12 @@ func TestStatsdHistogram(t *testing.T) { } result := string(bytes[:n]) expected := []string{ - "test.histogram_name:2|h", - "test.histogram_name:3|h", - "test.histogram_name:6|h", - "", + "test.histogram_name:2.000000|h", + "test.histogram_name:3.000000|h", + "test.histogram_name:6.000000|h", } for i, res := range strings.Split(result, "\n") { - assert.Equal(t, expected[i], res) + assert.Equal(t, res, expected[i]) } } }) diff --git a/go/vt/vtadmin/api_test.go b/go/vt/vtadmin/api_test.go index f1c9833ca98..04f758c68c0 100644 --- a/go/vt/vtadmin/api_test.go +++ b/go/vt/vtadmin/api_test.go @@ -567,7 +567,7 @@ func TestFindSchema(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) + assert.Equal(t, tt.expected, resp) }) } @@ -815,7 +815,7 @@ func TestFindSchema(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(expected, schema), "expected %v, got %v", expected, schema) + assert.Equal(t, expected, schema) }) } @@ -1091,7 +1091,7 @@ func TestGetKeyspace(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, ks), "expected %v, got %v", tt.expected, ks) + assert.Equal(t, tt.expected, ks) }, vtctlds...) }) } @@ -1575,7 +1575,7 @@ func TestGetSchema(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) + assert.Equal(t, tt.expected, resp) }) }) } @@ -1742,7 +1742,7 @@ func TestGetSchema(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(expected, schema), "expected %v, got %v", expected, schema) + assert.Equal(t, expected, schema) }) } @@ -2556,7 +2556,7 @@ func TestGetSchemas(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(expected, resp), "expected: %v, got: %v", expected, resp) + assert.ElementsMatch(t, expected.Schemas, resp.Schemas) }) } @@ -2717,7 +2717,7 @@ func TestGetSrvVSchema(t *testing.T) { } require.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) + assert.Equal(t, tt.expected, resp) }) }) } @@ -3609,7 +3609,7 @@ func TestGetVSchema(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) + assert.Equal(t, tt.expected, resp) }) } } @@ -4155,7 +4155,7 @@ func TestGetWorkflow(t *testing.T) { } assert.NoError(t, err) - assert.Truef(t, proto.Equal(tt.expected, resp), "expected %v, got %v", tt.expected, resp) + assert.Equal(t, tt.expected, resp) }) } } diff --git a/go/vt/vtgate/engine/limit_test.go b/go/vt/vtgate/engine/limit_test.go index dcdc43880a0..0aacb93fe40 100644 --- a/go/vt/vtgate/engine/limit_test.go +++ b/go/vt/vtgate/engine/limit_test.go @@ -19,6 +19,7 @@ package engine import ( "context" "errors" + "reflect" "testing" "github.com/stretchr/testify/assert" @@ -61,7 +62,7 @@ func TestLimitExecute(t *testing.T) { "a|1", "b|2", ) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -88,7 +89,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(inputResult) { + if !reflect.DeepEqual(result, inputResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -109,7 +110,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -135,7 +136,7 @@ func TestLimitExecute(t *testing.T) { result, err = l.TryExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(2)}, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } } @@ -173,7 +174,7 @@ func TestLimitOffsetExecute(t *testing.T) { "a|1", "b|2", ) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n%v, want\n%v", result, wantResult) } @@ -204,7 +205,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -234,7 +235,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -265,7 +266,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -294,7 +295,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -322,7 +323,7 @@ func TestLimitOffsetExecute(t *testing.T) { ) result, err = l.TryExecute(context.Background(), &noopVCursor{}, bindVars, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } @@ -348,7 +349,7 @@ func TestLimitOffsetExecute(t *testing.T) { } result, err = l.TryExecute(context.Background(), &noopVCursor{}, map[string]*querypb.BindVariable{"l": sqltypes.Int64BindVariable(1), "o": sqltypes.Int64BindVariable(1)}, false) require.NoError(t, err) - if !result.Equal(wantResult) { + if !reflect.DeepEqual(result, wantResult) { t.Errorf("l.Execute:\n got %v, want\n%v", result, wantResult) } } @@ -386,11 +387,8 @@ func TestLimitStreamExecute(t *testing.T) { "a|1", "b|2", ) - require.Len(t, results, len(wantResults)) - for i, result := range results { - if !result.Equal(wantResults[i]) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) - } + if !reflect.DeepEqual(results, wantResults) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) } // Test with bind vars. @@ -402,11 +400,8 @@ func TestLimitStreamExecute(t *testing.T) { return nil }) require.NoError(t, err) - require.Len(t, results, len(wantResults)) - for i, result := range results { - if !result.Equal(wantResults[i]) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) - } + if !reflect.DeepEqual(results, wantResults) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) } // Test with limit equal to input @@ -425,11 +420,8 @@ func TestLimitStreamExecute(t *testing.T) { "---", "c|3", ) - require.Len(t, results, len(wantResults)) - for i, result := range results { - if !result.Equal(wantResults[i]) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) - } + if !reflect.DeepEqual(results, wantResults) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) } // Test with limit higher than input. @@ -442,11 +434,8 @@ func TestLimitStreamExecute(t *testing.T) { }) require.NoError(t, err) // wantResults is same as before. - require.Len(t, results, len(wantResults)) - for i, result := range results { - if !result.Equal(wantResults[i]) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) - } + if !reflect.DeepEqual(results, wantResults) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) } } @@ -488,11 +477,8 @@ func TestOffsetStreamExecute(t *testing.T) { "---", "e|5", ) - require.Len(t, results, len(wantResults)) - for i, result := range results { - if !result.Equal(wantResults[i]) { - t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) - } + if !reflect.DeepEqual(results, wantResults) { + t.Errorf("l.StreamExecute:\n%s, want\n%s", sqltypes.PrintResults(results), sqltypes.PrintResults(wantResults)) } } @@ -509,7 +495,7 @@ func TestLimitGetFields(t *testing.T) { got, err := l.GetFields(context.Background(), nil, nil) require.NoError(t, err) - if !got.Equal(result) { + if !reflect.DeepEqual(got, result) { t.Errorf("l.GetFields:\n%v, want\n%v", got, result) } } diff --git a/go/vt/vtgate/executor_dml_test.go b/go/vt/vtgate/executor_dml_test.go index 983450c83cd..05fcb59255d 100644 --- a/go/vt/vtgate/executor_dml_test.go +++ b/go/vt/vtgate/executor_dml_test.go @@ -19,6 +19,7 @@ package vtgate import ( "context" "fmt" + "reflect" "strings" "testing" @@ -1164,7 +1165,7 @@ func TestInsertShardedIgnore(t *testing.T) { query = "insert ignore into insert_ignore_test(pv, owned, verify) values (1, 1, 1)" qr, err := executorExec(executor, query, nil) require.NoError(t, err) - if !qr.Equal(&sqltypes.Result{}) { + if !reflect.DeepEqual(qr, &sqltypes.Result{}) { t.Errorf("qr: %v, want empty result", qr) } assertQueries(t, sbc1, nil) diff --git a/go/vt/vtgate/executor_test.go b/go/vt/vtgate/executor_test.go index 32121c37c79..6e80f3841aa 100644 --- a/go/vt/vtgate/executor_test.go +++ b/go/vt/vtgate/executor_test.go @@ -1110,7 +1110,7 @@ func TestExecutorComment(t *testing.T) { if err != nil { t.Error(err) } - if !gotResult.Equal(wantResult) { + if !reflect.DeepEqual(gotResult, wantResult) { t.Errorf("Exec %s: %v, want %v", stmt, gotResult, wantResult) } } @@ -1453,7 +1453,9 @@ func TestExecutorCreateVindexDDL(t *testing.T) { sbc2.ExecCount.Get(), sbclookup.ExecCount.Get(), } - require.Equal(t, wantCount, gotCount) + if !reflect.DeepEqual(gotCount, wantCount) { + t.Errorf("Exec %s: %v, want %v", stmt, gotCount, wantCount) + } } func TestExecutorAddDropVschemaTableDDL(t *testing.T) { diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go index 66ca9213e26..4c57f21dca1 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go @@ -175,7 +175,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr := &sqltypes.Result{InsertID: 1} - if !qr.Equal(wantqr) { + if !reflect.DeepEqual(qr, wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -217,7 +217,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr = &sqltypes.Result{RowsAffected: 1} - if !qr.Equal(wantqr) { + if !reflect.DeepEqual(qr, wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -257,7 +257,7 @@ func TestEngineExec(t *testing.T) { t.Fatal(err) } wantqr = &sqltypes.Result{RowsAffected: 1} - if !qr.Equal(wantqr) { + if !reflect.DeepEqual(qr, wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() @@ -355,7 +355,7 @@ func TestEngineSelect(t *testing.T) { if err != nil { t.Fatal(err) } - if !qr.Equal(wantResult) { + if !reflect.DeepEqual(qr, wantResult) { t.Errorf("Exec: %v, want %v", qr, wantResult) } } @@ -558,7 +558,7 @@ func TestCreateDBAndTable(t *testing.T) { t.Fatal(err) } wantqr := &sqltypes.Result{InsertID: 1} - if !qr.Equal(wantqr) { + if !reflect.DeepEqual(qr, wantqr) { t.Errorf("Exec: %v, want %v", qr, wantqr) } dbClient.Wait() diff --git a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go index 62ec0b6d12e..5b0401621c0 100644 --- a/go/vt/vttablet/tabletserver/connpool/dbconn_test.go +++ b/go/vt/vttablet/tabletserver/connpool/dbconn_test.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "reflect" "strings" "testing" "time" @@ -78,7 +79,7 @@ func TestDBConnExec(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !expectedResult.Equal(result) { + if !reflect.DeepEqual(expectedResult, result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -151,7 +152,7 @@ func TestDBConnExecLost(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !expectedResult.Equal(result) { + if !reflect.DeepEqual(expectedResult, result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -225,7 +226,7 @@ func TestDBConnDeadline(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !expectedResult.Equal(result) { + if !reflect.DeepEqual(expectedResult, result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -239,7 +240,7 @@ func TestDBConnDeadline(t *testing.T) { t.Fatalf("should not get an error, err: %v", err) } expectedResult.Fields = nil - if !expectedResult.Equal(result) { + if !reflect.DeepEqual(expectedResult, result) { t.Errorf("Exec: %v, want %v", expectedResult, result) } @@ -404,7 +405,7 @@ func TestDBConnStream(t *testing.T) { if err != nil { t.Fatalf("should not get an error, err: %v", err) } - if !expectedResult.Equal(&result) { + if !reflect.DeepEqual(expectedResult, &result) { t.Errorf("Exec: %v, want %v", expectedResult, &result) } // Stream fail diff --git a/go/vt/vttablet/tabletserver/health_streamer_test.go b/go/vt/vttablet/tabletserver/health_streamer_test.go index a3c69432f9f..443dc4fafbf 100644 --- a/go/vt/vttablet/tabletserver/health_streamer_test.go +++ b/go/vt/vttablet/tabletserver/health_streamer_test.go @@ -25,7 +25,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/mysql/fakesqldb" @@ -117,7 +116,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { HealthError: "tabletserver uninitialized", }, } - assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) + assert.Equal(t, want, shr) hs.ChangeState(topodatapb.TabletType_REPLICA, time.Time{}, 0, nil, false) shr = <-ch @@ -131,7 +130,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) + assert.Equal(t, want, shr) // Test primary and timestamp. now := time.Now() @@ -149,7 +148,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) + assert.Equal(t, want, shr) // Test non-serving, and 0 timestamp for non-primary. hs.ChangeState(topodatapb.TabletType_REPLICA, now, 1*time.Second, nil, false) @@ -165,7 +164,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) + assert.Equal(t, want, shr) // Test Health error. hs.ChangeState(topodatapb.TabletType_REPLICA, now, 0, errors.New("repl err"), false) @@ -181,7 +180,7 @@ func TestHealthStreamerBroadcast(t *testing.T) { BinlogPlayersCount: 2, }, } - assert.Truef(t, proto.Equal(want, shr), "want: %v, got: %v", want, shr) + assert.Equal(t, want, shr) } func TestReloadSchema(t *testing.T) { diff --git a/go/vt/vttablet/tabletserver/messager/message_manager_test.go b/go/vt/vttablet/tabletserver/messager/message_manager_test.go index 28ea5b0a38a..a6158906e5a 100644 --- a/go/vt/vttablet/tabletserver/messager/message_manager_test.go +++ b/go/vt/vttablet/tabletserver/messager/message_manager_test.go @@ -216,7 +216,7 @@ func TestMessageManagerSend(t *testing.T) { want := &sqltypes.Result{ Fields: testFields, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %v, want %v", got, want) } // Set the channel to verify call to Postpone. @@ -230,7 +230,7 @@ func TestMessageManagerSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %v, want %v", got, want) } @@ -415,7 +415,7 @@ func TestMessageManagerBatchSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %v, want %v", got, row1) } mm.mu.Lock() @@ -432,7 +432,7 @@ func TestMessageManagerBatchSend(t *testing.T) { sqltypes.NULL, }}, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %+v, want %+v", got, row1) } } @@ -481,7 +481,7 @@ func TestMessageManagerStreamerSimple(t *testing.T) { sqltypes.NewVarBinary("1"), }}, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %v, want %v", got, want) } } @@ -569,7 +569,7 @@ func TestMessageManagerStreamerAndPoller(t *testing.T) { sqltypes.NewVarBinary("3"), }}, } - if got := <-r1.ch; !got.Equal(want) { + if got := <-r1.ch; !reflect.DeepEqual(got, want) { t.Errorf("Received: %v, want %v", got, want) } } diff --git a/go/vt/vttablet/tabletserver/query_executor_test.go b/go/vt/vttablet/tabletserver/query_executor_test.go index e8e96614443..526419c4f49 100644 --- a/go/vt/vttablet/tabletserver/query_executor_test.go +++ b/go/vt/vttablet/tabletserver/query_executor_test.go @@ -17,15 +17,17 @@ limitations under the License. package tabletserver import ( - "context" "fmt" "io" "math/rand" + "reflect" "strings" "testing" "vitess.io/vitess/go/vt/vttablet/tabletserver/tx" + "context" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -684,7 +686,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(2), }}, } - if !got.Equal(want) { + if !reflect.DeepEqual(got, want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } @@ -716,7 +718,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(3), }}, } - if !got.Equal(want) { + if !reflect.DeepEqual(got, want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } @@ -748,7 +750,7 @@ func TestQueryExecutorPlanNextval(t *testing.T) { sqltypes.NewInt64(5), }}, } - if !got.Equal(want) { + if !reflect.DeepEqual(got, want) { t.Fatalf("qre.Execute() =\n%#v, want:\n%#v", got, want) } } @@ -855,7 +857,7 @@ func TestQueryExecutorTableAcl(t *testing.T) { if err != nil { t.Fatalf("got: %v, want nil", err) } - if !got.Equal(want) { + if !reflect.DeepEqual(got, want) { t.Fatalf("qre.Execute() = %v, want: %v", got, want) } } @@ -899,7 +901,7 @@ func TestQueryExecutorTableAclNoPermission(t *testing.T) { if err != nil { t.Fatalf("got: %v, want nil", err) } - if !got.Equal(want) { + if !reflect.DeepEqual(got, want) { t.Fatalf("qre.Execute() = %v, want: %v", got, want) } tsv.StopService() diff --git a/go/vt/vttablet/tabletserver/state_manager_test.go b/go/vt/vttablet/tabletserver/state_manager_test.go index efe57e737cb..bb809d5b142 100644 --- a/go/vt/vttablet/tabletserver/state_manager_test.go +++ b/go/vt/vttablet/tabletserver/state_manager_test.go @@ -639,7 +639,7 @@ func TestStateManagerNotify(t *testing.T) { TabletAlias: &topodatapb.TabletAlias{}, } sm.hcticks.Stop() - assert.Truef(t, proto.Equal(gotshr, wantshr), "got: %v, want: %v", gotshr, wantshr) + assert.Equal(t, wantshr, gotshr) sm.StopService() } From 79ddd29449b4d0f15058b523a30574c98422b246 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Tue, 14 May 2024 05:26:40 +0200 Subject: [PATCH 25/25] go mod tidy Signed-off-by: Tim Vaillancourt --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 51896091921..bf81295932d 100644 --- a/go.mod +++ b/go.mod @@ -119,7 +119,7 @@ require ( github.com/bndr/gotabulate v1.1.2 github.com/hashicorp/go-version v1.6.0 github.com/planetscale/log v0.0.0-20221118170849-fb599bc35c50 - github.com/slackhq/vitess-addons v0.15.2 + github.com/slackhq/vitess-addons v0.15.3 github.com/slok/noglog v0.2.0 go.uber.org/zap v1.23.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 diff --git a/go.sum b/go.sum index 98f88a3413e..1a0cf140b0c 100644 --- a/go.sum +++ b/go.sum @@ -670,8 +670,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1 h1:acClJNSOjUrAUKW+ZneCZymCFDWtSaJG5YQl8FoOlyI= github.com/sjmudd/stopwatch v0.0.0-20170613150411-f380bf8a9be1/go.mod h1:Pgf1sZ2KrHK8vdRTV5UHGp80LT7HMUKuNAiKC402abY= -github.com/slackhq/vitess-addons v0.15.2 h1:DcDULONlUI3rz5jPb9bHKEJo6qpWX/gbI7LCPANHE8A= -github.com/slackhq/vitess-addons v0.15.2/go.mod h1:N/rlDf8CK2/fLn7LaMTP5Mdc1vOLM661/S5q1kPjYeI= +github.com/slackhq/vitess-addons v0.15.3 h1:W3YuaXb5h+gfu0Ougc0um13HKtiIkPzJ6W+J0+X6wtY= +github.com/slackhq/vitess-addons v0.15.3/go.mod h1:+5kNtWka7+mWQ+/kNf6Ci+9tyZNelIkU/zgqoBYUNi8= github.com/slok/noglog v0.2.0 h1:1czu4l2EoJ8L92UwdSXXa1Y+c5TIjFAFm2P+mjej95E= github.com/slok/noglog v0.2.0/go.mod h1:TfKxwpEZPT+UA83bQ6RME146k0MM4e8mwHLf6bhcGDI= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=