Justin Kolberg
eab0b999a8
clientv3: close streams after use in lessor keepAliveOnce method
...
Streams are now closed after being used in the lessor `keepAliveOnce` method.
This prevents the "failed to receive lease keepalive request from gRPC stream"
message from being logged by the server after the context is cancelled by the
client.
Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2022-08-18 09:54:12 -07:00
Benjamin Wang
2751c61f24
update all related dependencies
...
Upgrade grpc to 1.41.0;
Run ./script/fix.sh to fix all related issue.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-07 07:17:27 +08:00
Jille Timmermans
cbedaf90fe
Improve error message for incorrect values of ETCD_CLIENT_DEBUG
...
Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-14 09:43:54 +02:00
Sahdev Zala
4df61af2df
Client: fix check for WithPrefix op
...
Make sure that WithPrefix correctly set the flag, and add test.
Also, add test for WithFromKey.
fixes #14056
Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-07-02 23:33:26 -04:00
Benjamin Wang
df632abd8a
client/v3: do not overwrite authTokenBundle on dial
...
Cherry pick the PR https://github.com/etcd-io/etcd/pull/12992
to 3.5, so please refer to the original PR for more detailed info.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-18 06:59:55 +08:00
Marek Siarkowicz
08407ff760
version: bump up to 3.5.4
2022-04-24 12:44:36 +02:00
Marek Siarkowicz
0452feec71
version: bump up to 3.5.3
2022-04-13 17:17:51 +02:00
Danielle Lancashire
5d44f2242f
cv3/mirror: Fetch the most recent prefix revision
...
When a user sets up a Mirror with a restricted user that doesn't have
access to the `foo` path, we will fail to get the most recent revision
due to permissions issues.
With this change, when a prefix is provided we will get the initial
revision from the prefix rather than /foo. This allows restricted users
to setup sync.
2022-04-13 12:39:06 +00:00
Chris Ayoub
232fb980a7
clientv3: filter learners members during autosync
...
This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.
2022-04-09 21:25:42 -04:00
Marek Siarkowicz
238b18c110
Merge pull request #13895 from mrueg/rel3.5-client_golang
...
[release-3.5] go.mod: Upgrade to prometheus/client_golang v1.11.1
2022-04-07 09:38:43 +02:00
Manuel Rüger
3b8c6512df
go.mod: Upgrade to prometheus/client_golang v1.11.1
2022-04-06 00:35:48 +02:00
Marek Siarkowicz
a060b42e47
server: Use default logging configuration instead of zap production one
...
This fixes problem where logs json changes format of timestamp.
2022-04-01 12:23:44 +02:00
leoyang.yl
7cec92a281
*: fix IsOptsWithFromKey
...
porting back from 3.5 from main
PR #13334
2022-02-23 16:42:00 -08:00
Marek Siarkowicz
99018a77be
version: bump up to 3.5.2
2022-02-01 12:28:34 +01:00
Piotr Tabor
74f33d6665
Update dep: require gopkg.in/yaml.v2 v2.2.8 -> v2.4.0 due to: CVE-2019-11254.
2022-01-17 17:10:50 +01:00
Hitoshi Mitake
dec6f72d68
*: implement a retry logic for auth old revision in the client
2021-11-15 00:09:16 +09:00
Ashish Ranjan
79bbc8fdb7
client/v3: refresh the token when ErrUserEmpty is received while retrying
...
To fix a bug in the retry logic caused when the auth token is cleared after receiving `ErrInvalidAuthToken` from the server and the subsequent call to `getToken` also fails due to some reason (eg. context deadline exceeded).
This leaves the client without a token and the retry will continue to fail with `ErrUserEmpty` unless the token is refreshed.
2021-11-15 00:09:09 +09:00
Sam Batschelet
d42e8589e1
version: 3.5.1
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-03 11:47:37 -04:00
Marek Siarkowicz
79f9a45574
client: Use first endpoint as http2 authority header
2021-09-30 12:15:33 +02:00
Sam Batschelet
946a5a6f25
version: 3.5.0
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-15 17:34:52 -04:00
Sam Batschelet
8139dd3e55
version: 3.5.0-rc.1
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-09 17:57:52 -04:00
Lili Cosic
9fee8bf95e
Update client_golang dependency to v1.11.0
2021-06-07 15:54:57 +02:00
Sam Batschelet
ab20aa29a0
version: 3.5.0-rc.0
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-06-03 21:39:37 -04:00
Piotr Tabor
a5523be415
Update of dependencies:
...
- zap-1.17.0
- bbolt-1.3.6
- grpc -1.38
- github.com/coreos/go-systemd/v22 v22.3.2
- github.com/google/btree v1.0.1
- github.com/json-iterator/go v1.1.11
2021-06-03 15:19:33 +02:00
Sam Batschelet
6cd7c02873
Merge pull request #13055 from ptabor/20210528-beckport-integration-fixes
2021-05-30 16:35:15 -04:00
Piotr Tabor
3f13d3a2d5
integration.BeforeTest can be run without leak-detection.
2021-05-28 10:01:36 +02:00
Piotr Tabor
4af7fc393c
Expose clientv3.CreateDefaultZapLoggerConfig
...
Need raised in
f3f4259d3f
.
BTW: Alligned the implementation of grpclogs with what we use in embed server, so reduced the client code dependencies.
2021-05-26 12:52:46 +02:00
Sam Batschelet
b3f16d6691
version: 3.5.0-beta.4
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-25 20:48:48 -04:00
Sam Batschelet
379c361bc6
version: 3.5.0-beta.3
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 09:44:35 -04:00
Sam Batschelet
1a8a063a31
version: 3.5.0-beta.2
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 06:32:19 -04:00
Gyuho Lee
e2d67f2e3b
Merge pull request #12956 from gyuho/rename-to-main
...
*: rename "master" branch references to "main" in source code
2021-05-13 08:26:33 -07:00
Gyuho Lee
a8e1cf0433
client: rename "master" branch references to "main"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:38:50 -07:00
Marek Siarkowicz
1189ee3f3d
client: Add logger argument to NewCtxClient
2021-05-12 16:40:55 +02:00
Piotr Tabor
1929aa0a36
Merge pull request #12948 from serathius/logger
...
client: Allow setting zap logger in config
2021-05-12 13:49:48 +02:00
Marek Siarkowicz
06afe87b34
client: Allow setting zap logger in config
2021-05-12 12:15:20 +02:00
Piotr Tabor
3b24496c2a
Merge pull request #12925 from yangxuanjia/yxjetcd_check_resuming
...
check resuming len to avoid panic
2021-05-12 09:18:40 +02:00
yangxuanjia
68b1e9f728
check resuming len to avoid panic
2021-05-12 09:51:59 +08:00
Lili Cosic
1a718a958e
Add initial Tracing with OpenTelemetry
2021-05-10 10:44:40 +02:00
刘兵
a8a3eea56d
fix doc demo bug
...
the service parameter not used.
2021-05-05 13:57:10 +08:00
Piotr Tabor
ffea1537d4
ClientV3 tests use integration.NewClient that configures proper logger.
2021-04-29 18:18:34 +02:00
Piotr Tabor
bc8d3f6639
Clientv3 (retry) logs should use the configured logger.
...
clientv3 logs (especially tests) were poluted with unattributed to testing.T log lines:
```
{"level":"warn","ts":"2021-04-29T12:42:11.055+0200","logger":"etcd-client","caller":"v3/retry_interceptor.go:64","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0000fafc0/#initially=[unix://localhost:m10]","attempt":0,"error":"rpc error: code = ResourceExhausted desc = etcdserver: mvcc: database space exceeded"}
```
The reasons were 2 fold:
- Interceptors were copying logger before "WithLogger" could modify it.
- We were not propagating the loggers in a few testing contexts.
2021-04-29 12:57:09 +02:00
Piotr Tabor
3423a949c0
Update go for 3.5: 1.15 -> 1.16.(3).
...
https://github.com/etcd-io/etcd/issues/12732
2021-04-19 16:50:54 +02:00
Piotr Tabor
eafbc8c57e
Update zap logging dependency.
...
In particular bring up zapgrpc V2 code:
89e382035d
https://pkg.go.dev/google.golang.org/grpc/grpclog#LoggerV2
2021-04-14 12:15:48 +02:00
大可
5db0070150
Update doc.go
2021-04-13 22:22:42 +08:00
大可
d7e971e8d8
client: fix doc typo
2021-04-13 16:33:24 +08:00
Piotr Tabor
3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02:00
Piotr Tabor
f290ab2e60
Update dependecies:
...
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> grpc-gateway v1.16.0
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e->v0.0.0-20210220033141-f8bda1e9f3ba
2021-03-27 20:48:33 +01:00
Piotr Tabor
a60676686b
Update dep: grpc: 1.32.0 -> 1.36.0.
2021-03-24 22:27:55 +01:00
Piotr Tabor
45fb7b41d6
Update dep: github.com/golang/protobuf v1.3.5 -> v1.5.1
...
Thanks to https://go-review.googlesource.com/c/protobuf/+/300869/ its
feasible now.
2021-03-24 22:27:12 +01:00
Piotr Tabor
18321a0c85
Merge pull request #12786 from ptabor/20210318-debug-env
...
client: Bring back ETCD_CLIENT_DEBUG variable interpretation.
2021-03-18 21:55:51 +01:00