1270 Commits

Author SHA1 Message Date
Benjamin Wang
3413f2e08d
Merge pull request #15908 from cuishuang/main
*: use strings.Builder instead of bytes.Buffer
2023-05-26 09:41:01 +08:00
Benjamin Wang
cdd9846b56
Merge pull request #15947 from chaochn47/hash_doc
update code comments
2023-05-25 18:44:49 +08:00
Bogdan Kanivets
ef91e8ae78 dependency: bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-24 23:58:13 -07:00
Chao Chen
9e1e378e9e update code comments
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-24 12:54:27 -07:00
cui fliter
0c919dc212 use the more efficient strings.Builder
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-05-19 10:44:58 +08:00
Benjamin Wang
19ec574f45
Merge pull request #15915 from hexfusion/bytes
server/storage/schema: prefer equal to compare for equality comparisons
2023-05-18 10:53:42 +08:00
Sam Batschelet
a708e94749 server/storage/schema: prefer equal to compare for equality comparisons
Signed-off-by: Sam Batschelet <sbatschelet@gmail.com>
2023-05-16 21:25:34 -04:00
James Blair
5a5b5a1c5d
dependency: bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 09:26:44 +12:00
James Blair
1798730cd8
dependency: bump golang.org/x/crypto from 0.8.0 to 0.9.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 08:39:19 +12:00
Benjamin Wang
2df32102ca
Merge pull request #15835 from yellowzf/grpcproxy_fix_memberlist_results_not_update_when_proxy_node_down
grpcproxy: fix memberlist results not update when proxy node down
2023-05-15 13:34:05 +08:00
yellowzf
ca221208d2 grpcproxy: fix memberlist results not update when proxy node down
If start grpc proxy with --resolver-prefix, memberlist will return all alive proxy nodes, when one grpc proxy node is down, it is expected to not return the down node, but it is still return

Signed-off-by: yellowzf <zzhf3311@163.com>
2023-05-15 10:59:02 +08:00
Benjamin Wang
67ec1a4d30
Merge pull request #15862 from pchan/bump_dependency
dependency: bump dependabot dependencies
2023-05-12 06:59:47 +08:00
Benjamin Wang
05b663fbe8
Merge pull request #15828 from chaochn47/add_leadership_transfer_coverage
tests/e2e: add graceful shutdown test
2023-05-11 07:39:25 +08:00
Chao Chen
f31d0eafb9 tests/e2e: add graceful shutdown test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-09 17:08:53 -07:00
Benjamin Wang
b404d25d84
Merge pull request #15741 from AngstyDuck/set-default-value-for-AutoCompactionMode
server: default value for config file field auto-compaction-mode is n…
2023-05-10 05:44:16 +08:00
AngstyDuck
a7344da7d3 server: default value for config file field auto-compaction-mode is now 'periodic'; added additional checks if auto-compaction-mode is undefined
Signed-off-by: AngstyDuck <solsticedante@gmail.com>
2023-05-09 23:10:44 +08:00
Prasad Chandrasekaran
c863f1f8c0 dependency: bump dependabot dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-09 18:38:35 +05:30
Benjamin Wang
b7ad0382ad
Merge pull request #15844 from mitake/style
server/etcdserver: swap order of return types
2023-05-09 06:34:34 +08:00
Hitoshi Mitake
a0cffb6a1f server/etcdserver: swap order of return types
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-05-08 22:53:04 +09:00
qsyqian
0cd1b7beaa log time when open backend db took too long
Signed-off-by: qsyqian <qsyqian@gmail.com>
2023-05-08 15:23:29 +08:00
Hitoshi Mitake
49b59cc8e5
Merge pull request #15656 from mitake/lease-timetolive-auth
protect LeaseTimeToLive with RBAC
2023-05-02 23:02:29 +09:00
Benjamin Wang
0deaec0e4f
Merge pull request #15762 from aimuz/fix-logger
refactor(util): remove duplicate lg check
2023-04-30 05:52:11 +08:00
aimuz
b052092297
refactor(util): remove duplicate lg check
lg always has a value

