Commit Graph

22676 Commits

Author SHA1 Message Date
6b0a9cd763 Remove some HealthInterval to reduce the time to run DowngradeUpgradeMembers.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-02-02 14:54:29 -08:00
cad3fce1a0 fix: use testify instead of t.Fatal or t.Error in pkg package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-02-02 16:30:18 +01:00
0795f6b957 migrate experimental-memory-mlock flag to memory-mlock
Signed-off-by: Jiayin Mao <jiayin.mao@datadoghq.com>
2025-02-01 22:57:54 +00:00
b197332b13 Merge pull request #19313 from fuweid/deflaky-TestSnapshotStatus
deflaky: TestSnapshotStatus
2025-01-31 21:14:58 +00:00
12bbee7c1c deflaky: TestSnapshotStatus
Root Cause

The backend commits pending changes into boltdb per 100 ms by default.
When brand-new member starts, that member will save member into
backend by `MustSaveMemberToBackend`. However, it doesn't force change
into boltdb. It depends on backend's auto-commit per 100ms.

If auto-commit happens after `UpdateStorageVersion`, the `UpdateStorageVersion`
will fail on `missing confstate information`. The confstate information
is handled by commit-prehook. Once `UpdateStorageVersion` fails,
`TestSnapshotStatus` won't have another chance to do that because that
server has been closed. So without storage version information, hash of boltdb
data is not expected.

How to reproduce it?

```diff
diff --git a/etcdutl/snapshot/v3_snapshot_test.go b/etcdutl/snapshot/v3_snapshot_test.go
index c2b3d5202..cd88ff995 100644
--- a/etcdutl/snapshot/v3_snapshot_test.go
+++ b/etcdutl/snapshot/v3_snapshot_test.go
@@ -141,6 +141,7 @@ func createDB(t *testing.T, generateContent func(*etcdserver.EtcdServer)) string
        t.Helper()

        cfg := embed.NewConfig()
+       cfg.BackendBatchInterval = 5 * time.Second
        cfg.LogLevel = "fatal"
        cfg.Dir = t.TempDir()
```

```bash
➜  snapshot git:(deflaky-TestSnapshotStatus) ✗ go test -v -run "^TestSnapshotStatus$" -count 1 ./
=== RUN   TestSnapshotStatus
    v3_snapshot_test.go:47:
                Error Trace:    /home/weifu/workspace/etcd/etcdutl/snapshot/v3_snapshot_test.go:47
                Error:          Not equal:
                                expected: 0x62132b4d
                                actual  : 0x6bf96324
                Test:           TestSnapshotStatus
--- FAIL: TestSnapshotStatus (0.14s)
FAIL
FAIL    go.etcd.io/etcd/etcdutl/v3/snapshot     0.154s
FAIL
```

How to fix?

