Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETCD-714: Rebase etcd 3.5.18 openshift 4.17 #310

Open
wants to merge 70 commits into
base: openshift-4.17
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6a3018f
docs: remove warning that etcd 3.5.0 was not yet released
ghouscht Sep 12, 2024
9e0e81e
Merge pull request #18579 from ghouscht/issue-18410
ahrtr Sep 15, 2024
b56619e
Ensure commits are signed in scripts/release.sh.
jmhbnz Sep 15, 2024
594427d
Merge pull request #18599 from k8s-infra-cherrypick-robot/cherry-pick…
jmhbnz Sep 17, 2024
6021768
Bump go version to 1.22.8
PyAgni Oct 2, 2024
ce86965
Merge pull request #18669 from PyAgni/agni/update-go-1.23.2
ahrtr Oct 3, 2024
2dbfe58
github/workflows: use ECR mirror for Trivy's DB
ivanvc Oct 2, 2024
8c162bd
Merge pull request #18687 from k8s-infra-cherrypick-robot/cherry-pick…
jmhbnz Oct 5, 2024
e590572
[serverWatchStream] terminate recvLoop on sws.close()
veshij Oct 14, 2024
dea4eb3
[3.5] Fix risk of a partial write txn being applied
shyamjvs Oct 28, 2024
17ab1fa
Remove defunct actuated arm64 workflows.
jmhbnz Oct 28, 2024
e102f29
Merge pull request #18802 from jmhbnz/release-3.5
ahrtr Oct 29, 2024
5a5408b
Merge pull request #18784 from veshij/release-3.5
ahrtr Oct 29, 2024
23f887a
Merge pull request #18799 from shyamjvs/backport-3.5
ahrtr Oct 29, 2024
5ec08a2
chore(e2e): backport TestNoErrorLogsDuringNormalOperations test
ghouscht Oct 29, 2024
1b88fc4
Merge pull request #18807 from ghouscht/backport-3.5-no-error-logs-test
ahrtr Oct 30, 2024
ae6655f
fix(defrag): handle no space left error
ghouscht Nov 1, 2024
1d17507
fix(defrag): handle defragdb failure
ghouscht Nov 6, 2024
f26ff91
chore(e2e): adapt defrag tests for 3.5
ghouscht Nov 6, 2024
ab8bfc2
Merge pull request #18842 from ghouscht/defrag-fixes-backport-3.5
ahrtr Nov 6, 2024
bceca16
Bump go toolchain to 1.22.9
ivanvc Nov 7, 2024
d770310
Merge pull request #18849 from ivanvc/release-3.5-update-go-to-1.22.9
ahrtr Nov 7, 2024
b2ba488
fix(defrag): close temp file in case of error
ghouscht Nov 7, 2024
4726460
Merge pull request #18854 from ghouscht/backport-defrag-close-temp-3.5
ahrtr Nov 9, 2024
76275d6
release: properly change working dir if tmp location already exists
ivanvc Oct 30, 2024
cb970e5
release: use GitHub's gh to create GitHub release
ivanvc Nov 11, 2024
4f9a1c7
Merge pull request #18876 from ivanvc/release-3.5-backport-18649
serathius Nov 12, 2024
307f9dc
Merge pull request #18863 from ghouscht/backport-18812-3.5
serathius Nov 12, 2024
507c0de
version: bump up to 3.5.17
ivanvc Nov 12, 2024
e61b495
Bump golang-jwt/jwt to 4.5.1 to address GO-2024-3250
tjungblu Nov 15, 2024
5711c07
Merge pull request #18899 from tjungblu/update_18898
jmhbnz Nov 15, 2024
c84e84c
add tls min/max version to grpc proxy
tjungblu Oct 31, 2024
601a884
Merge pull request #18829 from tjungblu/tlsminv3.5
ahrtr Nov 18, 2024
83045bc
fix runtime error: comparing uncomparable type
ktalg Nov 14, 2024
8f6c30d
Merge pull request #18937 from ktalg/release-3.5
jmhbnz Nov 27, 2024
28a19f7
Print warning message for deprecated flags if set
ahrtr Dec 3, 2024
ef6000e
Merge pull request #18999 from ahrtr/3.5_deprecated_flags_20241203
ahrtr Dec 4, 2024
727c9b6
Bump go toolchain to 1.22.9
deanurag Dec 4, 2024
762e938
Merge pull request #19004 from deanurag/release-3.5
ahrtr Dec 4, 2024
5d284fd
*: support custom content check offline in v2store
fuweid Dec 28, 2024
c1ab521
Fix mixVersion test case: ensure a snapshot to be sent out
ahrtr Jan 8, 2025
9d920a8
Merge pull request #19145 from ahrtr/mix_version_3.5_20250108
ahrtr Jan 8, 2025
bba2c2a
Merge pull request #19113 from fuweid/v35_offline_check_v2store
ahrtr Jan 9, 2025
c5d14b4
bump golang.org/x/crypto from 0.21.0 to 0.32.0
ivanvc Jan 9, 2025
3180334
Merge pull request #19154 from ivanvc/release-3.5-update-golang-org-x…
ahrtr Jan 9, 2025
f627f57
bump golang.org/x/net from 0.25.0 to 0.34.0
ivanvc Jan 9, 2025
8943d8f
Update release_notes.tpl.txt
ivanvc Jan 10, 2025
b9a7aed
Do not wait for ready notify if the server is stopping
ahrtr Dec 12, 2024
9b24194
Remove duplicated <-s.ReadyNotify()
ahrtr Dec 13, 2024
5d5b90f
Merge pull request #19161 from ivanvc/release-3.5
ahrtr Jan 10, 2025
2c171d0
Merge pull request #19158 from ivanvc/release-3.5-update-golang-org-x…
ahrtr Jan 10, 2025
e5b7e08
etcdutl/etcdutl: use datadir package to build wal/snapdir
fuweid Jan 10, 2025
6349cb8
Merge pull request #19164 from fuweid/v35_check_v2store_followup
ahrtr Jan 10, 2025
80b0a73
Avoid deadlock in etcd.Close when stopping during bootstrapping
joshuazh-x Jan 11, 2025
5d22781
Merge pull request #19167 from joshuazh-x/fix-embed-close-deadlock-3.5
serathius Jan 13, 2025
3ff20e6
Bump go toolchain to 1.22.11
ivanvc Jan 16, 2025
eade1fa
Merge pull request #19211 from ivanvc/release-3.5-bump-go-to-1.22.11
ahrtr Jan 17, 2025
c6fcd27
mvcc: restore tombstone index if it's first revision
fuweid Jan 13, 2025
a7ab766
Merge pull request #19249 from fuweid/35-fix-19179
serathius Jan 22, 2025
0c8e7b1
Ensure all goroutines created by StartEtcd to exit before closing the…
ahrtr Jan 22, 2025
3c04b6c
Merge pull request #19258 from ahrtr/race-20250117_3.5
ahrtr Jan 22, 2025
5bca08e
version: bump up to 3.5.18
jmhbnz Jan 24, 2025
04f775e
DOWNSTREAM: <carry>: ETCD-656: Automate datadir move after quorum-res…
tjungblu Sep 12, 2024
778cbb7
NO-JIRA: use golang 1.22 image
Elbehery Sep 26, 2024
c0c66ee
DOWNSTREAM <carry>: resolve merge conflicts
tjungblu Oct 27, 2023
1285d66
Add support for cachi2 based deps
jupierce Oct 28, 2024
e7165bf
Migrate Dockerfile.art for Konflux
jupierce Oct 29, 2024
01ca4f1
DOWNSTREAM: <carry>: ETCD-696: Add rev bumping to force-new-cluster
tjungblu Nov 4, 2024
a5af229
DOWNSTREAM: <carry>: add tls min/max version to grpc proxy
tjungblu Nov 4, 2024
8333233
Merge remote-tracking branch 'openshift/openshift-4.17' into rebase-e…
Elbehery Feb 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
Name-Email: [email protected]
Expire-Date: 0
EOF
DRY_RUN=true ./scripts/release --no-upload --no-docker-push --in-place 3.5.99
DRY_RUN=true ./scripts/release --no-upload --no-docker-push --no-gh-release --in-place 3.5.99
- name: test-image
run: |
VERSION=3.5.99 ./scripts/test_images.sh
Expand Down Expand Up @@ -64,6 +64,11 @@ jobs:
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results-${{ matrix.platforms }}.sarif'
env:
# Use AWS' ECR mirror for the trivy-db image, as GitHub's Container
# Registry is returning a TOOMANYREQUESTS error.
# Ref: https://github.com/aquasecurity/trivy-action/issues/389
TRIVY_DB_REPOSITORY: 'public.ecr.aws/aquasecurity/trivy-db:2'
- name: upload scan results
uses: github/codeql-action/upload-sarif@956f09c2ef1926b580554b9014cfb8a51abf89dd # v2.16.6
with:
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,3 @@ jobs:
'linux-unit-4-cpu-race',
'linux-386-unit-1-cpu',
'all-build']"
arm64:
uses: ./.github/workflows/tests-template.yaml
with:
arch: arm64
runs-on: actuated-arm64-8cpu-32gb
targets: "['linux-test-smoke',
'linux-integration-1-cpu',
'linux-integration-2-cpu',
'linux-integration-4-cpu',
'linux-unit-4-cpu-race']"
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.7
1.22.11
2 changes: 2 additions & 0 deletions Dockerfile.art
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ FROM registry.ci.openshift.org/ocp/4.17:base-rhel9

