69 Commits

Author SHA1 Message Date
ArkaSaha30
74533d94b2
Bump Go version to 1.21.11: CVE 2024-24790 fix
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2024-06-05 13:56:43 +05:30
Madhav Jivrajani
90666624f3 .*: sync go toolchain version and add ability to verify versions
This commit adds a script to sync the version present in .go-version
across all go.mod files as the toolchain directive. As part of that,
this commit also modifies go.mod files that did not have synced toolchain
directives.

Additionally, this also adds a script to verify all toolchain and go
directives against the version present in .go-version as follows:
(1) The go directive <= version in .go-version
(2) The toolchain directive == version in .go-version

This script runs as part of the `make verify` target, making it run
as a presbumit by default.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-05-15 15:35:21 +05:30
Thomas Jungblut
1f138ae558 Bump bbolt to 1.3.10 for 3.4
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-05-06 11:34:57 +02:00
Wei Fu
acc5325889 *: LeaseTimeToLive returns error if leader changed
The old leader demotes lessor and all the leases' expire time will be
updated. Instead of returning incorrect remaining TTL, we should return
errors to force client retry.

Cherry-pick: d3bb6f688b4643155b4a9924cec726bdc76a1306

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-04 22:32:23 +08:00
Chun-Hung Tseng
62a7a359e6
Bump golang.org/x/net to v0.23.0
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-04-04 10:55:07 +02:00
vivekpatani
150cf3af80 dependency: bump github.com/sirupsen/logrus to v1.9.3
Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2024-03-12 10:02:20 -07:00
Ivan Valdes
6ef46662ad
dependency: bump google.golang.org/protobuf from v1.31.0 to v1.33.0
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-07 16:09:37 -08:00
Benjamin Wang
700e5765d7 Bump bbolt to 1.3.9 for 3.4
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-02-24 15:42:59 +00:00
Allen Ray
9591c294b7 [3.4] Update to go1.21
Signed-off-by: Allen Ray <alray@redhat.com>
2024-02-05 10:21:19 -05:00
Marek Siarkowicz
b6b36c94ab Bump golang.org/x/crypto to v0.17+ to address CVE-2023-48795
This is the minimal set of package updates I get after:

taking packages from release-3.5 with golang.org/x/crypto@v0.17.0
slowly downgrading package by package to get minimal changes
running make to make sure other dependencies don't change

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-31 10:51:24 +01:00
Siyuan Zhang
c3af9427ed add tests to test tx delete consistency.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-12 09:22:55 -08:00
Chao Chen
2c8e2e933f [3.4] backport #16790: upgrade grpc to 1.58.3
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 14:58:32 -08:00
Chao Chen
1665b8ea4d release-3.4: upgrade gRPC-go to v1.52.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 09:41:43 -08:00
Chao Chen
d29115b9cd release-3.4 upgrade grpc to 1.51.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-11-22 09:16:13 -08:00
Chao Chen
83da5ff575 [3.4] Backport #12671 clientv3: Replace balancer with upstream grpc solution
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-30 09:26:40 -07:00
Benjamin Wang
452e4cc0a9 Bump bbolt to 1.3.8 for etcd 3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-26 16:36:50 +01:00
Piotr Tabor
6c0e4d97f1 Introduce grpc-1.30+ compatible client/v3/naming API.
This is not yet implementation, just API and tests to be filled
with implementation in next CLs,
tracked by: https://github.com/etcd-io/etcd/issues/12652

We propose here 3 packages:
 - clientv3/naming/endpoints ->
    That is abstraction layer over etcd that allows to write, read &
    watch Endpoints information. It's independent from GRPC API. It hides
    the storage details.

 - clientv3/naming/endpoints/internal ->
    That contains the grpc's compatible Update class to preserve the
    internal JSON mashalling format.

 - clientv3/naming/resolver ->
   That implements the GRPC resolver API, such that etcd can be
   used for connection.Dial in grpc.