Change `BackendBatchLimit` to `1` so that we can force-commit during
`MustSaveMemberToBackend`.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-01-31 15:06:14 -05:00
d52bceb2f1 Merge pull request #19192 from wodeyoulai/main
Correct compaction period comments
2025-01-31 18:45:31 +00:00
05f700fa77 Merge pull request #19305 from ivanvc/test-prow-job
scripts/test_images.sh: refactor to import job into the prow infrastructure
2025-01-31 17:56:30 +00:00
497d9b5f0e Merge pull request #19311 from ahrtr/changelog_grpc_prom_20250131
Update 3.6 changelog to cover the go-grpc-middleware/providers/promet…
2025-01-31 17:55:29 +00:00
83ff4fff1f Merge pull request #19195 from dims/switch-from-grpc-ecosystem/go-grpc-prometheus-to-grpc-ecosystem/go-grpc-middleware/providers/prometheus-take-2
Switch from grpc-ecosystem/go-grpc-prometheus to grpc-ecosystem/go-grpc-middleware/providers/prometheus
2025-01-31 17:55:18 +00:00
49c22492ee Update 3.6 changelog to cover the go-grpc-middleware/providers/prometheus change
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-31 15:04:51 +00:00
6d8c6af06a Update the import items
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-31 14:40:32 +00:00
1f33bafd01 Remove the integration test case TestAllMetricsGenerated
Refer to https://github.com/etcd-io/etcd/pull/19195#issuecomment-2627486682

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-31 14:31:27 +00:00
3648220e22 incorporate feedback from review
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-31 06:44:29 -05:00
1216d08769 Merge pull request #19297 from jmhbnz/main
Mark etcd-local-tester as deprecated so we can remove it in future
2025-01-31 10:37:58 +00:00
51820dfd3f Merge pull request #19310 from ivanvc/fix-goword-errors
Fix goword errors
2025-01-31 07:46:22 +00:00
df6ecb2b23 Merge pull request #19300 from sebastiangaiser/main
fix(alerts): set severity of 'ectdMembersDown' from 'critical' to 'wa…
2025-01-31 07:44:26 +00:00
c136d5a73c Fix goword errors
For some reason, the goword check has been passing while the file
`tests/integration/embed/embed_proxy_test.go` has an error in the godoc.
Update it so it doesn't show the error anymore.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-30 22:41:07 -08:00
91c07650ec fix: use require instead of t.Fatal(err) in tests/integration package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-01-30 22:30:51 +00:00
0ac24a804d Refactor scripts/test_images.sh
* Wrap script in functions, add a main function, and call them from it.
* Make environment variables local inside the function scope to avoid
  unexpected behaviors by the running environment-supplied variables.
* Fix the typo in the "REPOSITORY" environment variable.
* Rename the input "IMAGE" to "TEST_IMAGE" to avoid clashing with the
  environment variable from the Prow infrastructure.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-30 13:24:51 -08:00
488f21564f Merge pull request #19308 from ahrtr/http_20250130
[test] Close the http response body
2025-01-30 15:00:31 +00:00
73700e30c4 Close the http response body
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-30 14:05:44 +00:00
c3e4df6de1 Switch from grpc-ecosystem/go-grpc-prometheus to grpc-ecosystem/go-grpc-middleware/providers/prometheus
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-30 08:43:53 -05:00
575b484ba0 fix(alerts): set severity of 'ectdMembersDown' from 'critical' to 'warning'
Downgraded severity of 'etcdMembersDown' from 'critical' to 'warning' as a single etcd member being not available should not be a problem for etcd's quorum. If the quorum would not be fulfilled, 'etcdInsufficientMembers' should fire. In addition the 'for' interval was extended from '10m' to '20m' as e.g. a node reboot with a big physical node takes usually longer than 10 minutes.

