Skip to content

Commit

Permalink
Merge branch 'main' into retryinterceptor-remove-todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirotaka Tagawa / wafuwafu13 committed Jan 5, 2023
2 parents b9c4635 + 6200b22 commit b606721
Show file tree
Hide file tree
Showing 288 changed files with 1,116 additions and 654 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ hack/tls-setup/certs
/tools/proto-annotations/proto-annotations
/tools/benchmark/benchmark
/out
/etcd-dump-logs
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-3.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0).
- Add [Protection on maintenance request when auth is enabled](https://github.com/etcd-io/etcd/pull/14663).
- Graduated [`--experimental-warning-unary-request-duration` to `--warning-unary-request-duration`](https://github.com/etcd-io/etcd/pull/14414). Note the experimental flag is deprecated and will be decommissioned in v3.7.
- Add [field `hash_revision` into `HashKVResponse`](https://github.com/etcd-io/etcd/pull/14537).
- Add [`etcd --experimental-snapshot-catch-up-entries`](https://github.com/etcd-io/etcd/pull/15033) flag to configure number of entries for a slow follower to catch up after compacting the the raft storage entries and defaults to 5k.

### etcd grpc-proxy

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/dir_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows
// +build !windows

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/dir_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build windows
// +build windows

package fileutil

Expand Down
3 changes: 2 additions & 1 deletion client/pkg/fileutil/fileutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import (
"os"
"path/filepath"

"go.etcd.io/etcd/client/pkg/v3/verify"
"go.uber.org/zap"

"go.etcd.io/etcd/client/pkg/v3/verify"
)

const (
Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_flock.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows && !plan9 && !solaris
// +build !windows,!plan9,!solaris

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build linux
// +build linux

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build linux
// +build linux

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build solaris
// +build solaris

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows && !plan9 && !solaris && !linux
// +build !windows,!plan9,!solaris,!linux

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/lock_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build windows
// +build windows

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/preallocate_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build darwin
// +build darwin

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/preallocate_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build linux
// +build linux

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/preallocate_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !linux && !darwin
// +build !linux,!darwin

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !linux && !darwin
// +build !linux,!darwin

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/sync_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build darwin
// +build darwin

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/fileutil/sync_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build linux
// +build linux

package fileutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/logutil/zap_journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows
// +build !windows

package logutil

Expand Down
1 change: 0 additions & 1 deletion client/pkg/logutil/zap_journal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows
// +build !windows

package logutil

Expand Down
1 change: 1 addition & 0 deletions client/pkg/testutil/before.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"go.etcd.io/etcd/client/pkg/v3/verify"
)

Expand Down
1 change: 0 additions & 1 deletion client/pkg/transport/sockopt_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build solaris
// +build solaris

package transport

Expand Down
1 change: 0 additions & 1 deletion client/pkg/transport/sockopt_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !windows && !solaris
// +build !windows,!solaris

package transport

Expand Down
1 change: 0 additions & 1 deletion client/pkg/transport/sockopt_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build windows
// +build windows

package transport

Expand Down
3 changes: 2 additions & 1 deletion client/v2/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (
"strings"
"time"

"go.etcd.io/etcd/client/pkg/v3/pathutil"
kjson "sigs.k8s.io/json"

"go.etcd.io/etcd/client/pkg/v3/pathutil"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (
"fmt"
"strings"

"google.golang.org/grpc"

"go.etcd.io/etcd/api/v3/authpb"
pb "go.etcd.io/etcd/api/v3/etcdserverpb"
"google.golang.org/grpc"
)

type (
Expand Down
11 changes: 6 additions & 5 deletions client/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ import (
"sync"
"time"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.etcd.io/etcd/client/pkg/v3/logutil"
"go.etcd.io/etcd/client/v3/credentials"
"go.etcd.io/etcd/client/v3/internal/endpoint"
"go.etcd.io/etcd/client/v3/internal/resolver"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
grpccredentials "google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/status"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.etcd.io/etcd/client/pkg/v3/logutil"
"go.etcd.io/etcd/client/v3/credentials"
"go.etcd.io/etcd/client/v3/internal/endpoint"
"go.etcd.io/etcd/client/v3/internal/resolver"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions client/v3/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ import (

"github.com/stretchr/testify/assert"

"go.uber.org/zap"
"go.uber.org/zap/zaptest"

"go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.etcd.io/etcd/client/pkg/v3/testutil"
"go.uber.org/zap"
"go.uber.org/zap/zaptest"

"google.golang.org/grpc"
)
Expand Down
3 changes: 2 additions & 1 deletion client/v3/concurrency/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
"context"
"time"

v3 "go.etcd.io/etcd/client/v3"
"go.uber.org/zap"

v3 "go.etcd.io/etcd/client/v3"
)

const defaultSessionTTL = 60
Expand Down
3 changes: 2 additions & 1 deletion client/v3/credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"net"
"sync"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
grpccredentials "google.golang.org/grpc/credentials"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
)

// Config defines gRPC credential configuration.
Expand Down
1 change: 1 addition & 0 deletions client/v3/credentials/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
)

Expand Down
3 changes: 2 additions & 1 deletion client/v3/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ package clientv3
import (
"context"

"google.golang.org/grpc/metadata"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.etcd.io/etcd/api/v3/version"
"google.golang.org/grpc/metadata"
)

// WithRequireLeader requires client requests to only succeed
Expand Down
3 changes: 2 additions & 1 deletion client/v3/ctx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (
"reflect"
"testing"

"google.golang.org/grpc/metadata"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.etcd.io/etcd/api/v3/version"
"google.golang.org/grpc/metadata"
)

func TestMetadataWithRequireLeader(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion client/v3/internal/resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
package resolver

import (
"go.etcd.io/etcd/client/v3/internal/endpoint"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/resolver/manual"
"google.golang.org/grpc/serviceconfig"

"go.etcd.io/etcd/client/v3/internal/endpoint"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ import (
"log"
"os"

"go.etcd.io/etcd/client/pkg/v3/logutil"
"go.uber.org/zap/zapcore"
"go.uber.org/zap/zapgrpc"
"google.golang.org/grpc/grpclog"

"go.etcd.io/etcd/client/pkg/v3/logutil"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion client/v3/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import (
"fmt"
"io"

pb "go.etcd.io/etcd/api/v3/etcdserverpb"
"go.uber.org/zap"
"google.golang.org/grpc"

pb "go.etcd.io/etcd/api/v3/etcdserverpb"
)

type (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/retry_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ import (
"sync"
"time"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

"go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
)

// unaryClientInterceptor returns a new retrying unary client interceptor.
Expand Down
3 changes: 2 additions & 1 deletion client/v3/snapshot/v3_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import (
"time"

"github.com/dustin/go-humanize"
"go.uber.org/zap"

"go.etcd.io/etcd/client/pkg/v3/fileutil"
clientv3 "go.etcd.io/etcd/client/v3"
"go.uber.org/zap"
)

// hasChecksum returns "true" if the file size "n"
Expand Down
7 changes: 4 additions & 3 deletions client/v3/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ import (
"sync"
"time"

pb "go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/api/v3/mvccpb"
v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"

pb "go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/api/v3/mvccpb"
v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
)

const (
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/alarm_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"

"github.com/spf13/cobra"

v3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
Loading

0 comments on commit b606721

Please sign in to comment.