Please see the grpc_naming.md document changes & grpcproxy/cluster.go
new integration, to see how the new abstractions work.

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-19 12:59:24 -07:00
Allen Ray
cd3e26101b Bump golang.org/x/net to v0.17.0
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 11:16:42 -04:00
James Blair
4db260134f
Backport update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-13 16:02:29 +12:00
Benjamin Wang
7c6b0882fd cleanup the go.mod & go.sum files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-15 07:11:33 +08:00
Marek Siarkowicz
e818b5fac8 test: Test etcd watch stream starvation under high read response load when sharing the same connection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 10:33:06 +01:00
James Blair
7318f5dd0c
Bump golang.org/x/net to v0.7.0 to address CVE GO-2023-1571.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-20 11:41:25 +13:00
Benjamin Wang
b4e3ed72e3 bump bbolt to v1.3.7 for release-3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-02 03:47:21 +08:00
Wei Fu
c320f75a15 grpc-gateway: update version to v1.11.0
The issue is caused by hand-crafted protobuf message. The runtime.errorBody
defines two protobuf fields with same number. We need to upgrade the
version to fix it. Otherwise, the client side won't receive any errors
from server side because of panic.

```
mismatching field: runtime.errorBody.error, want runtime.errorBody.message
```

It can fix the cases

PASSES="build grpcproxy" CPU=4 RACE=true ./test -run TestV3CurlLeaseRevokeNoTLS

The original error is like:

```
v3_curl_lease_test.go:109: testV3CurlLeaseRevoke: prefix (/v3) endpoint (/kv/lease/revoke): error (read /dev/ptmx: input/output error (expected "etcdserver: requested lease not found", got ["curl: (52) Empty reply from server\r\n"])), wanted etcdserver: requested lease not found
    v3_curl_lease_test.go:109: testV3CurlLeaseRevoke: prefix (/v3beta) endpoint (/kv/lease/revoke): error (read /dev/ptmx: input/output error (expected "etcdserver: requested lease not found", got ["curl: (52) Empty reply from server\r\n"])), wanted etcdserver: requested lease not found
```

The `Empty reply from server` is caused by panic and server recover it
but it doesn't have chance to reply to client.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-12 17:06:00 +08:00
Benjamin Wang
5413ce46dc bump go version to 1.17.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 18:34:04 +08:00
Benjamin Wang
86479c5ba9 deps: bump golang.org/x/net to v0.4.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 17:43:43 +08:00
Benjamin Wang
68a55439e1 deps: bump golang.org/x/net to 0.0.0-20220906165146-f3363e06e74c to address CVE CVE-2021-44716 and CVE-2022-27664
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 16:34:06 +08:00
Benjamin Wang
40566d943a deps: bump github.com/prometheus/client_golang to 1.11.1 to address CVE CVE-2022-21698
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 16:32:23 +08:00
Benjamin Wang
fcb048dd67 deps: bump github.com/gogo/protobuf to 1.3.2 to address CVE CVE-2021-3121
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 16:30:53 +08:00
SimFG
04e5e5516e [3.4] clientv3/mvcc: fixed DATA RACE between mvcc.(*store).setupMetricsReporter and mvcc.(*store).restore
Signed-off-by: SimFG <1142838399@qq.com>
2022-07-26 21:38:23 +08:00
Chao Chen
fd51434b54 backport 3.5: #13676 load all leases from backend
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-07-19 16:08:01 -07:00
Benjamin Wang
860dc149b2 Bump gopkg.in/yaml.v2 v2.2.8 -> v2.4.0 due to: CVE-2019-11254
Cherry pick https://github.com/etcd-io/etcd/pull/13616 to 3.4.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-05 06:26:06 +08:00
Bogdan Kanivets
576a798bf9 [backport 3.4] Update golang.org/x/crypto to latest
Update crypto to address CVE-2022-27191.

The CVE fix is added in 0.0.0-20220315160706-3147a52a75dd but this
change updates to latest.

Backport of https://github.com/etcd-io/etcd/pull/13996

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-06-30 23:08:13 -07:00
Benjamin Wang
1abf085cfb fix all the pipeline failues for release 3.4
Items resolved:
1. fix the vet error: possible misuse of reflect.SliceHeader;
2. fix the vet error: call to (*T).Fatal from a non-test goroutine;
3. bump package golang.org/x/crypto, net and sys;
4. bump boltdb from 1.3.3 to 1.3.6;
5. remove the vendor directory;
6. remove go 1.12.17 and 1.15.15, add go 1.16.15 into pipeline;
7. bump go version to 1.16 in go.mod;
8. fix the issue: compile: version go1.16.15 does not match go tool version go1.17.11,
   refer to https://github.com/actions/setup-go/issues/107;
