Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: etcd-io/etcd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.5.13
Choose a base ref
...
head repository: etcd-io/etcd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.5.14
Choose a head ref

Commits on Apr 1, 2024

  1. Fix retry requests when receiving ErrGPRCNotSupportedForLearner

    Signed-off-by: Ilya Baev <ilya.baev@gcore.com>
    ptabor authored and sheyt0 committed Apr 1, 2024
    Copy the full SHA
    0c2f208 View commit details
  2. build(deps): bump distroless/static-debian11 from 7e5c6a2 to 046b92c

    Bumps distroless/static-debian11 from `7e5c6a2` to `046b92c`.
    
    ---
    updated-dependencies:
    - dependency-name: distroless/static-debian11
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Apr 1, 2024
    Copy the full SHA
    d1eb35d View commit details
  3. Merge pull request #17689 from etcd-io/dependabot/docker/release-3.5/…

    …distroless/static-debian11-046b92c933032a8ca99a66f4c79a68ac029d9a4ababd1a806a82140b3b899fd3
    
    build(deps): bump distroless/static-debian11 from `7e5c6a2` to `046b92c`
    jmhbnz authored Apr 1, 2024
    Copy the full SHA
    cbd0aed View commit details

Commits on Apr 2, 2024

  1. Backport update for release script to use ssh.

    Signed-off-by: James Blair <mail@jamesblair.net>
    jmhbnz committed Apr 2, 2024
    Copy the full SHA
    107412f View commit details
  2. Backport rename of release script to release.sh.

    Signed-off-by: James Blair <mail@jamesblair.net>
    jmhbnz committed Apr 2, 2024
    Copy the full SHA
    1868848 View commit details
  3. Backport updates to shellcheck ignores for release.sh script.

    Signed-off-by: James Blair <mail@jamesblair.net>
    jmhbnz committed Apr 2, 2024
    Copy the full SHA
    953a023 View commit details

Commits on Apr 3, 2024

  1. Backport initialization of mu in NewCtxClient to release-3.5

    Tested against the demo code provided in PR #17001
    
    References:
    - #17001
    - #17018
    
    Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
    henrybear327 committed Apr 3, 2024
    Copy the full SHA
    61a85b7 View commit details

Commits on Apr 4, 2024

  1. Merge pull request #17699 from henrybear327/backport-3.5/add-initiali…

    …zation-for–epMu-in-contetx-client
    
    Backport initialization of mu in NewCtxClient to release-3.5
    ahrtr authored Apr 4, 2024
    Copy the full SHA
    130cfe9 View commit details
  2. Merge pull request #17641 from sheyt0/v3.5.13

    [3.5] backport for fix retry requests when receiving ErrGPRCNotSupportedForLearner
    ahrtr authored Apr 4, 2024
    Copy the full SHA
    f5092bc View commit details
  3. Bump go-version to 1.21.9 for release-3.5 due to CVE-2023-45288

    Reference:
    - PR #17703
    
    Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
    henrybear327 committed Apr 4, 2024
    Copy the full SHA
    5776e21 View commit details
  4. Bump golang.org/x/net to v0.23.0

    Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
    henrybear327 committed Apr 4, 2024
    Copy the full SHA
    600b6bf View commit details
  5. Merge pull request #17708 from henrybear327/cve/3.5-bump-go-1.21.9

    Bump go-version to 1.21.9 for release-3.5 due to CVE-2023-45288
    ahrtr authored Apr 4, 2024
    Copy the full SHA
    01851da View commit details
  6. .github: enable failpoints for integration tests

    And introduce helper to toggle failpoints by makefile.
    
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 4, 2024
    Copy the full SHA
    b78b214 View commit details
  7. *: LeaseTimeToLive returns error if leader changed

    The old leader demotes lessor and all the leases' expire time will be
    updated. Instead of returning incorrect remaining TTL, we should return
    errors to force client retry.
    
    Cherry-pick: d3bb6f6
    
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 4, 2024
    Copy the full SHA
    94a1d0c View commit details
  8. [3.5]Add trivy scan as a job in release workflow

    Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
    ArkaSaha30 committed Apr 4, 2024
    Copy the full SHA
    1404f5a View commit details