Signed-off-by: Sebastian Gaiser <sebastiangaiser@users.noreply.github.com>
2025-01-30 09:51:19 +00:00
f5973c9c27 Merge pull request #19302 from ahrtr/metrics_20250129
Add e2e metrics test case to ensure no any metrics missing in future PRs
2025-01-30 09:13:39 +00:00
93e90721a6 Align NewConfig with AddFlags defaults
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-01-30 09:38:14 +01:00
c4a424a5b3 add e2e metrics test case to ensure no any metrics missing in future PRs
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-29 21:01:40 +00:00
dd60559a8b Merge pull request #19294 from ivanvc/changelog-3.5.18-dependencies
changelog: add entries regarding 3.5.18 dependency updates
2025-01-29 19:31:25 +00:00
037de81526 Merge pull request #19298 from gangli113/experimentalFlag
migrate to use max-learners flag
2025-01-29 18:58:36 +00:00
f3ba625119 Merge pull request #19291 from ivanvc/changelog-3.5-19275
changelog: add mixed rw performance evaluation backport
2025-01-29 17:49:10 +00:00
d5b5679c46 Merge pull request #19293 from henrybear327/dependency/25_01_28
[2025-01-28] Bump dependency updates identified by dependabot
2025-01-29 16:40:16 +00:00
6ed344fc71 Merge pull request #19301 from ahrtr/metrics_format_20250129
Format all prometheus metrics to ensure nice indent
2025-01-29 14:34:59 +00:00
614640f1c2 format all prometheus metrics to ensure nice indent
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-29 13:42:14 +00:00
27d9978c8e migrate to use max-learners flag
Signed-off-by: Gang Li <gangligit@gmail.com>
2025-01-28 17:23:51 -08:00
b2fba0290d Mark etcd-local-tester as deprecated so we can remove it in future.
Signed-off-by: James Blair <mail@jamesblair.net>
2025-01-29 11:23:21 +13:00
c6f911a0a4 changelog: add entries regarding 3.5.18 dependency updates
Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-28 11:11:37 -08:00
ff76d1800a dependency: bump github.com/prometheus/common from 0.61.0 to 0.62.0
Reference:
- https://github.com/etcd-io/etcd/pull/19283

Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
2025-01-28 16:40:58 +00:00
c5544044b3 dependency: bump google.golang.org/grpc from 1.69.4 to 1.70.0
Reference:
- https://github.com/etcd-io/etcd/pull/19284

Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
2025-01-28 16:40:58 +00:00
2400016a5e dependency: bump github.com/cheggaaa/pb/v3 from 3.1.5 to 3.1.6 and github.com/mattn/go-colorable from 0.1.13 to 0.1.14
Reference:
- https://github.com/etcd-io/etcd/pull/19286

Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
2025-01-28 16:40:58 +00:00
70c2e17031 dependency: bump google.golang.org/protobuf from 1.36.3 to 1.36.4
Reference:
- https://github.com/etcd-io/etcd/pull/19287

Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
2025-01-28 16:40:58 +00:00
60e8485b48 dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.25.1 to 2.26.0
Reference:
- https://github.com/etcd-io/etcd/pull/19288
- https://github.com/etcd-io/etcd/pull/19285

Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
2025-01-28 16:40:35 +00:00
35d20d1e08 Merge pull request #19244 from henrybear327/e2e/downgrade_cancellation_e2e
Add downgrade cancellation e2e tests
2025-01-28 13:41:05 +00:00
2e41777edb Introduce ValidateMemberVersions
Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
2025-01-28 12:47:53 +00:00
a3c072c3e8 Add missing error checking after calling DowngradeUpgradeMembers
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
2025-01-28 12:35:45 +00:00
e25eca27e3 Add downgrade cancellation e2e tests
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com>
Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
2025-01-28 12:35:45 +00:00
291353bc09 Merge pull request #19281 from AwesomePatrol/fix-kubernetes-interface-docs
Fix documentation of List method of Kubernetes interface
2025-01-28 10:29:39 +01:00
62bbf2866b Fix documentation of List method of kubernetes interface
It wrongly asked the API user to use the last key of previous response
when they should append "\x00" to exclude the last key from the contents
of the next requested page.

Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-01-28 09:30:54 +01:00
2895b19f53 Merge pull request #19289 from etcd-io/dependabot/github_actions/actions/setup-go-5.3.0
build(deps): bump actions/setup-go from 5.2.0 to 5.3.0
2025-01-27 20:58:05 +00:00
acc390844b Merge pull request #19290 from etcd-io/dependabot/github_actions/github/codeql-action-3.28.5
build(deps): bump github/codeql-action from 3.28.1 to 3.28.5
2025-01-27 20:48:40 +00:00
ee32f70eef Merge pull request #19276 from ahrtr/downgrad_test_20250126
[Solution 2] Add `DowngradeVersionTestRequest` for Downgrade or migration test only
2025-01-27 20:23:06 +00:00
8a1a396222 changelog: add mixed rw performance evaluation backport
Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-27 11:29:13 -08:00