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

Release 3.5 - v3.5.14-dd.1 #3

Merged
merged 6 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.10
1.22.5
4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/api/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

require (
github.com/coreos/go-semver v0.3.0
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.14"
Version = "3.5.14-dd.1"
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
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/client/pkg/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

require (
github.com/coreos/go-systemd/v22 v22.3.2
Expand Down
8 changes: 4 additions & 4 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module go.etcd.io/etcd/client/v2

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

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.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
)

require (
Expand Down
8 changes: 4 additions & 4 deletions client/v3/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module go.etcd.io/etcd/client/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

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.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.uber.org/zap v1.17.0
google.golang.org/grpc v1.59.0
sigs.k8s.io/yaml v1.2.0
Expand Down
18 changes: 9 additions & 9 deletions etcdctl/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/etcdctl/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

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.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/v2 v2.305.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/etcdutl/v3 v3.5.14
go.etcd.io/etcd/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14-dd.1
go.etcd.io/etcd/etcdutl/v3 v3.5.14-dd.1
go.etcd.io/etcd/pkg/v3 v3.5.14-dd.1
go.uber.org/zap v1.17.0
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
google.golang.org/grpc v1.59.0
Expand Down Expand Up @@ -50,8 +50,8 @@ 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.10 // indirect
go.etcd.io/etcd/raft/v3 v3.5.14 // indirect
go.etcd.io/etcd/server/v3 v3.5.14 // indirect
go.etcd.io/etcd/raft/v3 v3.5.14-dd.1 // indirect
go.etcd.io/etcd/server/v3 v3.5.14-dd.1 // 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
Expand Down
16 changes: 8 additions & 8 deletions etcdutl/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/etcdutl/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

replace (
go.etcd.io/etcd/api/v3 => ../api
Expand All @@ -27,12 +27,12 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.1.3
go.etcd.io/bbolt v1.3.10
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/pkg/v3 v3.5.14
go.etcd.io/etcd/raft/v3 v3.5.14
go.etcd.io/etcd/server/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/v3 v3.5.14-dd.1
go.etcd.io/etcd/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/raft/v3 v3.5.14-dd.1
go.etcd.io/etcd/server/v3 v3.5.14-dd.1
go.uber.org/zap v1.17.0
)

Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

replace (
go.etcd.io/etcd/api/v3 => ./api
Expand All @@ -22,16 +22,16 @@ require (
github.com/dustin/go-humanize v1.0.0
github.com/spf13/cobra v1.1.3
go.etcd.io/bbolt v1.3.10
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/v2 v2.305.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/etcdctl/v3 v3.5.14
go.etcd.io/etcd/etcdutl/v3 v3.5.14
go.etcd.io/etcd/pkg/v3 v3.5.14
go.etcd.io/etcd/raft/v3 v3.5.14
go.etcd.io/etcd/server/v3 v3.5.14
go.etcd.io/etcd/tests/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14-dd.1
go.etcd.io/etcd/etcdctl/v3 v3.5.14-dd.1
go.etcd.io/etcd/etcdutl/v3 v3.5.14-dd.1
go.etcd.io/etcd/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/raft/v3 v3.5.14-dd.1
go.etcd.io/etcd/server/v3 v3.5.14-dd.1
go.etcd.io/etcd/tests/v3 v3.5.14-dd.1
go.uber.org/zap v1.17.0
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
google.golang.org/grpc v1.59.0
Expand Down
6 changes: 3 additions & 3 deletions pkg/go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module go.etcd.io/etcd/pkg/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

require (
github.com/creack/pty v1.1.11
github.com/dustin/go-humanize v1.0.0
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.uber.org/zap v1.17.0
google.golang.org/grpc v1.59.0
)
Expand Down
6 changes: 3 additions & 3 deletions raft/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module go.etcd.io/etcd/raft/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

require (
github.com/cockroachdb/datadriven v1.0.2
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
)

require (
Expand Down
22 changes: 11 additions & 11 deletions server/embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,15 @@ type configJSON struct {
}

type securityConfig struct {
CertFile string `json:"cert-file"`
KeyFile string `json:"key-file"`
ClientCertFile string `json:"client-cert-file"`
ClientKeyFile string `json:"client-key-file"`
CertAuth bool `json:"client-cert-auth"`
TrustedCAFile string `json:"trusted-ca-file"`
AutoTLS bool `json:"auto-tls"`
AllowedCN string `json:"allowed-cn"`
AllowedHostname string `json:"allowed-hostname"`
CertFile string `json:"cert-file"`
KeyFile string `json:"key-file"`
ClientCertFile string `json:"client-cert-file"`
ClientKeyFile string `json:"client-key-file"`
CertAuth bool `json:"client-cert-auth"`
TrustedCAFile string `json:"trusted-ca-file"`
AutoTLS bool `json:"auto-tls"`
AllowedCNs []string `json:"allowed-cns"`
AllowedHostnames []string `json:"allowed-hostnames"`
Comment on lines +453 to +454
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am quite surprise they are also changing the json tags upstream since this is a breaking change

In the flag-based config, we updated the go struct keys ( e.g. AllowedHostnames ), but kept the old flag name ( e.g. client-cert-allowed-hostname ) to make the migration smoother without having to synchronize an update of the binary with an update of the config

cfg.ec.ClientTLSInfo.AllowedHostnames = flags.StringsFromFlag(cfg.cf.flagSet, "client-cert-allowed-hostname")
cfg.ec.ClientTLSInfo.AllowedURIs = flags.StringsFromFlag(cfg.cf.flagSet, "client-cert-allowed-uri")
cfg.ec.PeerTLSInfo.AllowedCNs = flags.StringsFromFlag(cfg.cf.flagSet, "peer-cert-allowed-cn")
cfg.ec.PeerTLSInfo.AllowedHostnames = flags.StringsFromFlag(cfg.cf.flagSet, "peer-cert-allowed-hostname")
cfg.ec.PeerTLSInfo.AllowedURIs = flags.StringsFromFlag(cfg.cf.flagSet, "peer-cert-allowed-uri")

No problem with it though this we do not use the file-based config

}

// NewConfig creates a new Config populated with default values.
Expand Down Expand Up @@ -631,8 +631,8 @@ func (cfg *configYAML) configFromFile(path string) error {
tls.ClientKeyFile = ysc.ClientKeyFile
tls.ClientCertAuth = ysc.CertAuth
tls.TrustedCAFile = ysc.TrustedCAFile
tls.AllowedCN = ysc.AllowedCN
tls.AllowedHostname = ysc.AllowedHostname
tls.AllowedCNs = ysc.AllowedCNs
tls.AllowedHostnames = ysc.AllowedHostnames
}
copySecurityDetails(&cfg.ClientTLSInfo, &cfg.ClientSecurityJSON)
copySecurityDetails(&cfg.PeerTLSInfo, &cfg.PeerSecurityJSON)
Expand Down
9 changes: 5 additions & 4 deletions server/embed/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net"
"net/url"
"os"
"slices"
"testing"
"time"

Expand All @@ -40,8 +41,8 @@ func notFoundErr(service, domain string) error {

func TestConfigFileOtherFields(t *testing.T) {
ctls := securityConfig{TrustedCAFile: "cca", CertFile: "ccert", KeyFile: "ckey"}
// Note AllowedCN and AllowedHostname are mutually exclusive, this test is just to verify the fields can be correctly marshalled & unmarshalled.
ptls := securityConfig{TrustedCAFile: "pca", CertFile: "pcert", KeyFile: "pkey", AllowedCN: "etcd", AllowedHostname: "whatever.example.com"}
// Note AllowedCNs and AllowedHostnames are mutually exclusive, this test is just to verify the fields can be correctly marshalled & unmarshalled.
ptls := securityConfig{TrustedCAFile: "pca", CertFile: "pcert", KeyFile: "pkey", AllowedCNs: []string{"etcd"}, AllowedHostnames: []string{"whatever.example.com"}}
yc := struct {
ClientSecurityCfgFile securityConfig `json:"client-transport-security"`
PeerSecurityCfgFile securityConfig `json:"peer-transport-security"`
Expand Down Expand Up @@ -160,8 +161,8 @@ func (s *securityConfig) equals(t *transport.TLSInfo) bool {
s.ClientCertFile == t.ClientCertFile &&
s.ClientKeyFile == t.ClientKeyFile &&
s.KeyFile == t.KeyFile &&
s.AllowedCN == t.AllowedCN &&
s.AllowedHostname == t.AllowedHostname
slices.Equal(s.AllowedCNs, t.AllowedCNs) &&
slices.Equal(s.AllowedHostnames, t.AllowedHostnames)
}

func mustCreateCfgFile(t *testing.T, b []byte) *os.File {
Expand Down
14 changes: 7 additions & 7 deletions server/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module go.etcd.io/etcd/server/v3

go 1.21
go 1.22

toolchain go1.21.10
toolchain go1.22.5

require (
github.com/coreos/go-semver v0.3.0
Expand All @@ -26,12 +26,12 @@ require (
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go.etcd.io/bbolt v1.3.10
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/api/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/client/v2 v2.305.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/pkg/v3 v3.5.14
go.etcd.io/etcd/raft/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14-dd.1
go.etcd.io/etcd/pkg/v3 v3.5.14-dd.1
go.etcd.io/etcd/raft/v3 v3.5.14-dd.1
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0
go.opentelemetry.io/otel v1.20.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0
Expand Down
Loading
Loading