Commits on Apr 5, 2024

  1. Merge pull request #17704 from fuweid/35-cp-17462

    [3.5] *: LeaseTimeToLive returns error if leader changed
    ahrtr authored Apr 5, 2024
    Copy the full SHA
    86d9874 View commit details

Commits on Apr 6, 2024

  1. Merge pull request #17716 from ArkaSaha30/trivy-scan-head-3.5

    [3.5]Add trivy scan for current branch HEAD
    ahrtr authored Apr 6, 2024
    Copy the full SHA
    7f18f30 View commit details
  2. Add approvals gh workflows.

    Signed-off-by: Lan Liang <gcslyp@gmail.com>
    liangyuanpeng committed Apr 6, 2024
    Copy the full SHA
    b6df59c View commit details
  3. feat: observe wal write at one time

    Signed-off-by: Qiuyu Wu <qiuyu.wu@shopee.com>
    Qiuyu Wu committed Apr 6, 2024
    Copy the full SHA
    51f3134 View commit details

Commits on Apr 7, 2024

  1. Merge pull request #17619 from liangyuanpeng/approve_ghaction_3.5

    [3.5] Add approvals gh workflows.
    serathius authored Apr 7, 2024
    Copy the full SHA
    4ffa5c5 View commit details

Commits on Apr 8, 2024

  1. Merge pull request #17616 from Akiqqqqqqq/feature-wal-write-metrics

    [3.5] feat: add wal write system call metrics observation
    ahrtr authored Apr 8, 2024
    Copy the full SHA
    b671991 View commit details
  2. Merge pull request #17732 from jmhbnz/fix-release-script

    [3.5] Backport release script fixes
    ahrtr authored Apr 8, 2024
    Copy the full SHA
    10e469e View commit details
  3. test: add mix version e2e test.

    Signed-off-by: Siyuan Zhang <sizhang@google.com>
    siyuanfoundation committed Apr 8, 2024
    Copy the full SHA
    c06ec72 View commit details

Commits on Apr 10, 2024

  1. Merge pull request #17531 from siyuanfoundation/3.5-downgrade-test

    [3.5] backport mix version e2e test.
    serathius authored Apr 10, 2024
    Copy the full SHA
    dad2bab View commit details

Commits on Apr 16, 2024

  1. add experimental-snapshot-catchup-entries flag.

    Signed-off-by: Siyuan Zhang <sizhang@google.com>
    siyuanfoundation committed Apr 16, 2024
    Copy the full SHA
    464df4a View commit details

Commits on Apr 17, 2024

  1. [backport-3.5] server: ignore raft messages if member id mismatch #17078

    
    
    Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
    henrybear327 committed Apr 17, 2024
    Copy the full SHA
    9331ee3 View commit details

Commits on Apr 18, 2024

  1. Merge pull request #17813 from henrybear327/backport-3.5/ignore-raft-…

    …messages-if-member-id-mismatch
    
    [backport-3.5] server: ignore raft messages if member id mismatch
    ahrtr authored Apr 18, 2024
    Copy the full SHA
    692c2d2 View commit details
  2. test: add checking snapshot be sent in mix_version_test.

    Signed-off-by: Siyuan Zhang <sizhang@google.com>
    siyuanfoundation committed Apr 18, 2024
    Copy the full SHA
    c391d69 View commit details

Commits on Apr 19, 2024

  1. Merge pull request #17808 from siyuanfoundation/3.5-downgrade-test

    [3.5] add experimental-snapshot-catchup-entries flag
    serathius authored Apr 19, 2024
    Copy the full SHA
    91e9dd3 View commit details

Commits on Apr 21, 2024

  1. Update the compaction log when bootstrap and update compact's signature

    Actually the compact() never return an error, so remove the second return
    parameter.
    
    Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
    ahrtr committed Apr 21, 2024
    Copy the full SHA
    adf1c3f View commit details