ENTRYPOINT ["/usr/bin/etcd"]

RUN yum install --setopt=tsflags=nodocs -y jq && yum clean all && rm -rf /var/cache/yum/*

COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdutl /usr/bin/
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ FROM registry.ci.openshift.org/ocp/4.17:base-rhel9

ENTRYPOINT ["/usr/bin/etcd"]

RUN yum install --setopt=tsflags=nodocs -y jq && yum clean all && rm -rf /var/cache/yum/*

COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcd /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdctl /usr/bin/
COPY --from=builder /go/src/go.etcd.io/etcd/bin/etcdutl /usr/bin/
Expand Down
8 changes: 4 additions & 4 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module go.etcd.io/etcd/api/v3

go 1.22

toolchain go1.22.7
toolchain go1.22.11

require (
github.com/coreos/go-semver v0.3.0
Expand All @@ -14,9 +14,9 @@ require (
)

require (
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -68,12 +68,12 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
Expand Down
2 changes: 1 addition & 1 deletion api/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.16"
Version = "3.5.18"
APIVersion = "unknown"

// Git SHA Value will be set during build
Expand Down
4 changes: 2 additions & 2 deletions client/pkg/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module go.etcd.io/etcd/client/pkg/v3

go 1.22

toolchain go1.22.7
toolchain go1.22.11

require (
github.com/coreos/go-systemd/v22 v22.3.2
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.17.0
golang.org/x/sys v0.18.0
golang.org/x/sys v0.29.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions client/pkg/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
Expand Down
6 changes: 3 additions & 3 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module go.etcd.io/etcd/client/v2

go 1.22

toolchain go1.22.7
toolchain go1.22.11

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.16
go.etcd.io/etcd/client/pkg/v3 v3.5.16
go.etcd.io/etcd/api/v3 v3.5.18
go.etcd.io/etcd/client/pkg/v3 v3.5.18
)

require (
Expand Down
7 changes: 0 additions & 7 deletions client/v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
go get go.etcd.io/etcd/client/v3
```

Warning: As etcd 3.5.0 was not yet released, the command above does not work.
After first pre-release of 3.5.0 [#12498](https://github.com/etcd-io/etcd/issues/12498),
etcd can be referenced using:
```
go get go.etcd.io/etcd/client/[email protected]
```

## Get started

Create client using `clientv3.New`:
Expand Down
12 changes: 6 additions & 6 deletions client/v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module go.etcd.io/etcd/client/v3

go 1.22

toolchain go1.22.7
toolchain go1.22.11

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.16
go.etcd.io/etcd/client/pkg/v3 v3.5.16
go.etcd.io/etcd/api/v3 v3.5.18
go.etcd.io/etcd/client/pkg/v3 v3.5.18
go.uber.org/zap v1.17.0
google.golang.org/grpc v1.59.0
sigs.k8s.io/yaml v1.2.0
Expand All @@ -28,9 +28,9 @@ require (
github.com/prometheus/procfs v0.6.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
Expand Down
12 changes: 6 additions & 6 deletions client/v3/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -156,13 +156,13 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
Expand Down
12 changes: 11 additions & 1 deletion client/v3/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ func (l *lessor) Leases(ctx context.Context) (*LeaseLeasesResponse, error) {
return nil, ContextError(ctx, err)
}

// To identify the context passed to `KeepAlive`, a key/value pair is
// attached to the context. The key is a `keepAliveCtxKey` object, and
// the value is the pointer to the context object itself, ensuring
// uniqueness as each context has a unique memory address.
type keepAliveCtxKey struct{}

func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error) {
ch := make(chan *LeaseKeepAliveResponse, LeaseResponseChSize)

Expand All @@ -277,6 +283,10 @@ func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAl
default:
}
ka, ok := l.keepAlives[id]

if ctx.Done() != nil {
ctx = context.WithValue(ctx, keepAliveCtxKey{}, &ctx)
}
if !ok {
// create fresh keep alive
ka = &keepAlive{
Expand Down Expand Up @@ -347,7 +357,7 @@ func (l *lessor) keepAliveCtxCloser(ctx context.Context, id LeaseID, donec <-cha

// close channel and remove context if still associated with keep alive
for i, c := range ka.ctxs {
if c == ctx {
if c.Value(keepAliveCtxKey{}) == ctx.Value(keepAliveCtxKey{}) {
close(ka.chs[i])
ka.ctxs = append(ka.ctxs[:i], ka.ctxs[i+1:]...)
ka.chs = append(ka.chs[:i], ka.chs[i+1:]...)
Expand Down
28 changes: 14 additions & 14 deletions etcdctl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module go.etcd.io/etcd/etcdctl/v3

go 1.22

toolchain go1.22.7
toolchain go1.22.11

require (
github.com/bgentry/speakeasy v0.1.0
Expand All @@ -11,12 +11,12 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/urfave/cli v1.22.4
go.etcd.io/etcd/api/v3 v3.5.16
go.etcd.io/etcd/client/pkg/v3 v3.5.16
go.etcd.io/etcd/client/v2 v2.305.16
go.etcd.io/etcd/client/v3 v3.5.16
go.etcd.io/etcd/etcdutl/v3 v3.5.16
go.etcd.io/etcd/pkg/v3 v3.5.16
go.etcd.io/etcd/api/v3 v3.5.18
go.etcd.io/etcd/client/pkg/v3 v3.5.18
go.etcd.io/etcd/client/v2 v2.305.18
go.etcd.io/etcd/client/v3 v3.5.18
go.etcd.io/etcd/etcdutl/v3 v3.5.18
go.etcd.io/etcd/pkg/v3 v3.5.18
go.uber.org/zap v1.17.0
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
google.golang.org/grpc v1.59.0
Expand All @@ -32,7 +32,7 @@ require (
github.com/go-logr/logr v1.3.0 // 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.4.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
Expand All @@ -50,18 +50,18 @@ require (
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.11 // indirect
go.etcd.io/etcd/raft/v3 v3.5.16 // indirect
go.etcd.io/etcd/server/v3 v3.5.16 // indirect
go.etcd.io/etcd/raft/v3 v3.5.18 // indirect
go.etcd.io/etcd/server/v3 v3.5.18 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
Expand Down
Loading