Signed-off-by: aimuz <mr.imuz@gmail.com>
2023-04-28 10:43:30 +08:00
Benjamin Wang
6d11f8ceb5
Merge pull request #15785 from Mskxn/fix_session
close the session to avoid leak goroutine
2023-04-27 04:24:17 +08:00
Msk233
26fdf46001 close the session to avoid leak goroutine
Signed-off-by: Mskxn <118117161+Mskxn@users.noreply.github.com>
2023-04-26 20:45:13 +08:00
Hitoshi Mitake
975854f07f etcdserver: protect lease timetilive with auth
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-04-26 20:35:20 +09:00
Benjamin Wang
8c5e9ad455
Merge pull request #15759 from fuweid/deflake-TestAuthMemberRemove
server/etcdserver: togRPCError for maintenance API
2023-04-25 09:26:28 +08:00
Benjamin Wang
211b4320c3
Merge pull request #15752 from sharathsivakumar/main
fixes for "improve description of --initial-cluster-state flag" #15743
2023-04-23 07:17:37 +08:00
sharathsivakumar
32c83becf5
fix review: Updated description of --initial-cluster-state flag
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-04-22 23:16:33 +02:00
Wei Fu
1ba577e499 server/etcdserver: togRPCError for maintenance API
It's to deflake TestAuthMemberRemove.

When the client has multiple endpoints, the client might send a request
with valid token to the follower member which hasn't received token
replicated log yet. The member will reject the request.

For instance, the maintenance.Status API will return "auth: invalid auth
token". But the client doesn't identify the error. The client won't retry to
refresh auth token. The maintenance.Status should togRPCError before return
so that the client can reflesh token. It's align with existing API.

Since the maintenance client always creates one connection to target
member, the member will have the token after refresh auth.

Maybe we can introduce a sync to wait for member is ready with token,
instead of refreshing.

Fixes: #15758

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-22 18:35:53 +08:00
Benjamin Wang
63c9fe1d00
Merge pull request #15751 from owayss/auth_store_unit_test_coverage
tests: increases unit test coverage for etcd/server/auth isRangeOpPermitted
2023-04-21 07:29:35 +08:00
Benjamin Wang
4a8817bfb0
Merge pull request #15737 from jmhbnz/update-dependencies
Bump dependencies identified by dependabot
2023-04-21 06:35:08 +08:00
James Blair
04f3e9cb9a
dependency: bump golang.org/x/crypto from 0.7.0 to 0.8.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:34:21 +12:00
James Blair
042e2e9a57
dependency: bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:14:40 +12:00
Owayss Kabtoul
1c18c86e18 tests: increases unit test coverage for etcd/server/auth isRangeOpPermitted
Signed-off-by: Owayss Kabtoul <owayssk@gmail.com>
2023-04-20 13:39:08 +02:00
cui fliter
57908723f4 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-20 14:26:17 +08:00
Marcondes Viana
9d14ae43c2 fix review: remove if on error check
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-18 10:43:13 -03:00
Marcondes Viana
ecc7441ba1 fix review: use assert lib
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-18 10:02:03 -03:00
Marcondes Viana
3654552fe8 fix review: move setup and vars
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-17 08:19:10 -03:00
Marcondes Viana
7a7e09d3a5 fix review: group calls
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 19:59:47 -03:00
Marcondes Viana
41b1d36bd9 fix review
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 17:44:46 -03:00
Marcondes Viana
a1a2f43f2f fix review
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 17:41:59 -03:00
Marcondes Viana
8fb839eac1 Update server/etcdserver/txn/txn_test.go
Signed-off-by: Marcondes Viana <marju10@gmail.com>
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2023-04-16 17:09:02 -03:00
Marcondes Viana
4c63611768 tests: cover txn.CheckTxnAuth logic with unit tests
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 13:24:12 -03:00
Marek Siarkowicz
6519a15db4
Merge pull request #15639 from ArkaSaha30/add-unit-test-malformed-jwt
server/auth: fix panic a malformed jwt generation and add test-cases
2023-04-11 12:19:28 +02:00
Benjamin Wang
dae1d70189 test: workaround the breaking change in jonboulle/clockwork
See
- https://github.com/jonboulle/clockwork/pull/55
- https://github.com/jonboulle/clockwork/blob/v0.3.0/clockwork.go#L42

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 12:01:09 +08:00
Benjamin Wang
dddd4780c2 dependency: bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:51:26 +08:00
Benjamin Wang
eb9b15bf49 dependency: bump golang.org/x/net from 0.8.0 to 0.9.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:44:26 +08:00
Benjamin Wang
8a27dd4db4 dependency: bump github.com/jonboulle/clockwork from 0.3.0 to 0.4.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:36:44 +08:00
ArkaSaha30
a1fa3bfe51 Add test cases for malformed jwt fix
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-04-10 09:38:49 +05:30