Commits on Apr 23, 2024

  1. Merge pull request #17830 from ahrtr/3.5_update_compact_log_bootstrap…

    …_20240421
    
    [3.5] Update the compaction log when bootstrap and update compact's signature
    ahrtr authored Apr 23, 2024
    Copy the full SHA
    6dce9b2 View commit details

Commits on Apr 24, 2024

  1. server/mvcc: introduce compactBeforeSetFinishedCompact failpoint

    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 24, 2024
    Copy the full SHA
    6b03446 View commit details
  2. tests/e2e: reproduce #17780

    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    (cherry picked from commit 7173391)
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 24, 2024
    Copy the full SHA
    7beff57 View commit details
  3. server/storage: update currentRev if scheduledCompact > currentRev

    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    (cherry picked from commit 9ea2349)
    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 24, 2024
    Copy the full SHA
    c06b17b View commit details
  4. server/mvcc: should update currentRev in revMu

    Signed-off-by: Wei Fu <fuweid89@gmail.com>
    fuweid committed Apr 24, 2024
    Copy the full SHA
    0af22ab View commit details
  5. Merge pull request #17865 from fuweid/backport-17815-35

    [3.5] fix revision loss issue caused by compaction - 17780
    ahrtr authored Apr 24, 2024
    Copy the full SHA
    a7a8fb8 View commit details

Commits on Apr 29, 2024

  1. e2e: add mix version test of adding last ver to current ver.

    Signed-off-by: Siyuan Zhang <sizhang@google.com>
    siyuanfoundation committed Apr 29, 2024
    Copy the full SHA
    daec41c View commit details

Commits on Apr 30, 2024

  1. Merge pull request #17888 from siyuanfoundation/3.5-downgrade-test

    [3.5] add mix version test of adding last ver to current ver.
    serathius authored Apr 30, 2024
    Copy the full SHA
    31a87cf View commit details
  2. gRPC health server sets serving status to NOT_SERVING on defrag

    gRPC health server sets serving status to NOT_SERVING on defrag
    Backport from 3.6 in #16278
    
    Co-authored-by: Chao Chen <chaochn@amazon.com>
    Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
    tjungblu and chaochn47 committed Apr 30, 2024
    Copy the full SHA
    750bc0b View commit details

Commits on May 1, 2024

  1. build(deps): bump distroless/static-debian11 from 046b92c to 6d31326

    Bumps distroless/static-debian11 from `046b92c` to `6d31326`.
    
    ---
    updated-dependencies:
    - dependency-name: distroless/static-debian11
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored May 1, 2024
    Copy the full SHA
    22ca615 View commit details

Commits on May 2, 2024

  1. Merge pull request #17920 from etcd-io/dependabot/docker/release-3.5/…

    …distroless/static-debian11-6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c
    
    build(deps): bump distroless/static-debian11 from `046b92c` to `6d31326`
    jmhbnz authored May 2, 2024
    Copy the full SHA
    2c7f6d6 View commit details

Commits on May 6, 2024

  1. v3rpc: run health notifier to listen on online defrag state change

    Backport from 3.6 in #16836
    
    Co-authored-by: Chao Chen <chaochn@amazon.com>
    Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
    tjungblu and chaochn47 committed May 6, 2024
    Copy the full SHA
    cee181d View commit details
  2. Bump bbolt to 1.3.10 for 3.5

    Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
    tjungblu committed May 6, 2024
    Copy the full SHA
    a5eec4d View commit details
  3. Merge pull request #17943 from tjungblu/bboltbump_1.3.10

    Bump bbolt to 1.3.10 for 3.5
    ahrtr authored May 6, 2024
    Copy the full SHA
    a5cf841 View commit details
  4. Add cluster downgrade test.

    Signed-off-by: Siyuan Zhang <sizhang@google.com>
    siyuanfoundation committed May 6, 2024
    Copy the full SHA
    99a6434 View commit details
  5. Merge pull request #17931 from siyuanfoundation/3.5-downgrade-test

    [3.5] Backport cluster downgrade test.
    ahrtr authored May 6, 2024
    Copy the full SHA
    f2cbef2 View commit details

