17757 Commits

Author SHA1 Message Date
Wei Fu
8d98510e1a *: keep tombstone if revision == compactAtRev
Before this patch, the tombstone can be deleted if its revision is equal
compacted revision. It causes that the watch subscriber won't get this
DELETE event. Based on Compact API[1], we should keep tombstone revision
if it's not less than the compaction revision.

> CompactionRequest compacts the key-value store up to a given revision.
> All superseded keys with a revision less than the compaction revision
> will be removed.

[1]: https://etcd.io/docs/latest/dev-guide/api_reference_v3/

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit bbdc94181a6d67904b575ad936c20d1be10e220c)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-20 18:55:25 +08:00
Wei Fu
db701a5fb7 *: update tests for watch API when compact on tombstone revision
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit ee33652775842b96d1c0ab601ec3002078998c2a)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-20 18:22:09 +08:00
Benjamin Wang
21f6ad0fbf
Merge pull request #18461 from fuweid/35-backport-18274-part2
[3.5] mvcc/*_test.go: should not use duplicate revision.Main for one key
2024-08-19 11:11:26 +01:00
Benjamin Wang
d524ad332f
Merge pull request #18457 from fuweid/35-backport-18274-part1
[3.5] tests/e2e: add e2e test to reproduce issue 18089
2024-08-19 07:22:54 +01:00
Benjamin Wang
82a9561d77
Merge pull request #18458 from fuweid/35-backport-18287
[3.5] client/pkg/testutil: update interestingGoroutines
2024-08-19 07:21:00 +01:00
Wei Fu
15e8a7e32c mvcc/*_test.go: should not use duplicate revision.Main for one key
Backport of #18321

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-18 20:54:39 +08:00
Wei Fu
fd735dd51a client/pkg/testutil: update interestingGoroutines
The Go runtime uses runtime Finalizer to delete cert [[1]]. The
interestingGoroutines is able to collect stack like,

```plain
leak.go:103: Found leaked goroutined BEFORE test appears to have leaked :
        sync.(*Map).LoadAndDelete(0xc00031e180, {0xe07320, 0xc00009fde0})
                /usr/local/go/src/sync/map.go:272 +0x192
        sync.(*Map).Delete(...)
                /usr/local/go/src/sync/map.go:297
        crypto/tls.(*certCache).evict(...)
                /usr/local/go/src/crypto/tls/cache.go:73
        crypto/tls.(*certCache).active.func1(0x0?)
                /usr/local/go/src/crypto/tls/cache.go:65 +0x67
```

It's caused by GC instead of leaky goroutine. interestingGoroutines
should skip it.

Backport of #18287

[1]: 8e1fdea831/src/crypto/tls/cache.go (L63)

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-17 12:38:09 +08:00
Madhav Jivrajani
e4a80978de tests/e2e: add e2e test to reproduce issue 18089
The goal is to reproduce a DELETE event being dropped in a watch after a compaction
occurs on the revision where the deletion took place. In order to reproduce this, we
perform the following sequence (steps for reproduction thanks to @ahrtr):
  - PUT k v2 (assume returned revision = r2)
  - PUT k v3 (assume returned revision = r3)
  - PUT k v4 (assume returned revision = r4)
  - DELETE k (assume returned revision = r5)
  - PUT k v6 (assume returned revision = r6)
  - COMPACT r5
  - WATCH rev=r5

We should get the DELETE event (r5) followed by the PUT event (r6). However, currently we only
get the PUT event with returned revision of r6 (key=k, val=v6).

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
(cherry picked from commit ebf2cac6bda38892121585d2467982da54e60ef1)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-17 12:32:08 +08:00
Benjamin Wang
fa7ce713bc
Merge pull request #18446 from henrybear327/3.5_go/1.22.0
[release-3.5] Bump go toolchain to 1.22.6
2024-08-16 17:05:35 +01:00
Benjamin Wang
1f246358f6
Merge pull request #18451 from ahrtr/lease_5members_20240816_3.5
[3.5] test: extend leaseRevoke and leaseRenew test to support 5 members cluster
2024-08-16 16:01:00 +01:00
Benjamin Wang
64ec42d992 test: extend leaseRevoke and leaseRenew test to support 5 members cluster
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-08-16 13:29:01 +01:00
Chun-Hung Tseng
f9907859e5 Bump go toolchain to 1.22.6
Reference:
- https://github.com/etcd-io/etcd/issues/18443

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-08-14 23:55:33 +02:00
Benjamin Wang
1c62564efb
Merge pull request #18439 from ahrtr/improve_leaseRenew_20240814_3.5
[3.5] Skip leadership check if the etcd instance is active processing heartbeats
2024-08-14 21:22:52 +01:00
Benjamin Wang
184168a749 Skip leadership check if the etcd instance is active processing heartbeats
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-08-14 15:36:17 +01:00
James Blair
1bdb632188
Merge pull request #18430 from jmhbnz/release-3.5
[3.5] Backport github/workflows: set read-only default permissions to approve workflow
2024-08-12 08:22:46 +12:00
James Blair
31005c1b99
Backport setting default read-only permissions.
Backports commit: #5a02298ad5a947214ba02655b0a93ac01d4c178a

Signed-off-by: James Blair <mail@jamesblair.net>
2024-08-11 21:53:39 +12:00
Benjamin Wang
f95c9fb300
Merge pull request #18421 from henrybear327/go/3.5-1.21.13
[release-3.5] go version bump from 1.21.12 to 1.21.13
2024-08-08 22:02:48 +01:00
Chun-Hung Tseng
8748e5199d
[release-3.5] go version bump from 1.21.12 to 1.21.13
Reference: https://github.com/etcd-io/etcd/issues/18419
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-08-08 21:30:30 +02:00
James Blair
fd14c92dc0
Merge pull request #18400 from thedtripp/backportOwnersFile
Complete backport of migration to OWNERS file.
2024-08-04 19:01:51 +12:00
D Tripp
49d9234d57 Complete backport of migration to OWNERS file.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-08-04 06:15:07 +00:00
Benjamin Wang
c3540409c4
Merge pull request #18394 from thedtripp/backportOwnersFile
Backport migration of OWNERS file.
2024-08-03 10:51:19 +01:00
Marek Siarkowicz
0dc05c74e7
Merge pull request #18398 from ahrtr/3.5_cleanup_gofail_20240802
[3.5] Cleanup github.com/etcd-io/gofail
2024-08-02 15:08:49 +02:00
Benjamin Wang
5a437a3c55 Cleanup github.com/etcd-io/gofail
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-08-02 13:21:59 +01:00
Marek Siarkowicz
d83c8bd107
Merge pull request #18395 from serathius/release-3.5-gofail
Upgrade gofail to v0.2.0
2024-08-02 09:57:43 +02:00
Marek Siarkowicz
1a18275a2d Upgrade gofail to v0.2.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-08-02 09:32:37 +02:00
D Tripp
103593c019 Backport migration of OWNERS file.
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-08-02 02:47:12 +00:00
Marek Siarkowicz
6abcc183ed
Merge pull request #18388 from etcd-io/dependabot/docker/release-3.5/distroless/static-debian11-1dbe426d60caed5d19597532a2d74c8056cd7b1674042b88f7328690b5ead8ed
build(deps): bump distroless/static-debian11 from `6d31326` to `1dbe426`
2024-08-01 20:26:09 +02:00
dependabot[bot]
9463e75c25
build(deps): bump distroless/static-debian11 from 6d31326 to 1dbe426
Bumps distroless/static-debian11 from `6d31326` to `1dbe426`.

---
updated-dependencies:
- dependency-name: distroless/static-debian11
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 17:05:27 +00:00
Marek Siarkowicz
f2ea60dbec
Merge pull request #18358 from serathius/kubernetes-3.5
Introduce Kubernetes KV interface to etcd client
2024-07-24 10:48:43 +02:00
Marek Siarkowicz
c1eeabade7 Introduce Kubernetes KV interface to etcd client
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-07-23 14:57:36 +02:00
Wenjia Zhang
9a5533382d version: bump up to 3.5.15 v3.5.15 tests/v3.5.15 etcdctl/v3.5.15 etcdutl/v3.5.15 server/v3.5.15 client/v3.5.15 client/v2.305.15 client/pkg/v3.5.15 raft/v3.5.15 pkg/v3.5.15 api/v3.5.15 2024-07-19 20:13:00 +00:00
James Blair
d6479db0ef
Merge pull request #18289 from jmhbnz/backport-enforce-listen-metrics-tls-info
[3.5] Backport fix(server/embed) enforce non-empty client TLS if scheme is https/unixs
2024-07-16 15:10:55 +12:00
Benjamin Wang
e940b8e4cc
Merge pull request #18319 from ahrtr/3.5_log_20240714
[3.5] Differentiate the warning message for rejected client and peer connections
2024-07-14 11:02:33 +01:00
Benjamin Wang
12854ec00d Differentiate the warning message for rejected client and peer connections
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-07-14 08:50:54 +01:00
Benjamin Wang
4548f41e11
Merge pull request #18312 from mohamedawnallah/backport-3.5-fmtgRPCMetadata
[3.5] client/v3/watch.go: use fmt go pkg for gRPC metadata map printing
2024-07-13 07:02:27 +01:00
Mohamed Awnallah
1bfca729f5
client/v3/watch_test.go: test fmt metadata print
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: Benjamin Wang <ahrtr>
2024-07-12 14:50:59 +03:00
Mohamed Awnallah
b1fc94f88e
client/v3/watch.go: use fmt for metadata printing
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-07-12 14:50:54 +03:00
James Blair
c6b0b55847
Backport: fix(server/embed): enforce non-empty client TLS if scheme is https/unixs
Backports a657f06, 22f20a8, 497f1a4 and 3e86af6 from #18186.

Also backports required test util elements of 4c77726 from #17661.

Signed-off-by: James Blair <mail@jamesblair.net>
2024-07-09 21:09:23 +12:00
James Blair
301b1246aa
Merge pull request #18288 from k8s-infra-cherrypick-robot/cherry-pick-18108-to-release-3.5
[3.5] Fix ts with no trailing zeros
2024-07-09 21:06:10 +12:00
Benjamin Wang
2b2473ce7c
Merge pull request #18284 from thedtripp/check-tools-mod-in-verify-deps
[3.5] make: Include tools/mod when checking dependency versions
2024-07-09 07:23:05 +01:00
Chao Chen
af009be983 fix ts with no trailing zeros
Signed-off-by: Chao Chen <chaochn@amazon.com>
2024-07-06 10:52:11 +00:00
James Blair
472de10204
Merge pull request #18286 from k8s-infra-cherrypick-robot/cherry-pick-18250-to-release-3.5
[release-3.5] Remove gsutil acl command for bucket permissions from release.sh
2024-07-06 22:35:48 +12:00
James Blair
9aaaafe8d9 Remove gsutil acl command for bucket permissions.
The bucket is already fully public so new releases don't need to run this command.

This will prevent significant terminal spam during the release process as there are thousands of objects in the bucket.

Signed-off-by: James Blair <mail@jamesblair.net>
2024-07-05 06:12:35 +00:00
D Tripp
35a9140d8d dependency: bump tools/mod google.golang.org/genproto
to v0.0.0-20230822172742-b8732ec3820d

bump tools/mod google.golang.org/genproto/googleapis/api

to v0.0.0-20230822172742-b8732ec3820d

Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:20:50 +00:00
D Tripp
64d8a63fde dependency: bump tools/mod github.com/spf13/cobra to v1.1.3
bump honnef.co/go/tools to v0.0.1-2019.2.3

bump gopkg.in/yaml.v2 to v2.4.0

Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:11:33 +00:00
D Tripp
4420b5501b dependency: bump tools/mod github.com/olekukonko/tablewriter to v0.0.5
Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:08:57 +00:00
D Tripp
a56281544c dependency: bump tools/mod github.com/mattn/go-runewidth
to v0.0.9.

Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:07:00 +00:00
D Tripp
cab6d1dcac dependency: bump tools/mod github.com/mattn/go-colorable
to v0.1.11

github.com/mattn/go-isatty v0.0.12 to v0.0.14

Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:03:50 +00:00
D Tripp
d15fbc6959 dependency: bump tools/mod github.com/grpc-ecosystem/grpc-gateway
to v1.16.0.

Use the same version across all the modules from the project.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-05 00:00:00 +00:00
D Tripp
5727c64b96 make: Include tools/mod when checking dependency versions
Backport of ba4b2bffeb

Related issue: https://github.com/etcd-io/etcd/issues/18180

As tools/mod is not part of the test library's modules, the check to verify
consistent dependency versions ignored it. Explicitly get the dependencies from
this module when running verify-dep.

Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-04 22:31:03 +00:00