1415 Commits

Author SHA1 Message Date
Eng Zer Jun
867faa1924
etcdserver: remove redundant len check in health check
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."

`len` returns 0 if the slice or map is nil [2]. Therefore, checking
`len(v) > 0` around a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-13 18:39:38 +08:00
Chao Chen
c25f1dff82 http health check bug fixes
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-12 16:59:34 -07:00
Allen Ray
e4c0eb7712 bump google.golang.org/grpc to v1.58.3
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:39:05 -04:00
Allen Ray
3a61187ce3 bump golang.org/x/net to v0.17.0
Address CVE-2023-39325 and CVE-2023-44487

Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:09:14 -04:00
Marek Siarkowicz
9f40116fa0 Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-10 16:31:42 +02:00
Marek Siarkowicz
4540db9a7c
Merge pull request #16731 from sharathsivakumar/shsi/bump_dependencies_6
Bump dependencies generated by the bot manually
2023-10-10 13:51:48 +02:00
Sharath Sivakumar
d884580432
dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.44.0 to 0.45.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:50:54 +02:00
Sharath Sivakumar
c94deb9511
dependency: bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:36 +02:00
Sharath Sivakumar
1b1c42a7aa
dependency: bump golang.org/x/net from 0.15.0 to 0.16.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:35 +02:00
Marek Siarkowicz
16e19a9547
Merge pull request #16269 from dusk125/refactor-revision
Refactor common revision code to pkg
2023-10-10 10:16:58 +02:00
Allen Ray
395376d3ab Refactor common revision code to pkg
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-09 14:53:16 -04:00
Marek Siarkowicz
c1fb2c2316 Use default embed config in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 14:17:45 +02:00
Marek Siarkowicz
1c5289dd73
Merge pull request #16677 from serathius/revert-13525
Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
2023-10-04 11:49:11 +02:00
James Blair
074d79652d
depdendency: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:10:01 +13:00
James Blair
aac8919b17
depdendency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.18.0 to 1.19.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:06:38 +13:00
Marek Siarkowicz
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5149e74cd28bad7c080c646315d0b06.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
Marek Siarkowicz
50fb919318 Make AddEmbedFlags functon a method on embed.Config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-02 13:53:38 +02:00
Marek Siarkowicz
d98faeef82 Refactor registering flags to separate AddEmbedFlags function for future reuse
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:58:27 +02:00
Geeta Gharpure
70a3205506 fix broken unit test in server_test.go
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-09-28 20:07:06 +01:00
Benjamin Wang
9c9804399e do not update RaftCluster.members and RaftCluster.removed if the v3store is ahead of the current replayed WAL entry index
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:06:12 +01:00
Benjamin Wang
628b45c099 test: add a test case to verify consistent memberlist on bootstrap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01:00
Benjamin Wang
cfd35afe93
Merge pull request #16636 from ahrtr/grpc_20230925
dependency: bump some dependencies
2023-09-26 12:31:09 +01:00
Benjamin Wang
4d486a2332 bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 21:00:55 +01:00
Benjamin Wang
10cddaaf7c bump go.opentelemetry.io/otel/sdk from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:59:30 +01:00
Benjamin Wang
df7f2d93f8 dependency: bump google.golang.org/grpc from 1.58.1 to 1.58.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:53:56 +01:00
Wei Fu
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
Wei Fu
896d161d16 *: fix stylecheck linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:14:01 +08:00
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Benjamin Wang
e1ebc260a9
Merge pull request #16628 from fuweid/fix-goimports
*: fix goimports linter
2023-09-22 10:26:14 +01:00
sharathsivakumar
443ee6eb40
dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.43.0 to 0.44.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 20:07:07 +02:00
sharathsivakumar
2048a638fc
dependency: bump google.golang.org/grpc from 1.58.0/1.57.0 to 1.58.1
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:54:54 +02:00
sharathsivakumar
eef790399e
dependency: bump go.uber.org/zap from 1.25.0 to 1.26.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:41:16 +02:00
Wei Fu
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
Wei Fu
9c3edfa0af *: fix staticcheck lint
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
Wei Fu
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
Benjamin Wang
36403e3909
Merge pull request #16608 from fuweid/fix-shadow-vet
*: fix govet-shadow lint
2023-09-19 15:09:05 +01:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Benjamin Wang
ea2d60cad7 dependency: bump grpc-gateway from 2.17.1 to 2.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-19 12:17:22 +01:00
Benjamin Wang
8eba295bc5 Resolve review comments: add some comments to clarify some confusion script or code
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 12:09:46 +01:00
Benjamin Wang
5444cdae69 remove all usage of v1 grpc-gateway
1. Manually updated go source file to remove the usage of v1 grpc-gateway;
2. Execute ./scripts/fix.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
Benjamin Wang
de41d4d8aa dependency: set github.com/grpc-ecosystem/grpc-gateway/v2 version to 2.17.1 for all modules
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:16 +01:00
Benjamin Wang
189f709a5d Apply patches on the generated *.pb.gw.go files to convert v1 messages to v2 messages
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
Benjamin Wang
4ec581a6a3 re-generate all the *.pb.gw.go files
Run ./scripts/genproto.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:15 +01:00
Wei Fu
522b698928 upgrade grpc-gateway from v1 to v2
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:15 +01:00
Benjamin Wang
700411d838
Merge pull request #16601 from fuweid/fix-nakedret-lint
*: fix nakedret lint
2023-09-18 10:00:25 +01:00
Wei Fu
e72c2c40d4 *: fix nakedret lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-17 23:52:41 +08:00
chenyahui
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
Allen Ray
cc130fd2d4 Update to go1.21
Signed-off-by: Allen Ray <alray@redhat.com>
2023-09-13 10:10:02 -04:00
Benjamin Wang
2a0613bc22 dependency: bump google.golang.org/grpc to 1.58.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-12 10:47:14 +01:00
Benjamin Wang
d506a72f32
Merge pull request #16584 from ahrtr/dependencies_20230911
dependency: bump golang.org/x/net from v0.14.0 to v0.15.0
2023-09-12 09:21:40 +01:00