Commits on May 7, 2024

  1. Merge pull request #17914 from tjungblu/backport_35_grpc_defragserv

    [3.5] gRPC health server sets serving status to NOT_SERVING on defrag
    serathius authored May 7, 2024
    Copy the full SHA
    0f0af63 View commit details

Commits on May 10, 2024

  1. server: Implement WithMmapSize option for backend config

    Accept a third argument for NewDefaultBackend for overrides to the
    BackendConfig.
    Add a new function, WithMmapSize, which modifies the backend config to
    provide a custom InitiamMmapSize.
    
    Backports commit: d69adf4 / PR: #17277
    
    Signed-off-by: Ivan Valdes <ivan@vald.es>
    ivanvc committed May 10, 2024
    Copy the full SHA
    6abc349 View commit details
  2. etcdutl: Fix snapshot restore memory alloc issue

    When running the snapshot command, allow receiving an initial memory map
    allocation for the database, avoiding future memory allocation issues.
    
    Backports commit: be28833 / PR: #17277
    
    Co-authored-by: Fatih USTA <fatihusta86@gmail.com>
    Signed-off-by: Ivan Valdes <ivan@vald.es>
    ivanvc and fatihusta committed May 10, 2024
    Copy the full SHA
    9e1dadd View commit details
  3. Merge pull request #17977 from ivanvc/release-3.5-backport-etcdutl-me…

    …mory-allocation-issue
    
    [3.5] backport etcdutl memory allocation issue
    serathius authored May 10, 2024
    Copy the full SHA
    8f6d2dc View commit details
Showing with 2,349 additions and 737 deletions.
  1. +40 −0 .github/workflows/gh-workflow-approve.yaml
  2. +40 −2 .github/workflows/release.yaml
  3. +32 −0 .github/workflows/static-analysis.yaml
  4. +6 −3 .github/workflows/tests-template.yaml
  5. +0 −37 .github/workflows/trivy-nightly-scan.yaml
  6. +1 −1 .go-version
  7. +1 −1 Dockerfile-release.amd64
  8. +1 −1 Dockerfile-release.arm64
  9. +1 −1 Dockerfile-release.ppc64le
  10. +1 −1 Dockerfile-release.s390x
  11. +24 −1 Makefile
  12. +2 −0 api/go.mod
  13. +1 −1 api/version/version.go
  14. +1 −1 build.sh
  15. +2 −0 client/pkg/go.mod
  16. +4 −2 client/v2/go.mod
  17. +1 −1 client/v3/client.go
  18. +4 −2 client/v3/go.mod
  19. +16 −4 client/v3/retry_interceptor.go
  20. +6 −0 etcd.conf.yml.sample
  21. +3 −1 etcdctl/ctlv3/command/snapshot_command.go
  22. +11 −9 etcdctl/go.mod
  23. +2 −2 etcdctl/go.sum
  24. +6 −1 etcdutl/etcdutl/snapshot_command.go
  25. +10 −8 etcdutl/go.mod
  26. +2 −2 etcdutl/go.sum
  27. +11 −4 etcdutl/snapshot/v3_snapshot.go
  28. +16 −14 go.mod
  29. +10 −8 go.sum
  30. +3 −1 pkg/go.mod
  31. +3 −1 raft/go.mod
  32. +4 −364 scripts/release
  33. +372 −0 scripts/release.sh
  34. +14 −0 scripts/sync_go_toolchain_directive.sh
  35. +24 −0 scripts/test_lib.sh
  36. +53 −0 scripts/verify_go_versions.sh
  37. +3 −0 server/config/config.go
  38. +16 −8 server/embed/config.go
  39. +8 −2 server/embed/config_test.go
  40. +1 −0 server/embed/etcd.go
  41. +2 −0 server/etcdmain/config.go
  42. +4 −1 server/etcdmain/config_test.go
  43. +2 −0 server/etcdmain/help.go
  44. +1 −1 server/etcdserver/api/v3client/v3client.go
  45. +2 −5 server/etcdserver/api/v3rpc/grpc.go
  46. +77 −0 server/etcdserver/api/v3rpc/health.go
  47. +6 −2 server/etcdserver/api/v3rpc/maintenance.go
  48. +8 −0 server/etcdserver/server.go
  49. +64 −3 server/etcdserver/server_test.go
  50. +12 −0 server/etcdserver/v3_server.go
  51. +9 −7 server/go.mod
  52. +2 −2 server/go.sum
  53. +11 −0 server/lease/leasehttp/http.go
  54. +7 −0 server/lease/lessor.go
  55. +16 −4 server/mvcc/backend/backend.go
  56. +26 −12 server/mvcc/kvstore.go
  57. +1 −0 server/mvcc/kvstore_compaction.go
  58. +25 −14 server/wal/encoder.go
  59. +9 −0 server/wal/metrics.go
  60. +4 −0 test.sh
  61. +299 −0 tests/e2e/cluster_downgrade_test.go
  62. +2 −16 tests/e2e/ctl_v3_grpc_test.go
  63. +2 −4 tests/e2e/ctl_v3_test.go
  64. +208 −0 tests/e2e/etcd_mix_versions_test.go
  65. +4 −4 tests/e2e/etcd_release_upgrade_test.go
  66. +159 −0 tests/e2e/failover_test.go
  67. +115 −0 tests/e2e/reproduce_17780_test.go
  68. +3 −2 tests/e2e/v3_curl_test.go
  69. +271 −158 tests/framework/e2e/cluster.go
  70. +28 −0 tests/framework/e2e/config.go
  71. +5 −6 tests/framework/e2e/curl.go
  72. +35 −0 tests/framework/e2e/etcd_process.go
  73. +41 −0 tests/framework/e2e/etcdctl.go
  74. +1 −0 tests/framework/e2e/flags.go
  75. +13 −10 tests/go.mod
  76. +4 −2 tests/go.sum
  77. +76 −0 tests/integration/v3_lease_test.go
  78. +37 −0 tests/testutils/execute.go
  79. +2 −0 tools/mod/go.mod
