diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 58a086ca6215..7bf55882f486 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -5,6 +5,11 @@ permissions: read-all jobs: test: runs-on: ubuntu-latest + container: + image: golang:1.20-bullseye + defaults: + run: + shell: bash strategy: fail-fast: true matrix: @@ -13,6 +18,8 @@ jobs: - linux-386-e2e steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 diff --git a/.github/workflows/grpcproxy.yaml b/.github/workflows/grpcproxy.yaml index 96f18a52c8b8..e28b3b6ae3a6 100644 --- a/.github/workflows/grpcproxy.yaml +++ b/.github/workflows/grpcproxy.yaml @@ -5,6 +5,10 @@ permissions: read-all jobs: test: runs-on: ubuntu-latest + container: golang:1.20-bullseye + defaults: + run: + shell: bash strategy: fail-fast: true matrix: @@ -13,6 +17,8 @@ jobs: - linux-amd64-grpcproxy-e2e steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 diff --git a/.github/workflows/robustness-nightly.yaml b/.github/workflows/robustness-nightly.yaml index 0d0c706a95e4..e3e1d51f3cd9 100644 --- a/.github/workflows/robustness-nightly.yaml +++ b/.github/workflows/robustness-nightly.yaml @@ -15,8 +15,9 @@ jobs: count: 80 testTimeout: 200m artifactName: main + runs-on: "['ubuntu-latest-8-cores']" main-arm64: - uses: ./.github/workflows/robustness-template-arm64.yaml + uses: ./.github/workflows/robustness-template.yaml with: etcdBranch: main count: 80 @@ -30,13 +31,15 @@ jobs: count: 80 testTimeout: 200m artifactName: release-35 + runs-on: "['ubuntu-latest-8-cores']" release-35-arm64: - uses: ./.github/workflows/robustness-template-arm64.yaml + uses: ./.github/workflows/robustness-template.yaml with: etcdBranch: release-3.5 count: 100 testTimeout: 200m artifactName: release-35-arm64 + runs-on: "['self-hosted', 'Linux', 'ARM64']" release-34: uses: ./.github/workflows/robustness-template.yaml with: @@ -44,3 +47,4 @@ jobs: count: 80 testTimeout: 200m artifactName: release-34 + runs-on: "['ubuntu-latest-8-cores']" diff --git a/.github/workflows/robustness-template-arm64.yaml b/.github/workflows/robustness-template-arm64.yaml deleted file mode 100644 index adb30fc538a3..000000000000 --- a/.github/workflows/robustness-template-arm64.yaml +++ /dev/null @@ -1,78 +0,0 @@ ---- -name: Reusable Robustness Workflow -on: - workflow_call: - inputs: - etcdBranch: - required: true - type: string - count: - required: true - type: number - testTimeout: - required: false - type: string - default: '30m' - artifactName: - required: true - type: string - runs-on: - required: false - type: string - default: "['ubuntu-latest']" -permissions: read-all - -jobs: - test: - timeout-minutes: 210 - runs-on: ${{ fromJson(inputs.runs-on) }} - container: - image: golang:1.20-bullseye - # Required for mounting fuse lazyfs - options: --privileged - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - # https://github.com/actions/checkout/issues/1169 - - run: git config --system --add safe.directory '*' - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - with: - go-version: ${{ steps.goversion.outputs.goversion }} - - name: test-robustness - env: - ETCD_BRANCH: "${{ inputs.etcdBranch }}" - run: | - set -euo pipefail - go clean -testcache - - # Build LazyFS - apt update && apt-get --yes install cmake libfuse3-dev libfuse3-3 fuse3 - make install-lazyfs - # Use --failfast to avoid overriding report generated by failed test - GO_TEST_FLAGS="-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness" - case "${ETCD_BRANCH}" in - release-3.5) - EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.5 - ;; - release-3.4) - EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.4 - ;; - main) - make gofail-enable - make build - EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness - ;; - *) - echo "Failed to find target ${ETCD_BRANCH}" - exit 1 - ;; - esac - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - if: always() - with: - name: ${{ inputs.artifactName }} - path: /tmp/results/* diff --git a/.github/workflows/robustness-template.yaml b/.github/workflows/robustness-template.yaml index 87bf803c6343..adb30fc538a3 100644 --- a/.github/workflows/robustness-template.yaml +++ b/.github/workflows/robustness-template.yaml @@ -21,12 +21,22 @@ on: type: string default: "['ubuntu-latest']" permissions: read-all + jobs: test: timeout-minutes: 210 runs-on: ${{ fromJson(inputs.runs-on) }} + container: + image: golang:1.20-bullseye + # Required for mounting fuse lazyfs + options: --privileged + defaults: + run: + shell: bash steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 @@ -40,9 +50,8 @@ jobs: go clean -testcache # Build LazyFS - sudo apt-get -y install cmake libfuse3-dev libfuse3-3 fuse3 + apt update && apt-get --yes install cmake libfuse3-dev libfuse3-3 fuse3 make install-lazyfs - # Use --failfast to avoid overriding report generated by failed test GO_TEST_FLAGS="-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness" case "${ETCD_BRANCH}" in diff --git a/.github/workflows/robustness.yaml b/.github/workflows/robustness.yaml index 80e55a9a3c3b..24db4513dd1f 100644 --- a/.github/workflows/robustness.yaml +++ b/.github/workflows/robustness.yaml @@ -10,3 +10,4 @@ jobs: count: 12 testTimeout: 30m artifactName: main + runs-on: "['ubuntu-latest-8-cores']" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6f06addb3872..96c2862612c4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,6 +5,10 @@ permissions: read-all jobs: test: runs-on: ubuntu-latest + container: golang:1.20-bullseye + defaults: + run: + shell: bash strategy: fail-fast: false matrix: @@ -16,6 +20,8 @@ jobs: - linux-386-unit-1-cpu steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # https://github.com/actions/checkout/issues/1169 + - run: git config --system --add safe.directory '*' - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 diff --git a/CHANGELOG/CHANGELOG-3.4.md b/CHANGELOG/CHANGELOG-3.4.md index a5463cded55e..e7357a5241e3 100644 --- a/CHANGELOG/CHANGELOG-3.4.md +++ b/CHANGELOG/CHANGELOG-3.4.md @@ -11,7 +11,7 @@ Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/ - Fix [Reset auth token when failing to authenticate due to auth being disabled](https://github.com/etcd-io/etcd/pull/16240) ### Dependencies -- Compile binaries using [go 1.19.12](https://github.com/etcd-io/etcd/pull/16353). +- Compile binaries using [go 1.20.7](https://github.com/etcd-io/etcd/pull/16406).
diff --git a/CHANGELOG/CHANGELOG-3.5.md b/CHANGELOG/CHANGELOG-3.5.md index 926244c1d466..d3f71027c02f 100644 --- a/CHANGELOG/CHANGELOG-3.5.md +++ b/CHANGELOG/CHANGELOG-3.5.md @@ -7,6 +7,7 @@ Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/ ## v3.5.10 (tbd) ### etcd server +- Fix [`--socket-reuse-port` and `--socket-reuse-address` not able to be set in configuration file](https://github.com/etcd-io/etcd/pull/16435). - Fix [corruption check may get a `ErrCompacted` error when server has just been compacted](https://github.com/etcd-io/etcd/pull/16048) - Improve [Lease put performance for the case that auth is disabled or the user is admin](https://github.com/etcd-io/etcd/pull/16019) - Improve [Skip getting authInfo from incoming context when auth is disabled](https://github.com/etcd-io/etcd/pull/16241) @@ -26,7 +27,7 @@ Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/ - Fix [Reset auth token when failing to authenticate due to auth being disabled](https://github.com/etcd-io/etcd/pull/16241) ### Dependencies -- Compile binaries using [go 1.19.12](https://github.com/etcd-io/etcd/pull/16352). +- Compile binaries using [go 1.20.7](https://github.com/etcd-io/etcd/pull/16401).
diff --git a/CHANGELOG/CHANGELOG-3.6.md b/CHANGELOG/CHANGELOG-3.6.md index 978d38b70352..f77b777d1571 100644 --- a/CHANGELOG/CHANGELOG-3.6.md +++ b/CHANGELOG/CHANGELOG-3.6.md @@ -94,8 +94,8 @@ See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per - Add [`etcd_debugging_server_alarms`](https://github.com/etcd-io/etcd/pull/14276). ### Go -- Require [Go 1.19+](https://github.com/etcd-io/etcd/pull/14463). -- Compile with [Go 1.19+](https://golang.org/doc/devel/release.html#go1.19). Please refer to [gc-guide](https://go.dev/doc/gc-guide) to configure `GOGC` and `GOMEMLIMIT` properly. +- Require [Go 1.20+](https://github.com/etcd-io/etcd/pull/16394). +- Compile with [Go 1.20+](https://golang.org/doc/devel/release.html#go1.20). Please refer to [gc-guide](https://go.dev/doc/gc-guide) to configure `GOGC` and `GOMEMLIMIT` properly. ### Other diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f519ccf852be..ddeb77a46801 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,10 +38,10 @@ Depending on your interest and experience you should check different labels: If any of aforementioned labels don't have unassigned issues, please [contact] one of the [maintainers] asking to triage more issues. [github issue tracker]: https://github.com/etcd-io/etcd/issues -[good first issue]: https://github.com/etcd-io/etcd/labels/good%20first%20issue -[help wanted]: https://github.com/etcd-io/etcd/labels/help%20wanted +[good first issue]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22good+first+issue%22 +[help wanted]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22help+wanted%22 [maintainers]: https://github.com/etcd-io/etcd/blob/main/MAINTAINERS -[priority/important]: https://github.com/etcd-io/etcd/labels/priority%2Fimportant +[priority/important]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22priority%2Fimportant%22 ## Setup development environment diff --git a/Documentation/contributor-guide/dependency_management.md b/Documentation/contributor-guide/dependency_management.md index 223f7548b245..f3185f1d1979 100644 --- a/Documentation/contributor-guide/dependency_management.md +++ b/Documentation/contributor-guide/dependency_management.md @@ -7,7 +7,8 @@ Dependency management - [Bumping order](#bumping-order) - [Steps to bump a dependency](#steps-to-bump-a-dependency) - [Indirect dependencies](#indirect-dependencies) - - [About gRPC](#about-grpc) + - [Known incompatible dependency updates](#known-incompatible-dependency-updates) + - [arduino/setup-protoc](#arduinosetup-protoc) - [Rotation worksheet](#rotation-worksheet) - **[Stable branches](#stable-branches)** @@ -82,14 +83,6 @@ should fix the issue and ensure all modules depend on the same version of the de ### arduino/setup-protoc Please refer to [build(deps): bump arduino/setup-protoc from 1.3.0 to 2.0.0](https://github.com/etcd-io/etcd/pull/16016) -### About gRPC -There is a compatible issue between etcd and gRPC 1.52.0, and there is a pending PR [pull/15131](https://github.com/etcd-io/etcd/pull/15131). - -The plan is to remove the dependency on some grpc-go's experimental API firstly, afterwards try to bump it again. Please get more details in -[issues/15145](https://github.com/etcd-io/etcd/issues/15145). - -`go.opentelemetry.io/otel` version update is indirectly blocked due to this gRPC issue. Please get more details in [pull/15810](https://github.com/etcd-io/etcd/pull/15810). - ## Rotation worksheet The dependabot scheduling interval is weekly; it means dependabot will automatically raise a bunch of PRs per week. Usually human intervention is required each time. We have a [rotation worksheet](https://docs.google.com/spreadsheets/d/1DDWzbcOx1p32MhyelaPZ_SfYtAD6xRsrtGRZ9QXPOyQ/edit#gid=0), diff --git a/Documentation/contributor-guide/release.md b/Documentation/contributor-guide/release.md index 44532a2eddb9..262ce4f8058b 100644 --- a/Documentation/contributor-guide/release.md +++ b/Documentation/contributor-guide/release.md @@ -60,7 +60,7 @@ Binaries are pushed to gcr.io and images are pushed to quay.io and gcr.io. ## Announce to the etcd-dev Googlegroup -- Follow the format of [previous release emails](https://groups.google.com/forum/#!forum/etcd-dev). +- Follow the format of [previous release emails](https://groups.google.com/g/etcd-dev). - Make sure to include a list of authors that contributed since the previous release - something like the following might be handy: ``` diff --git a/Documentation/contributor-guide/roadmap.md b/Documentation/contributor-guide/roadmap.md index ee5ec5580516..92c9d974f1e0 100644 --- a/Documentation/contributor-guide/roadmap.md +++ b/Documentation/contributor-guide/roadmap.md @@ -20,7 +20,7 @@ For a full list of tasks in v3.6.0, please see [milestone etcd-v3.6](https://git | [Support downgrade](https://github.com/etcd-io/etcd/issues/11716) | P0 | etcd will support downgrade starting from 3.6.0. But it will also support offline downgrade from 3.5 to 3.4. | | [StoreV2 deprecation](https://github.com/etcd-io/etcd/issues/12913) | P0 | This task will be covered in both 3.6 and 3.7. | | [Release raft 3.6.0](https://github.com/etcd-io/raft/issues/89) | P0 | etcd 3.6.0 will depends on raft 3.6.0 | -| [Release bbolt 1.3.8](https://github.com/etcd-io/bbolt/issues/542) | P0 | etcd 3.6.0 will depends on bbolt 1.3.8 | +| [Release bbolt 1.4.0](https://github.com/etcd-io/bbolt/issues/553) | P0 | etcd 3.6.0 will depends on bbolt 1.4.0 | | [Support /livez and /readyz endpoints](https://github.com/etcd-io/etcd/issues/16007) | P1 | It provides clearer APIs, and can also workaround the stalled writes issue | | [Bump gRPC](https://github.com/etcd-io/etcd/issues/16290) | P1 | It isn't guaranteed to be resolved in 3.6, and might be postponed to 3.7 depending on the effort and risk. | | [Deprecate grpc-gateway or bump it](https://github.com/etcd-io/etcd/issues/14499) | P1 | It isn't guaranteed to be resolved in 3.6, and might be postponed to 3.7 depending on the effort and risk. | diff --git a/README.md b/README.md index 585844964c64..80296cf40f34 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Now it's time to dig into the full etcd API and other guides. ## Contact -* Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) +* Email: [etcd-dev](https://groups.google.com/g/etcd-dev) * Slack: [#etcd](https://kubernetes.slack.com/messages/C3HD8ARJ5/details/) channel on Kubernetes ([get an invite](http://slack.kubernetes.io/)) * [Community meetings](#community-meetings) @@ -146,11 +146,9 @@ An initial agenda will be posted to the [shared Google docs][shared-meeting-note Meeting recordings are uploaded to official etcd [YouTube channel]. -Get calendar invitation by joining [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) mailing group. +Get calendar invitation by joining [etcd-dev](https://groups.google.com/g/etcd-dev) mailing group. -Join Hangouts Meet: [meet.google.com/umg-nrxn-qvs](https://meet.google.com/umg-nrxn-qvs) - -Join by phone: +1 405-792-0633‬ PIN: ‪299 906‬# +Join CNCF-funded Zoom channel: [zoom.us/my/cncfetcdproject](https://zoom.us/my/cncfetcdproject) [shared-meeting-notes]: https://docs.google.com/document/d/16XEGyPBisZvmmoIHSZzv__LoyOeluC5a4x353CX0SIM/edit [YouTube channel]: https://www.youtube.com/channel/UC7tUWR24I5AR9NMsG-NYBlg diff --git a/contrib/raftexample/raft.go b/contrib/raftexample/raft.go index 14f1aca80821..18b5354dd328 100644 --- a/contrib/raftexample/raft.go +++ b/contrib/raftexample/raft.go @@ -392,10 +392,13 @@ func (rc *raftNode) maybeTriggerSnapshot(applyDoneC <-chan struct{}) { compactIndex = rc.appliedIndex - snapshotCatchUpEntriesN } if err := rc.raftStorage.Compact(compactIndex); err != nil { - panic(err) + if err != raft.ErrCompacted { + panic(err) + } + } else { + log.Printf("compacted log at index %d", compactIndex) } - log.Printf("compacted log at index %d", compactIndex) rc.snapshotIndex = rc.appliedIndex } diff --git a/etcd.conf.yml.sample b/etcd.conf.yml.sample index 9d1648e22d3a..a080c5f3d75f 100644 --- a/etcd.conf.yml.sample +++ b/etcd.conf.yml.sample @@ -145,3 +145,7 @@ cipher-suites: [ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ] + +# Limit etcd to specific TLS protocol versions +tls-min-version: 'TLS1.2' +tls-max-version: 'TLS1.3' diff --git a/etcdctl/README.md b/etcdctl/README.md index efff407cff58..936be3d160f3 100644 --- a/etcdctl/README.md +++ b/etcdctl/README.md @@ -1568,7 +1568,7 @@ CHECK provides commands for checking properties of the etcd cluster. CHECK PERF checks the performance of the etcd cluster for 60 seconds. Running the `check perf` often can create a large keyspace history which can be auto compacted and defragmented using the `--auto-compact` and `--auto-defrag` options as described below. -Notice that different workload models use different configurations in terms of number of clients and throughtput. Here is the configuration for each load: +Notice that different workload models use different configurations in terms of number of clients and throughput. Here is the configuration for each load: | Load | Number of clients | Number of put requests (requests/sec) | diff --git a/etcdutl/go.mod b/etcdutl/go.mod index ec013984f93b..7b1c86b07b8c 100644 --- a/etcdutl/go.mod +++ b/etcdutl/go.mod @@ -38,7 +38,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect @@ -57,10 +57,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect go.etcd.io/etcd/client/v2 v2.306.0-alpha.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/metric v0.34.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.12.0 // indirect golang.org/x/net v0.14.0 // indirect diff --git a/etcdutl/go.sum b/etcdutl/go.sum index 4df8c51dcc65..b6a66591933c 100644 --- a/etcdutl/go.sum +++ b/etcdutl/go.sum @@ -34,8 +34,8 @@ github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byA github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -102,14 +102,14 @@ go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a h1:Znv2XJyAf/fsJsFNt9toO8uyXwwHQ44wxqsvdSxipj4= go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a/go.mod h1:eMshmuwXLWZrjHXN8ZgYrOMQRSbHqi5M84DEZWhG+o4= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 h1:+uFejS4DCfNH6d3xODVIGsdhzgzhh45p9gpbHQMbdZI= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0/go.mod h1:HSmzQvagH8pS2/xrK7ScWsk0vAMtRTGbMFgInXCi8Tc= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/go.mod b/go.mod index 13457de0feb4..79e867cb694f 100644 --- a/go.mod +++ b/go.mod @@ -42,12 +42,12 @@ require ( github.com/VividCortex/ewma v1.2.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect @@ -79,14 +79,14 @@ require ( github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect go.etcd.io/gofail v0.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 // indirect - go.opentelemetry.io/otel/metric v0.34.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/sdk v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.12.0 // indirect diff --git a/go.sum b/go.sum index 1fd8f4ec8376..b2bc2bb53ae9 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -99,8 +99,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -267,27 +267,27 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 h1:+uFejS4DCfNH6d3xODVIGsdhzgzhh45p9gpbHQMbdZI= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0/go.mod h1:HSmzQvagH8pS2/xrK7ScWsk0vAMtRTGbMFgInXCi8Tc= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 h1:fqR1kli93643au1RKo0Uma3d2aPQKT+WBKfTSBaKbOc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2/go.mod h1:5Qn6qvgkMsLDX+sYK64rHb1FPhpn0UtxF+ouX1uhyJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 h1:ERwKPn9Aer7Gxsc0+ZlutlH1bEEAUXAUhqm3Y45ABbk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2/go.mod h1:jWZUM2MWhWCJ9J9xVbRx7tzK1mXKpAlze4CeulycwVY= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/pkg/adt/interval_tree_test.go b/pkg/adt/interval_tree_test.go index 1e1a05a6452e..1e8557078a71 100644 --- a/pkg/adt/interval_tree_test.go +++ b/pkg/adt/interval_tree_test.go @@ -18,7 +18,6 @@ import ( "math/rand" "reflect" "testing" - "time" ) // TestIntervalTreeInsert tests interval tree insertion. @@ -360,7 +359,6 @@ func TestIntervalTreeRandom(t *testing.T) { ivs := make(map[xy]struct{}) ivt := NewIntervalTree() maxv := 128 - rand.Seed(time.Now().UnixNano()) for i := rand.Intn(maxv) + 1; i != 0; i-- { x, y := int64(rand.Intn(maxv)), int64(rand.Intn(maxv)) diff --git a/pkg/expect/expect_test.go b/pkg/expect/expect_test.go index f5029323de0f..f38ec9159857 100644 --- a/pkg/expect/expect_test.go +++ b/pkg/expect/expect_test.go @@ -72,7 +72,7 @@ func TestExpectFuncTimeout(t *testing.T) { } err = ep.Close() - require.ErrorContains(t, err, "unexpected exit code [143] after running [/usr/bin/tail -f /dev/null]") + require.ErrorContains(t, err, "unexpected exit code [143]") require.Equal(t, 143, ep.exitCode) } @@ -89,7 +89,7 @@ func TestExpectFuncExitFailure(t *testing.T) { _, err = ep.ExpectFunc(ctx, func(s string) bool { return strings.Contains(s, "something entirely unexpected") }) - require.ErrorContains(t, err, "unexpected exit code [1] after running [/usr/bin/tail -x]") + require.ErrorContains(t, err, "unexpected exit code [1]") require.Equal(t, 1, ep.exitCode) } @@ -106,7 +106,7 @@ func TestExpectFuncExitFailureStop(t *testing.T) { _, err = ep.ExpectFunc(ctx, func(s string) bool { return strings.Contains(s, "something entirely unexpected") }) - require.ErrorContains(t, err, "unexpected exit code [1] after running [/usr/bin/tail -x]") + require.ErrorContains(t, err, "unexpected exit code [1]") exitCode, err := ep.ExitCode() require.Equal(t, 1, exitCode) require.NoError(t, err) @@ -115,7 +115,7 @@ func TestExpectFuncExitFailureStop(t *testing.T) { t.Fatal(err) } err = ep.Close() - require.ErrorContains(t, err, "unexpected exit code [1] after running [/usr/bin/tail -x]") + require.ErrorContains(t, err, "unexpected exit code [1]") exitCode, err = ep.ExitCode() require.Equal(t, 1, exitCode) require.NoError(t, err) diff --git a/pkg/proxy/server.go b/pkg/proxy/server.go index 72a0c7483d23..96f30bd7d4a2 100644 --- a/pkg/proxy/server.go +++ b/pkg/proxy/server.go @@ -806,7 +806,6 @@ func computeLatency(lat, rv time.Duration) time.Duration { rv = lat / 10 } now := time.Now() - mrand.Seed(int64(now.Nanosecond())) sign := 1 if now.Second()%2 == 0 { sign = -1 diff --git a/pkg/proxy/server_test.go b/pkg/proxy/server_test.go index 6690c619d113..d19c947c6465 100644 --- a/pkg/proxy/server_test.go +++ b/pkg/proxy/server_test.go @@ -628,7 +628,6 @@ func testServerHTTP(t *testing.T, secure, delayTx bool) { func newUnixAddr() string { now := time.Now().UnixNano() - rand.Seed(now) addr := fmt.Sprintf("%X%X.unix-conn", now, rand.Intn(35000)) os.RemoveAll(addr) return addr diff --git a/pkg/stringutil/rand.go b/pkg/stringutil/rand.go index 96d9df311cfb..347ee7c2b468 100644 --- a/pkg/stringutil/rand.go +++ b/pkg/stringutil/rand.go @@ -16,7 +16,6 @@ package stringutil import ( "math/rand" - "time" ) // UniqueStrings returns a slice of randomly generated unique strings. @@ -45,7 +44,6 @@ func RandomStrings(slen uint, n int) (ss []string) { const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" func RandString(l uint) string { - rand.Seed(time.Now().UnixNano()) s := make([]byte, l) for i := 0; i < int(l); i++ { s[i] = chars[rand.Intn(len(chars))] diff --git a/scripts/test.sh b/scripts/test.sh index 211c73b4cf84..c8c6550ffa68 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -103,8 +103,8 @@ function build_pass { function run_unit_tests { local pkgs="${1:-./...}" shift 1 - # shellcheck disable=SC2086 - GOLANG_TEST_SHORT=true go_test "${pkgs}" "parallel" : -short -timeout="${TIMEOUT:-3m}" "${COMMON_TEST_FLAGS[@]}" "${RUN_ARG[@]}" "$@" + # shellcheck disable=SC2068 #For context see - https://github.com/etcd-io/etcd/pull/16433#issuecomment-1684312755 + GOLANG_TEST_SHORT=true go_test "${pkgs}" "parallel" : -short -timeout="${TIMEOUT:-3m}" ${COMMON_TEST_FLAGS[@]:-} ${RUN_ARG[@]:-} "$@" } function unit_pass { @@ -113,27 +113,33 @@ function unit_pass { function integration_extra { if [ -z "${PKG}" ] ; then - run_for_module "tests" go_test "./integration/v2store/..." "keep_going" : -timeout="${TIMEOUT:-5m}" "${RUN_ARG[@]}" "${COMMON_TEST_FLAGS[@]}" "$@" || return $? + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./integration/v2store/..." "keep_going" : -timeout="${TIMEOUT:-5m}" ${COMMON_TEST_FLAGS[@]:-} ${RUN_ARG[@]:-} "$@" || return $? else log_warning "integration_extra ignored when PKG is specified" fi } function integration_pass { - run_for_module "tests" go_test "./integration/..." "parallel" : -timeout="${TIMEOUT:-15m}" "${COMMON_TEST_FLAGS[@]}" "${RUN_ARG[@]}" -p=2 "$@" || return $? - run_for_module "tests" go_test "./common/..." "parallel" : --tags=integration -timeout="${TIMEOUT:-15m}" "${COMMON_TEST_FLAGS[@]}" -p=2 "${RUN_ARG[@]}" "$@" || return $? + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./integration/..." "parallel" : -timeout="${TIMEOUT:-15m}" ${COMMON_TEST_FLAGS[@]:-} ${RUN_ARG[@]:-} -p=2 "$@" || return $? + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./common/..." "parallel" : --tags=integration -timeout="${TIMEOUT:-15m}" ${COMMON_TEST_FLAGS[@]:-} ${RUN_ARG[@]:-} -p=2 "$@" || return $? integration_extra "$@" } function e2e_pass { # e2e tests are running pre-build binary. Settings like --race,-cover,-cpu does not have any impact. - run_for_module "tests" go_test "./e2e/..." "keep_going" : -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@" || return $? - run_for_module "tests" go_test "./common/..." "keep_going" : --tags=e2e -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@" + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./e2e/..." "keep_going" : -timeout="${TIMEOUT:-30m}" ${RUN_ARG[@]:-} "$@" || return $? + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./common/..." "keep_going" : --tags=e2e -timeout="${TIMEOUT:-30m}" ${RUN_ARG[@]:-} "$@" } function robustness_pass { # e2e tests are running pre-build binary. Settings like --race,-cover,-cpu does not have any impact. - run_for_module "tests" go_test "./robustness" "keep_going" : -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@" + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./robustness" "keep_going" : -timeout="${TIMEOUT:-30m}" ${RUN_ARG[@]:-} "$@" } function integration_e2e_pass { @@ -164,13 +170,13 @@ function grpcproxy_pass { } function grpcproxy_integration_pass { - run_for_module "tests" go_test "./integration/..." "fail_fast" : \ - -timeout=30m -tags cluster_proxy "${COMMON_TEST_FLAGS[@]}" "$@" + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./integration/..." "fail_fast" : -timeout=30m -tags cluster_proxy ${COMMON_TEST_FLAGS[@]:-} "$@" } function grpcproxy_e2e_pass { - run_for_module "tests" go_test "./e2e" "fail_fast" : \ - -timeout=30m -tags cluster_proxy "${COMMON_TEST_FLAGS[@]}" "$@" + # shellcheck disable=SC2068 + run_for_module "tests" go_test "./e2e" "fail_fast" : -timeout=30m -tags cluster_proxy ${COMMON_TEST_FLAGS[@]:-} "$@" } ################# COVERAGE ##################################################### diff --git a/security/README.md b/security/README.md index 1bedf550bfd7..ab4078332010 100644 --- a/security/README.md +++ b/security/README.md @@ -1,6 +1,6 @@ ## Security Announcements -Join the [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) group for emails about security and major announcements. +Join the [etcd-dev](https://groups.google.com/g/etcd-dev) group for emails about security and major announcements. ## Report a Vulnerability diff --git a/server/etcdserver/api/membership/membership_test.go b/server/etcdserver/api/membership/membership_test.go index 8e3a96918834..b2ec4b324ae4 100644 --- a/server/etcdserver/api/membership/membership_test.go +++ b/server/etcdserver/api/membership/membership_test.go @@ -21,7 +21,6 @@ import ( "github.com/stretchr/testify/assert" "go.etcd.io/etcd/client/pkg/v3/types" - "go.etcd.io/etcd/server/v3/etcdserver/version" serverversion "go.etcd.io/etcd/server/v3/etcdserver/version" "go.uber.org/zap" @@ -57,7 +56,7 @@ type backendMock struct { members map[types.ID]*Member removed map[types.ID]bool version *semver.Version - downgradeInfo *version.DowngradeInfo + downgradeInfo *serverversion.DowngradeInfo } var _ MembershipBackend = (*backendMock)(nil) @@ -93,7 +92,7 @@ func (b *backendMock) MustDeleteMemberFromBackend(id types.ID) { b.removed[id] = true } -func (b *backendMock) MustSaveDowngradeToBackend(downgradeInfo *version.DowngradeInfo) { +func (b *backendMock) MustSaveDowngradeToBackend(downgradeInfo *serverversion.DowngradeInfo) { b.downgradeInfo = downgradeInfo } -func (b *backendMock) DowngradeInfoFromBackend() *version.DowngradeInfo { return b.downgradeInfo } +func (b *backendMock) DowngradeInfoFromBackend() *serverversion.DowngradeInfo { return b.downgradeInfo } diff --git a/server/etcdserver/apply/apply.go b/server/etcdserver/apply/apply.go index f5180b0c0723..7b6963d791ca 100644 --- a/server/etcdserver/apply/apply.go +++ b/server/etcdserver/apply/apply.go @@ -72,8 +72,8 @@ type applierV3 interface { Apply(ctx context.Context, r *pb.InternalRaftRequest, shouldApplyV3 membership.ShouldApplyV3, applyFunc applyFunc) *Result Put(ctx context.Context, p *pb.PutRequest) (*pb.PutResponse, *traceutil.Trace, error) - Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) - DeleteRange(dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) + Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, *traceutil.Trace, error) + DeleteRange(ctx context.Context, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, *traceutil.Trace, error) Txn(ctx context.Context, rt *pb.TxnRequest) (*pb.TxnResponse, *traceutil.Trace, error) Compaction(compaction *pb.CompactionRequest) (*pb.CompactionResponse, <-chan struct{}, *traceutil.Trace, error) @@ -161,11 +161,11 @@ func (a *applierV3backend) Put(ctx context.Context, p *pb.PutRequest) (resp *pb. return mvcctxn.Put(ctx, a.lg, a.lessor, a.kv, p) } -func (a *applierV3backend) DeleteRange(dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { - return mvcctxn.DeleteRange(a.kv, dr) +func (a *applierV3backend) DeleteRange(ctx context.Context, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, *traceutil.Trace, error) { + return mvcctxn.DeleteRange(ctx, a.lg, a.kv, dr) } -func (a *applierV3backend) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) { +func (a *applierV3backend) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, *traceutil.Trace, error) { return mvcctxn.Range(ctx, a.lg, a.kv, r) } diff --git a/server/etcdserver/apply/apply_auth.go b/server/etcdserver/apply/apply_auth.go index 51cf5ad86858..7321f42249f8 100644 --- a/server/etcdserver/apply/apply_auth.go +++ b/server/etcdserver/apply/apply_auth.go @@ -86,25 +86,25 @@ func (aa *authApplierV3) Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResp return aa.applierV3.Put(ctx, r) } -func (aa *authApplierV3) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) { +func (aa *authApplierV3) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, *traceutil.Trace, error) { if err := aa.as.IsRangePermitted(&aa.authInfo, r.Key, r.RangeEnd); err != nil { - return nil, err + return nil, nil, err } return aa.applierV3.Range(ctx, r) } -func (aa *authApplierV3) DeleteRange(r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { +func (aa *authApplierV3) DeleteRange(ctx context.Context, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, *traceutil.Trace, error) { if err := aa.as.IsDeleteRangePermitted(&aa.authInfo, r.Key, r.RangeEnd); err != nil { - return nil, err + return nil, nil, err } if r.PrevKv { err := aa.as.IsRangePermitted(&aa.authInfo, r.Key, r.RangeEnd) if err != nil { - return nil, err + return nil, nil, err } } - return aa.applierV3.DeleteRange(r) + return aa.applierV3.DeleteRange(ctx, r) } func (aa *authApplierV3) Txn(ctx context.Context, rt *pb.TxnRequest) (*pb.TxnResponse, *traceutil.Trace, error) { diff --git a/server/etcdserver/apply/apply_auth_test.go b/server/etcdserver/apply/apply_auth_test.go index 0e2252f3ab16..644933d72c01 100644 --- a/server/etcdserver/apply/apply_auth_test.go +++ b/server/etcdserver/apply/apply_auth_test.go @@ -532,7 +532,7 @@ func TestAuthApplierV3_Range(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { setAuthInfo(authApplier, tc.userName) - _, err := authApplier.Range(ctx, tc.request) + _, _, err := authApplier.Range(ctx, tc.request) require.Equalf(t, tc.expectError, err, "Range returned unexpected error (or lack thereof), expected: %v, got: %v", tc.expectError, err) }) } @@ -596,7 +596,7 @@ func TestAuthApplierV3_DeleteRange(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { setAuthInfo(authApplier, tc.userName) - _, err := authApplier.DeleteRange(tc.request) + _, _, err := authApplier.DeleteRange(context.Background(), tc.request) require.Equalf(t, tc.expectError, err, "Range returned unexpected error (or lack thereof), expected: %v, got: %v", tc.expectError, err) }) } diff --git a/server/etcdserver/apply/corrupt.go b/server/etcdserver/apply/corrupt.go index e04d28c6f390..73527ebdb842 100644 --- a/server/etcdserver/apply/corrupt.go +++ b/server/etcdserver/apply/corrupt.go @@ -32,12 +32,12 @@ func (a *applierV3Corrupt) Put(_ context.Context, _ *pb.PutRequest) (*pb.PutResp return nil, nil, errors.ErrCorrupt } -func (a *applierV3Corrupt) Range(_ context.Context, _ *pb.RangeRequest) (*pb.RangeResponse, error) { - return nil, errors.ErrCorrupt +func (a *applierV3Corrupt) Range(_ context.Context, _ *pb.RangeRequest) (*pb.RangeResponse, *traceutil.Trace, error) { + return nil, nil, errors.ErrCorrupt } -func (a *applierV3Corrupt) DeleteRange(_ *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { - return nil, errors.ErrCorrupt +func (a *applierV3Corrupt) DeleteRange(_ context.Context, _ *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, *traceutil.Trace, error) { + return nil, nil, errors.ErrCorrupt } func (a *applierV3Corrupt) Txn(_ context.Context, _ *pb.TxnRequest) (*pb.TxnResponse, *traceutil.Trace, error) { diff --git a/server/etcdserver/apply/uber_applier.go b/server/etcdserver/apply/uber_applier.go index 72e591ed7ef9..d3184e6963c6 100644 --- a/server/etcdserver/apply/uber_applier.go +++ b/server/etcdserver/apply/uber_applier.go @@ -153,13 +153,13 @@ func (a *uberApplier) dispatch(ctx context.Context, r *pb.InternalRaftRequest, s switch { case r.Range != nil: op = "Range" - ar.Resp, ar.Err = a.applyV3.Range(ctx, r.Range) + ar.Resp, ar.Trace, ar.Err = a.applyV3.Range(ctx, r.Range) case r.Put != nil: op = "Put" ar.Resp, ar.Trace, ar.Err = a.applyV3.Put(ctx, r.Put) case r.DeleteRange != nil: op = "DeleteRange" - ar.Resp, ar.Err = a.applyV3.DeleteRange(r.DeleteRange) + ar.Resp, ar.Trace, ar.Err = a.applyV3.DeleteRange(ctx, r.DeleteRange) case r.Txn != nil: op = "Txn" ar.Resp, ar.Trace, ar.Err = a.applyV3.Txn(ctx, r.Txn) diff --git a/server/etcdserver/server.go b/server/etcdserver/server.go index d198b22d228b..c73d47769855 100644 --- a/server/etcdserver/server.go +++ b/server/etcdserver/server.go @@ -20,7 +20,6 @@ import ( "expvar" "fmt" "math" - "math/rand" "net/http" "path" "regexp" @@ -120,8 +119,6 @@ var ( ) func init() { - rand.Seed(time.Now().UnixNano()) - expvar.Publish( "file_descriptor_limit", expvar.Func( diff --git a/server/etcdserver/txn/txn.go b/server/etcdserver/txn/txn.go index d694f2ea3358..114a91ca3d11 100644 --- a/server/etcdserver/txn/txn.go +++ b/server/etcdserver/txn/txn.go @@ -93,20 +93,30 @@ func put(ctx context.Context, txnWrite mvcc.TxnWrite, p *pb.PutRequest) (resp *p return resp, nil } -func DeleteRange(kv mvcc.KV, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { - txnWrite := kv.Write(traceutil.TODO()) +func DeleteRange(ctx context.Context, lg *zap.Logger, kv mvcc.KV, dr *pb.DeleteRangeRequest) (resp *pb.DeleteRangeResponse, trace *traceutil.Trace, err error) { + trace = traceutil.Get(ctx) + // create delete tracing if the trace in context is empty + if trace.IsEmpty() { + trace = traceutil.New("delete_range", + lg, + traceutil.Field{Key: "key", Value: string(dr.Key)}, + traceutil.Field{Key: "range_end", Value: string(dr.RangeEnd)}, + ) + ctx = context.WithValue(ctx, traceutil.TraceKey, trace) + } + txnWrite := kv.Write(trace) defer txnWrite.End() - resp, err := deleteRange(txnWrite, dr) - return resp, err + resp, err = deleteRange(ctx, txnWrite, dr) + return resp, trace, err } -func deleteRange(txnWrite mvcc.TxnWrite, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { +func deleteRange(ctx context.Context, txnWrite mvcc.TxnWrite, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { resp := &pb.DeleteRangeResponse{} resp.Header = &pb.ResponseHeader{} end := mkGteRange(dr.RangeEnd) if dr.PrevKv { - rr, err := txnWrite.Range(context.TODO(), dr.Key, end, mvcc.RangeOptions{}) + rr, err := txnWrite.Range(ctx, dr.Key, end, mvcc.RangeOptions{}) if err != nil { return nil, err } @@ -122,15 +132,16 @@ func deleteRange(txnWrite mvcc.TxnWrite, dr *pb.DeleteRangeRequest) (*pb.DeleteR return resp, nil } -func Range(ctx context.Context, lg *zap.Logger, kv mvcc.KV, r *pb.RangeRequest) (*pb.RangeResponse, error) { - trace := traceutil.Get(ctx) +func Range(ctx context.Context, lg *zap.Logger, kv mvcc.KV, r *pb.RangeRequest) (resp *pb.RangeResponse, trace *traceutil.Trace, err error) { + trace = traceutil.Get(ctx) if trace.IsEmpty() { trace = traceutil.New("range", lg) ctx = context.WithValue(ctx, traceutil.TraceKey, trace) } txnRead := kv.Read(mvcc.ConcurrentReadTxMode, trace) defer txnRead.End() - return executeRange(ctx, lg, txnRead, r) + resp, err = executeRange(ctx, lg, txnRead, r) + return resp, trace, err } func executeRange(ctx context.Context, lg *zap.Logger, txnRead mvcc.TxnRead, r *pb.RangeRequest) (*pb.RangeResponse, error) { @@ -384,7 +395,7 @@ func executeTxn(ctx context.Context, lg *zap.Logger, txnWrite mvcc.TxnWrite, rt respi.(*pb.ResponseOp_ResponsePut).ResponsePut = resp trace.StopSubTrace() case *pb.RequestOp_RequestDeleteRange: - resp, err := deleteRange(txnWrite, tv.RequestDeleteRange) + resp, err := deleteRange(ctx, txnWrite, tv.RequestDeleteRange) if err != nil { return 0, fmt.Errorf("applyTxn: failed DeleteRange: %w", err) } diff --git a/server/etcdserver/v3_server.go b/server/etcdserver/v3_server.go index c25108aaaf8e..a71a633fa3d8 100644 --- a/server/etcdserver/v3_server.go +++ b/server/etcdserver/v3_server.go @@ -131,7 +131,7 @@ func (s *EtcdServer) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeRe return s.authStore.IsRangePermitted(ai, r.Key, r.RangeEnd) } - get := func() { resp, err = txn.Range(ctx, s.Logger(), s.KV(), r) } + get := func() { resp, _, err = txn.Range(ctx, s.Logger(), s.KV(), r) } if serr := s.doSerialize(ctx, chk, get); serr != nil { err = serr return nil, err diff --git a/server/go.mod b/server/go.mod index 4c59fc51291f..487ab8dfcb5b 100644 --- a/server/go.mod +++ b/server/go.mod @@ -29,10 +29,10 @@ require ( go.etcd.io/etcd/client/v3 v3.6.0-alpha.0 go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0 go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 - go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 - go.opentelemetry.io/otel/sdk v1.14.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 + go.opentelemetry.io/otel v1.16.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 + go.opentelemetry.io/otel/sdk v1.16.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.25.0 golang.org/x/crypto v0.12.0 @@ -48,10 +48,10 @@ require ( require ( github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect @@ -62,10 +62,10 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect - go.opentelemetry.io/otel/metric v0.34.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect diff --git a/server/go.sum b/server/go.sum index 570f93981e7f..2ecf651c3c20 100644 --- a/server/go.sum +++ b/server/go.sum @@ -42,8 +42,8 @@ github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -91,8 +91,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -244,27 +244,27 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 h1:+uFejS4DCfNH6d3xODVIGsdhzgzhh45p9gpbHQMbdZI= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0/go.mod h1:HSmzQvagH8pS2/xrK7ScWsk0vAMtRTGbMFgInXCi8Tc= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 h1:fqR1kli93643au1RKo0Uma3d2aPQKT+WBKfTSBaKbOc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2/go.mod h1:5Qn6qvgkMsLDX+sYK64rHb1FPhpn0UtxF+ouX1uhyJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 h1:ERwKPn9Aer7Gxsc0+ZlutlH1bEEAUXAUhqm3Y45ABbk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2/go.mod h1:jWZUM2MWhWCJ9J9xVbRx7tzK1mXKpAlze4CeulycwVY= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/server/lease/lessor_bench_test.go b/server/lease/lessor_bench_test.go index 71e970e5f25d..73cdbede30d4 100644 --- a/server/lease/lessor_bench_test.go +++ b/server/lease/lessor_bench_test.go @@ -37,10 +37,6 @@ func BenchmarkLessorRenew100000(b *testing.B) { benchmarkLessorRenew(100000, b) func BenchmarkLessorFindExpired10000(b *testing.B) { benchmarkLessorFindExpired(10000, b) } func BenchmarkLessorFindExpired100000(b *testing.B) { benchmarkLessorFindExpired(100000, b) } -func init() { - rand.Seed(time.Now().UTC().UnixNano()) -} - const ( // minTTL keep lease will not auto expire in benchmark minTTL = 1000 diff --git a/tests/e2e/cmux_test.go b/tests/e2e/cmux_test.go index 4f97c2bf224e..89844093c788 100644 --- a/tests/e2e/cmux_test.go +++ b/tests/e2e/cmux_test.go @@ -21,6 +21,8 @@ import ( "context" "encoding/json" "fmt" + "os" + "path/filepath" "strings" "testing" @@ -126,7 +128,7 @@ func testConnectionMultiplexing(t *testing.T, ctx context.Context, member e2e.Et } t.Run(tname, func(t *testing.T) { assert.NoError(t, fetchGrpcGateway(httpEndpoint, httpVersion, connType)) - assert.NoError(t, fetchMetrics(httpEndpoint, httpVersion, connType)) + assert.NoError(t, fetchMetrics(t, httpEndpoint, httpVersion, connType)) assert.NoError(t, fetchVersion(httpEndpoint, httpVersion, connType)) assert.NoError(t, fetchHealth(httpEndpoint, httpVersion, connType)) assert.NoError(t, fetchDebugVars(httpEndpoint, httpVersion, connType)) @@ -168,12 +170,21 @@ func validateGrpcgatewayRangeReponse(respData []byte) error { return json.Unmarshal(respData, &resp) } -func fetchMetrics(endpoint string, httpVersion string, connType e2e.ClientConnType) error { - req := e2e.CURLReq{Endpoint: "/metrics", Timeout: 5, HttpVersion: httpVersion} - respData, err := curl(endpoint, "GET", req, connType) - if err != nil { +func fetchMetrics(t *testing.T, endpoint string, httpVersion string, connType e2e.ClientConnType) error { + tmpDir := t.TempDir() + metricFile := filepath.Join(tmpDir, "metrics") + + req := e2e.CURLReq{Endpoint: "/metrics", Timeout: 5, HttpVersion: httpVersion, OutputFile: metricFile} + if _, err := curl(endpoint, "GET", req, connType); err != nil { return err } + + rawData, err := os.ReadFile(metricFile) + if err != nil { + return fmt.Errorf("failed to read the metric: %w", err) + } + respData := string(rawData) + var parser expfmt.TextParser _, err = parser.TextToMetricFamilies(strings.NewReader(strings.ReplaceAll(respData, "\r\n", "\n"))) return err diff --git a/tests/e2e/ctl_v3_auth_no_proxy_test.go b/tests/e2e/ctl_v3_auth_no_proxy_test.go index 719e74b05647..840307ec3b64 100644 --- a/tests/e2e/ctl_v3_auth_no_proxy_test.go +++ b/tests/e2e/ctl_v3_auth_no_proxy_test.go @@ -136,7 +136,7 @@ func TestCtlV3AuthCertCNWithWithConcurrentOperation(t *testing.T) { t.Fatalf("Unexpected error: %v", err) case <-donec: t.Log("All done!") - case <-time.After(30 * time.Second): - t.Fatal("Test case timeout after 20 seconds") + case <-time.After(40 * time.Second): + t.Fatal("Test case timeout after 40 seconds") } } diff --git a/tests/e2e/v2store_deprecation_test.go b/tests/e2e/v2store_deprecation_test.go index 432a61b2a841..bf94c58ba14e 100644 --- a/tests/e2e/v2store_deprecation_test.go +++ b/tests/e2e/v2store_deprecation_test.go @@ -18,15 +18,19 @@ import ( "bytes" "context" "fmt" + "reflect" "sort" "strings" "testing" + "github.com/coreos/go-semver/semver" "github.com/stretchr/testify/assert" + "go.uber.org/zap" "go.uber.org/zap/zaptest" "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/server/v3/etcdserver" + "go.etcd.io/etcd/server/v3/etcdserver/api/membership" "go.etcd.io/etcd/server/v3/etcdserver/api/snap" "go.etcd.io/etcd/server/v3/etcdserver/api/v2store" "go.etcd.io/etcd/tests/v3/framework/config" @@ -125,15 +129,12 @@ func TestV2DeprecationSnapshotMatches(t *testing.T) { assert.NoError(t, epc.Close()) assertSnapshotsMatch(t, oldMemberDataDir, newMemberDataDir, func(data []byte) []byte { - // Patch cluster version - data = bytes.Replace(data, []byte("3.5.0"), []byte("X.X.X"), -1) - data = bytes.Replace(data, []byte("3.6.0"), []byte("X.X.X"), -1) // Patch members ids for i, mid := range members1 { - data = bytes.Replace(data, []byte(fmt.Sprintf("%x", mid)), []byte(fmt.Sprintf("member%d", i+1)), -1) + data = bytes.Replace(data, []byte(fmt.Sprintf("%x", mid)), []byte(fmt.Sprintf("%d", i+1)), -1) } for i, mid := range members2 { - data = bytes.Replace(data, []byte(fmt.Sprintf("%x", mid)), []byte(fmt.Sprintf("member%d", i+1)), -1) + data = bytes.Replace(data, []byte(fmt.Sprintf("%x", mid)), []byte(fmt.Sprintf("%d", i+1)), -1) } return data }) @@ -250,7 +251,23 @@ func assertSnapshotsMatch(t testing.TB, firstDataDir, secondDataDir string, patc if err != nil { t.Fatal(err) } - assert.Equal(t, openSnap(patch(firstSnapshot.Data)), openSnap(patch(secondSnapshot.Data))) + assertMembershipEqual(t, openSnap(patch(firstSnapshot.Data)), openSnap(patch(secondSnapshot.Data))) + } +} + +func assertMembershipEqual(t testing.TB, firstStore v2store.Store, secondStore v2store.Store) { + rc1 := membership.NewCluster(zaptest.NewLogger(t)) + rc1.SetStore(firstStore) + rc1.Recover(func(lg *zap.Logger, v *semver.Version) { return }) + + rc2 := membership.NewCluster(zaptest.NewLogger(t)) + rc2.SetStore(secondStore) + rc2.Recover(func(lg *zap.Logger, v *semver.Version) { return }) + + //membership should match + if g := rc1.Members(); !reflect.DeepEqual(g, rc2.Members()) { + t.Logf("memberids_from_last_version = %+v, member_ids_from_current_version = %+v", rc1.MemberIDs(), rc2.MemberIDs()) + t.Errorf("members_from_last_version_snapshot = %+v, members_from_current_version_snapshot %+v", rc1.Members(), rc2.Members()) } } diff --git a/tests/framework/e2e/curl.go b/tests/framework/e2e/curl.go index 88a37db151af..de2e0e82bfb1 100644 --- a/tests/framework/e2e/curl.go +++ b/tests/framework/e2e/curl.go @@ -37,6 +37,8 @@ type CURLReq struct { Ciphers string HttpVersion string + + OutputFile string } func (r CURLReq) timeoutDuration() time.Duration { @@ -93,6 +95,10 @@ func CURLPrefixArgs(clientURL string, cfg ClientConfig, CN bool, method string, cmdArgs = append(cmdArgs, "--ciphers", req.Ciphers) } + if req.OutputFile != "" { + cmdArgs = append(cmdArgs, "--output", req.OutputFile) + } + switch method { case "POST", "PUT": dt := req.Value diff --git a/tests/go.mod b/tests/go.mod index e8ec069eb744..afbba0b042cd 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -34,10 +34,10 @@ require ( go.etcd.io/etcd/server/v3 v3.6.0-alpha.0 go.etcd.io/gofail v0.1.0 go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 - go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/sdk v1.14.0 - go.opentelemetry.io/otel/trace v1.14.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 + go.opentelemetry.io/otel v1.16.0 + go.opentelemetry.io/otel/sdk v1.16.0 + go.opentelemetry.io/otel/trace v1.16.0 go.opentelemetry.io/proto/otlp v0.19.0 go.uber.org/zap v1.25.0 golang.org/x/crypto v0.12.0 @@ -51,7 +51,7 @@ require ( github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cheggaaa/pb/v3 v3.1.4 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect @@ -59,7 +59,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect @@ -85,10 +85,10 @@ require ( github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect go.etcd.io/bbolt v1.3.7 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 // indirect - go.opentelemetry.io/otel/metric v0.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.14.0 // indirect golang.org/x/sys v0.11.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index 5f99fac28a18..e2342ac068b5 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -48,8 +48,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -103,8 +103,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -271,27 +271,27 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 h1:+uFejS4DCfNH6d3xODVIGsdhzgzhh45p9gpbHQMbdZI= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0/go.mod h1:HSmzQvagH8pS2/xrK7ScWsk0vAMtRTGbMFgInXCi8Tc= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2 h1:fqR1kli93643au1RKo0Uma3d2aPQKT+WBKfTSBaKbOc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.2/go.mod h1:5Qn6qvgkMsLDX+sYK64rHb1FPhpn0UtxF+ouX1uhyJE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2 h1:ERwKPn9Aer7Gxsc0+ZlutlH1bEEAUXAUhqm3Y45ABbk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.2/go.mod h1:jWZUM2MWhWCJ9J9xVbRx7tzK1mXKpAlze4CeulycwVY= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/tests/integration/clientv3/snapshot/v3_snapshot_test.go b/tests/integration/clientv3/snapshot/v3_snapshot_test.go index 01115d04ba0e..5f4fb2adc8d7 100644 --- a/tests/integration/clientv3/snapshot/v3_snapshot_test.go +++ b/tests/integration/clientv3/snapshot/v3_snapshot_test.go @@ -130,7 +130,6 @@ func createSnapshotFile(t *testing.T, cfg *embed.Config, kvs []kv) (version stri func newEmbedURLs(n int) (urls []url.URL) { urls = make([]url.URL, n) for i := 0; i < n; i++ { - rand.Seed(int64(time.Now().Nanosecond())) u, _ := url.Parse(fmt.Sprintf("unix://localhost:%d", rand.Intn(45000))) urls[i] = *u } diff --git a/tests/robustness/linearizability_test.go b/tests/robustness/linearizability_test.go index a6bf66a2616a..30bf8d8abb78 100644 --- a/tests/robustness/linearizability_test.go +++ b/tests/robustness/linearizability_test.go @@ -78,7 +78,7 @@ func TestRobustness(t *testing.T) { clusterOfSize1Options := baseOptions clusterOfSize1Options = append(clusterOfSize1Options, e2e.WithClusterSize(1)) // Add LazyFS only for traffic with lower QPS as it uses a lot of CPU lowering minimal QPS. - if enableLazyFS && tp.Profile.MinimalQPS <= 80 { + if enableLazyFS && tp.Profile.MinimalQPS <= 100 { clusterOfSize1Options = append(clusterOfSize1Options, e2e.WithLazyFSEnabled(true)) name = filepath.Join(name, "LazyFS") } diff --git a/tests/robustness/traffic/traffic.go b/tests/robustness/traffic/traffic.go index 7aa51734f5a7..5e4a4b89d1a0 100644 --- a/tests/robustness/traffic/traffic.go +++ b/tests/robustness/traffic/traffic.go @@ -37,7 +37,7 @@ var ( LowTraffic = Profile{ Name: "LowTraffic", - MinimalQPS: 80, + MinimalQPS: 100, MaximalQPS: 200, ClientCount: 8, MaxNonUniqueRequestConcurrency: 3,