9. fix data race on compactMainRev and watcherGauge;
10. fix test failure for TestLeasingTxnOwnerGet in cluster_proxy mode.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-22 05:28:45 +08:00
Yusuke Suzuki
1558ede7f8 go.mod,go.sum: Replace github.com/dgrijalva/jwt-go with github.com/golang-jwt/jwt
github.com/dgrijalva/jwt-go has CVE https://github.com/advisories/GHSA-w73w-5m7g-f7qc
and is already archived. etcd v3.4 should use a community maintained fork
github.com/golang-jwt/jwt which provides the fixed version of the CVE.

Signed-off-by: Yusuke Suzuki <yusuke-suzuki@cybozu.co.jp>
2021-10-02 10:01:52 +09:00
Lili Cosic
4276c33026 go.mod,go.sum: Bump github.com/creack/pty that includes patch
This patch is needed due to go 1.15 erroring on:

"Setctty set but Ctty not valid in child".
2021-04-19 11:18:13 +02:00
Lili Cosic
cfc08e5f06 go.mod,go.sum: Comply with go v1.15 2021-04-19 11:18:13 +02:00
Lili Cosic
8557cb29ba go.sum, go.mod: Run go mod tidy with go 1.12 2021-04-07 15:25:08 +02:00
Lili Cosic
ef415e3fe1 go.mod: Pin go to 1.12 version
As go 1.12.2 is what is tested in CI as well as recommended to be built
with 1.12.2 we should also pin to this in the go directive version.
2021-04-07 15:21:42 +02:00
Vitaliy Filippov
a40f14d92c etcdserver: Fix 64 KB websocket notification message limit
This fixes etcd being unable to send any message longer than 64 KB as
a notification over the websocket. This was because the older version
of grpc-websocket-proxy was used and WithMaxRespBodyBufferSize option
wasn't set.
2021-01-30 00:37:02 +03:00
Sam Batschelet
becc228c5a vendor: bump gorilla/websocket
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-01-23 11:20:53 -05:00
Sam Batschelet
46a0a44f95 Automated cherry pick of #12243 on release 3.4
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-08-21 10:14:07 -04:00
Gyuho Lee
54ba958911 version: 3.4.9
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-20 16:28:29 -07:00
Gary Belvin
e048e166ab
cherry pick of #11564 (#11880)
* clientv3: fix grpc-go(v1.27.0) incompatible changes to balancer/resolver.

* vendor: upgrade gRPC Go to v1.24.0

Picking up some performance improvements and bug fixes.

https://github.com/grpc/grpc-go/releases/tag/v1.24.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>

* vendor: update gRPC Go to v1.26.0 (#11522)

* GO111MODULE=on go mod vendor

* GO111MODULE=on go mod vendor go 1.14

Bump travis 2

Co-authored-by: EDDYCJY <313687982@qq.com>
Co-authored-by: Gyuho Lee <leegyuho@amazon.com>
Co-authored-by: Yuchen Zhou <yczhou@google.com>
2020-05-13 10:12:58 -07:00
Gyuho Lee
9ed5f76dc0 vendor: upgrade to gRPC v1.23.1
https://github.com/grpc/grpc-go/releases/tag/v1.23.1

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-11 14:54:24 -07:00
Carlos de Paula
a4f7c65ef8 vendor: x/sys and x/net to support building on Risc-V
Signed-off-by: Carlos de Paula <me@carlosedp.com>
2019-08-29 14:03:59 -07:00
Gyuho Lee
a481ee809f vendor: update "net/http2" to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 14:44:59 -07:00
Gyuho Lee
4d06d3b498 vendor: upgrade grpc-go to 1.23.0
https://github.com/grpc/grpc-go/releases/tag/v1.23.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 14:44:53 -07:00
Tobias Schottdorf
69c97cdc8f vendor: bump datadriven
Picks up some fixes for papercuts.
2019-08-12 08:10:19 -07:00
Gyuho Lee
a78793e6bf vendor: update gRPC to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 15:09:37 -07:00