40 changes: 40 additions & 0 deletions .github/workflows/gh-workflow-approve.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Approve GitHub Workflows

on:
pull_request_target:
types:
- labeled
- synchronize

jobs:
approve:
name: Approve ok-to-test
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Update PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: ${{ secrets.ACTIONS_RUNNER_DEBUG == 'true' }}
script: |
const result = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
event: "pull_request",
status: "action_required",
head_sha: context.payload.pull_request.head.sha,
per_page: 100
});
for (var run of result.data.workflow_runs) {
await github.rest.actions.approveWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: run.id
});
}
42 changes: 40 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v2
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: release
@@ -30,3 +30,41 @@ jobs:
- name: test-image
run: |
VERSION=3.5.99 ./scripts/test_images.sh
- name: save-image
run: |
docker image save -o /tmp/etcd-img.tar gcr.io/etcd-development/etcd
- name: upload-image
uses: actions/upload-artifact@v3
with:
name: etcd-img
path: /tmp/etcd-img.tar
retention-days: 1
trivy-scan:
needs: main
strategy:
fail-fast: false
matrix:
platforms: [amd64, arm64, ppc64le, s390x]
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
steps:
- name: get-image
uses: actions/download-artifact@v3
with:
name: etcd-img
path: /tmp
- name: load-image
run: |
docker load < /tmp/etcd-img.tar
- name: trivy-scan
uses: aquasecurity/trivy-action@d710430a6722f083d3b36b8339ff66b32f22ee55 # v0.19.0
with:
image-ref: 'gcr.io/etcd-development/etcd:v3.5.99-${{ matrix.platforms }}'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results-${{ matrix.platforms }}.sarif'
- name: upload scan results
uses: github/codeql-action/upload-sarif@956f09c2ef1926b580554b9014cfb8a51abf89dd # v2.16.6
with:
sarif_file: 'trivy-results-${{ matrix.platforms }}.sarif'
32 changes: 32 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Static Analysis
on: [push, pull_request]
permissions: read-all
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- run: |
set -euo pipefail
make verify
- run: |
set -euo pipefail
make fix
DIFF=$(git status --porcelain)
if [ -n "$DIFF" ]; then
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi
9 changes: 6 additions & 3 deletions .github/workflows/tests-template.yaml
Original file line number Diff line number Diff line change
@@ -41,13 +41,16 @@ jobs:
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-smoke
;;
linux-integration-1-cpu)
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' make test-integration
make install-gofail
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' FAILPOINTS='true' make test-integration
;;
linux-integration-2-cpu)
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' make test-integration
make install-gofail
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' FAILPOINTS='true' make test-integration
;;
linux-integration-4-cpu)
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-integration
make install-gofail
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' FAILPOINTS='true' make test-integration
;;
linux-unit-4-cpu-race)
GOARCH=${{ inputs.arch }} RACE='true' CPU='4' GO_TEST_FLAGS='-p=2' make test-unit
37 changes: 0 additions & 37 deletions .github/workflows/trivy-nightly-scan.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.8
1.21.10
2 changes: 1 addition & 1 deletion Dockerfile-release.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
FROM --platform=linux/amd64 gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c

ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
2 changes: 1 addition & 1 deletion Dockerfile-release.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/arm64 gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
FROM --platform=linux/arm64 gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c

ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
2 changes: 1 addition & 1 deletion Dockerfile-release.ppc64le
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/ppc64le gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
FROM --platform=linux/ppc64le gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c

ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
2 changes: 1 addition & 1 deletion Dockerfile-release.s390x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/s390x gcr.io/distroless/static-debian11@sha256:7e5c6a2a4ae854242874d36171b31d26e0539c98fc6080f942f16b03e82851ab
FROM --platform=linux/s390x gcr.io/distroless/static-debian11@sha256:6d31326376a7834b106f281b04f67b5d015c31732f594930f2ea81365f99d60c

ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -571,4 +571,27 @@ pull-docker-functional:
GOFAIL_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail)
.PHONY: install-gofail
install-gofail:
go install go.etcd.io/gofail@${GOFAIL_VERSION}
go install go.etcd.io/gofail@${GOFAIL_VERSION}

