Skip to content

Commit ce82e75

Browse files
authored
Merge pull request #19673 from ahrtr/clientv2_2_20250326
[release-3.6] Move client/internal/v2 into server/internal/clientv2
2 parents c4252fa + 91342c9 commit ce82e75

33 files changed

+21
-295
lines changed

bill-of-materials.json

-9
Original file line numberDiff line numberDiff line change
@@ -485,15 +485,6 @@
485485
}
486486
]
487487
},
488-
{
489-
"project": "go.etcd.io/etcd/client/v2",
490-
"licenses": [
491-
{
492-
"type": "Apache License 2.0",
493-
"confidence": 1
494-
}
495-
]
496-
},
497488
{
498489
"project": "go.etcd.io/etcd/client/v3",
499490
"licenses": [

client/internal/v2/LICENSE

-202
This file was deleted.

client/internal/v2/go.mod

-34
This file was deleted.

client/internal/v2/go.sum

-22
This file was deleted.

codecov.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ codecov:
99
fixes:
1010
- go.etcd.io/etcd/api/v3/::api/
1111
- go.etcd.io/etcd/client/v3/::client/v3/
12-
- go.etcd.io/etcd/client/v2/::client/v2/
1312
- go.etcd.io/etcd/etcdctl/v3/::etcdctl/
1413
- go.etcd.io/etcd/etcdutl/v3/::etcdutl/
1514
- go.etcd.io/etcd/pkg/v3/::pkg/

dummy.go

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package main_test
1818
// module (e.g. for sake of 'bom' generation).
1919
// Thanks to this 'go mod tidy' is not removing that dependencies from go.mod.
2020
import (
21-
_ "go.etcd.io/etcd/client/v2" // keep
2221
_ "go.etcd.io/etcd/etcdctl/v3/ctlv3/command" // keep
2322
_ "go.etcd.io/etcd/etcdutl/v3/etcdutl" // keep
2423
_ "go.etcd.io/etcd/tests/v3/integration" // keep

etcdutl/go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ toolchain go1.23.7
77
replace (
88
go.etcd.io/etcd/api/v3 => ../api
99
go.etcd.io/etcd/client/pkg/v3 => ../client/pkg
10-
go.etcd.io/etcd/client/v2 => ./../client/internal/v2
1110
go.etcd.io/etcd/client/v3 => ../client/v3
1211
go.etcd.io/etcd/pkg/v3 => ../pkg
1312
go.etcd.io/etcd/server/v3 => ../server
@@ -71,7 +70,6 @@ require (
7170
github.com/spf13/pflag v1.0.6 // indirect
7271
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
7372
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
74-
go.etcd.io/etcd/client/v2 v2.306.0-rc.2 // indirect
7573
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
7674
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
7775
go.opentelemetry.io/otel v1.34.0 // indirect

go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ toolchain go1.23.7
77
replace (
88
go.etcd.io/etcd/api/v3 => ./api
99
go.etcd.io/etcd/client/pkg/v3 => ./client/pkg
10-
go.etcd.io/etcd/client/v2 => ./client/internal/v2
1110
go.etcd.io/etcd/client/v3 => ./client/v3
1211
go.etcd.io/etcd/etcdctl/v3 => ./etcdctl
1312
go.etcd.io/etcd/etcdutl/v3 => ./etcdutl
@@ -26,7 +25,6 @@ require (
2625
go.etcd.io/bbolt v1.4.0
2726
go.etcd.io/etcd/api/v3 v3.6.0-rc.2
2827
go.etcd.io/etcd/client/pkg/v3 v3.6.0-rc.2
29-
go.etcd.io/etcd/client/v2 v2.306.0-rc.2
3028
go.etcd.io/etcd/client/v3 v3.6.0-rc.2
3129
go.etcd.io/etcd/etcdctl/v3 v3.6.0-rc.2
3230
go.etcd.io/etcd/etcdutl/v3 v3.6.0-rc.2

scripts/release_mod.sh

+2-13
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ function _cmd() {
2424
log_info " - push_mod_tags - Tags HEAD with all modules versions tags and pushes it to \${REMOTE_REPO}."
2525
}
2626

27-
# update_module_version [v2version] [v3version]
27+
# update_module_version [v3version]
2828
# Updates versions of cross-references in all internal references in current module.
2929
function update_module_version() {
3030
local v3version="${1}"
31-
local v2version="${2}"
3231
local modules
3332
run go mod tidy
3433
modules=$(run go list -f '{{if not .Main}}{{if not .Indirect}}{{.Path}}{{end}}{{end}}' -m all)
@@ -38,11 +37,6 @@ function update_module_version() {
3837
run go mod edit -require "${dep}@${v3version}"
3938
done
4039

41-
v2deps=$(echo "${modules}" | grep -E "${ROOT_MODULE}/.*/v2")
42-
for dep in ${v2deps}; do
43-
run go mod edit -require "${dep}@${v2version}"
44-
done
45-
4640
run go mod tidy
4741
}
4842

@@ -61,18 +55,13 @@ function update_versions_cmd() {
6155
fi
6256

6357
local v3version="${TARGET_VERSION}"
64-
local v2version
65-
# converts e.g. v3.5.0-alpha.0 --> v2.305.0-alpha.0
66-
# shellcheck disable=SC2001
67-
v2version="$(echo "${TARGET_VERSION}" | sed 's|^v3.\([0-9]*\).|v2.30\1.|g')"
6858

6959
log_info "DRY_RUN : ${DRY_RUN}"
7060
log_info "TARGET_VERSION: ${TARGET_VERSION}"
7161
log_info ""
7262
log_info "v3version: ${v3version}"
73-
log_info "v2version: ${v2version}"
7463

75-
run_for_modules update_module_version "${v3version}" "${v2version}"
64+
run_for_modules update_module_version "${v3version}"
7665
run_for_modules mod_tidy_fix || exit 2
7766
}
7867

scripts/test_lib.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function run_for_module {
166166
}
167167

168168
function module_dirs() {
169-
echo "api pkg client/pkg client/internal/v2 client/v3 server etcdutl etcdctl tests tools/mod tools/rw-heatmaps tools/testgrid-analysis ."
169+
echo "api pkg client/pkg client/v3 server etcdutl etcdctl tests tools/mod tools/rw-heatmaps tools/testgrid-analysis ."
170170
}
171171

172172
# maybe_run [cmd...] runs given command depending on the DRY_RUN flag.
@@ -186,7 +186,6 @@ function modules() {
186186
"${ROOT_MODULE}/api/v3"
187187
"${ROOT_MODULE}/pkg/v3"
188188
"${ROOT_MODULE}/client/pkg/v3"
189-
"${ROOT_MODULE}/client/v2"
190189
"${ROOT_MODULE}/client/v3"
191190
"${ROOT_MODULE}/server/v3"
192191
"${ROOT_MODULE}/etcdutl/v3"

server/etcdserver/api/v2discovery/discovery.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
"go.etcd.io/etcd/client/pkg/v3/transport"
3636
"go.etcd.io/etcd/client/pkg/v3/types"
37-
"go.etcd.io/etcd/client/v2"
37+
client "go.etcd.io/etcd/server/v3/internal/clientv2"
3838
)
3939

4040
var (

0 commit comments

Comments
 (0)