.PHONY: gofail-enable
gofail-enable: install-gofail
PASSES="toggle_failpoints" FAILPOINTS=true ./test.sh

.PHONY: gofail-disable
gofail-disable: install-gofail
PASSES="toggle_failpoints" ./test.sh

.PHONY: verify
verify: verify-go-versions

.PHONY: verify-go-versions
verify-go-versions:
./scripts/verify_go_versions.sh

.PHONY: fix
fix: sync-toolchain-directive
./scripts/fix.sh

.PHONY: sync-toolchain-directive
sync-toolchain-directive:
./scripts/sync_go_toolchain_directive.sh
2 changes: 2 additions & 0 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ module go.etcd.io/etcd/api/v3

go 1.21

toolchain go1.21.10

require (
github.com/coreos/go-semver v0.3.0
github.com/gogo/protobuf v1.3.2
2 changes: 1 addition & 1 deletion api/version/version.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ import (
var (
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
MinClusterVersion = "3.0.0"
Version = "3.5.13"
Version = "3.5.14"
APIVersion = "unknown"

// Git SHA Value will be set during build
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ GOFAIL_VERSION=$(cd tools/mod && go list -m -f '{{.Version}}' go.etcd.io/gofail)
toggle_failpoints() {
mode="$1"
if command -v gofail >/dev/null 2>&1; then
run gofail "$mode" server/etcdserver/ server/mvcc/ server/wal/ server/mvcc/backend/
run gofail "$mode" server/etcdserver/ server/lease/leasehttp server/mvcc/ server/wal/ server/mvcc/backend/
if [[ "$mode" == "enable" ]]; then
go get go.etcd.io/gofail@"${GOFAIL_VERSION}"
cd ./server && go get go.etcd.io/gofail@"${GOFAIL_VERSION}"
2 changes: 2 additions & 0 deletions client/pkg/go.mod
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ module go.etcd.io/etcd/client/pkg/v3

go 1.21

toolchain go1.21.10

require (
github.com/coreos/go-systemd/v22 v22.3.2
github.com/stretchr/testify v1.8.4
6 changes: 4 additions & 2 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
@@ -2,11 +2,13 @@ module go.etcd.io/etcd/client/v2

go 1.21

toolchain go1.21.10

require (
github.com/json-iterator/go v1.1.11
github.com/modern-go/reflect2 v1.0.1
go.etcd.io/etcd/api/v3 v3.5.13
go.etcd.io/etcd/client/pkg/v3 v3.5.13
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
)

require (
2 changes: 1 addition & 1 deletion client/v3/client.go
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ func New(cfg Config) (*Client, error) {
// service interface implementations and do not need connection management.
func NewCtxClient(ctx context.Context, opts ...Option) *Client {
cctx, cancel := context.WithCancel(ctx)
c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex)}
c := &Client{ctx: cctx, cancel: cancel, lgMu: new(sync.RWMutex), mu: new(sync.RWMutex)}
for _, opt := range opts {
opt(c)
}
6 changes: 4 additions & 2 deletions client/v3/go.mod
Original file line number Diff line number Diff line change
@@ -2,12 +2,14 @@ module go.etcd.io/etcd/client/v3

go 1.21

toolchain go1.21.10

require (
github.com/dustin/go-humanize v1.0.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/prometheus/client_golang v1.11.1
go.etcd.io/etcd/api/v3 v3.5.13
go.etcd.io/etcd/client/pkg/v3 v3.5.13
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.uber.org/zap v1.17.0
google.golang.org/grpc v1.59.0
sigs.k8s.io/yaml v1.2.0
20 changes: 16 additions & 4 deletions client/v3/retry_interceptor.go
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ package clientv3

import (
"context"
"errors"
"io"
"sync"
"time"
@@ -85,7 +86,7 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien
}
continue
}
if !isSafeRetry(c.lg, lastErr, callOpts) {
if !isSafeRetry(c, lastErr, callOpts) {
return lastErr
}
}
@@ -279,7 +280,7 @@ func (s *serverStreamingRetryingStream) receiveMsgAndIndicateRetry(m interface{}
return true, err

}
return isSafeRetry(s.client.lg, err, s.callOpts), err
return isSafeRetry(s.client, err, s.callOpts), err
}

func (s *serverStreamingRetryingStream) reestablishStreamAndResendBuffer(callCtx context.Context) (grpc.ClientStream, error) {
@@ -319,17 +320,28 @@ func waitRetryBackoff(ctx context.Context, attempt uint, callOpts *options) erro
}

// isSafeRetry returns "true", if request is safe for retry with the given error.
func isSafeRetry(lg *zap.Logger, err error, callOpts *options) bool {
func isSafeRetry(c *Client, err error, callOpts *options) bool {
if isContextError(err) {
return false
}

// Situation when learner refuses RPC it is supposed to not serve is from the server
// perspective not retryable.
// But for backward-compatibility reasons we need to support situation that
// customer provides mix of learners (not yet voters) and voters with an
// expectation to pick voter in the next attempt.
// TODO: Ideally client should be 'aware' which endpoint represents: leader/voter/learner with high probability.
if errors.Is(err, rpctypes.ErrGPRCNotSupportedForLearner) && len(c.Endpoints()) > 1 {
return true
}

switch callOpts.retryPolicy {
case repeatable:
return isSafeRetryImmutableRPC(err)
case nonRepeatable:
return isSafeRetryMutableRPC(err)
default:
lg.Warn("unrecognized retry policy", zap.String("retryPolicy", callOpts.retryPolicy.String()))
c.lg.Warn("unrecognized retry policy", zap.String("retryPolicy", callOpts.retryPolicy.String()))
return false
}
}
6 changes: 6 additions & 0 deletions etcd.conf.yml.sample
Original file line number Diff line number Diff line change
@@ -125,6 +125,12 @@ peer-transport-security:
# Peer TLS using generated certificates.
auto-tls: false

# Allowed CN for inter peer authentication.
allowed-cn:

# Allowed TLS hostname for inter peer authentication.
allowed-hostname:

# The validity period of the self-signed certificate, the unit is year.
self-signed-cert-validity: 1

Loading