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

Revendor etcd library to v3.4.13 #269

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ Copyright 2015 Steve Francia.
Apache 2 license (https://github.com/spf13/cobra/blob/master/LICENSE.txt)

Etcd.
https://github.com/coreos/etcd.
https://github.com/etcd-io/etcd.
Copyright 2017 The etcd Authors.
Apache 2 license (https://github.com/coreos/etcd/blob/master/LICENSE)
Apache 2 license (https://github.com/etcd-io/etcd/blob/master/LICENSE)

Cron.
https://github.com/robfig/cron.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Etcd-backup-restore is collection of components to backup and restore the [etcd]
* [Tests](doc/development/tests.md)
* [Adding support for a new object store provider](doc/development/new_cp_support.md)

[etcd]: https://github.com/coreos/etcd
[etcd]: https://github.com/etcd-io/etcd
2 changes: 1 addition & 1 deletion cmd/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"context"
"fmt"

"github.com/coreos/etcd/pkg/types"
"github.com/gardener/etcd-backup-restore/pkg/initializer"
"github.com/gardener/etcd-backup-restore/pkg/initializer/validator"
"github.com/gardener/etcd-backup-restore/pkg/snapshot/restorer"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"go.etcd.io/etcd/pkg/types"
)

// NewInitializeCommand returns the command to initialize etcd by validating the data
Expand Down
2 changes: 1 addition & 1 deletion cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
"context"
"fmt"

"github.com/coreos/etcd/pkg/types"
"github.com/gardener/etcd-backup-restore/pkg/miscellaneous"
"github.com/gardener/etcd-backup-restore/pkg/snapshot/restorer"
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"go.etcd.io/etcd/pkg/types"
)

// NewRestoreCommand returns the command to restore
Expand Down
2 changes: 1 addition & 1 deletion doc/proposals/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ Sidecar container has two components

We want to develop incremental/continuous etcd backups (write watch logs in between full backups), to ensure our backups are fresh enough to avoid discrepancies between etcd backup and external/physical world.

[etcd]: https://github.com/coreos/etcd
[etcd]: https://github.com/etcd-io/etcd
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ require (
github.com/aliyun/aliyun-oss-go-sdk v2.0.3+incompatible
github.com/aws/aws-sdk-go v1.32.6
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/coreos/bbolt v1.3.3
github.com/coreos/etcd v3.3.22+incompatible
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 // indirect
github.com/ghodss/yaml v1.0.0
Expand All @@ -30,10 +28,11 @@ require (
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 // indirect
go.etcd.io/bbolt v1.3.3
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go.opencensus.io v0.22.1 // indirect
golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect
google.golang.org/api v0.14.0
helm.sh/helm/v3 v3.2.4
Expand All @@ -47,8 +46,8 @@ replace (
// Ref: https://github.com/Azure/go-autorest/issues/414
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible
// Etcd issue Ref: https://github.com/etcd-io/etcd/issues/12068
github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.3
github.com/coreos/etcd => github.com/coreos/etcd v3.3.22+incompatible
// Etcd 3.4.x vendoring issue Ref: https://github.com/etcd-io/etcd/issues/11154#issuecomment-677940701
github.com/coreos/etcd => go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b // ae9734ed278b is the SHA for git tag v3.4.13
github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309
// Ref: https://github.com/etcd-io/etcd/issues/11992
github.com/golang/protobuf => github.com/golang/protobuf v1.3.5
Expand Down
15 changes: 8 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
Expand All @@ -133,10 +134,7 @@ github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.22+incompatible h1:AnRMUyVdVvh1k7lHe61YEd227+CLoNogQuAypztGSK4=
github.com/coreos/etcd v3.3.22+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
Expand Down Expand Up @@ -672,7 +670,10 @@ github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wK
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b h1:3kC4J3eQF6p1UEfQTkC67eEeb3rTk+shQqdX6tFyq9Q=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
Expand Down Expand Up @@ -721,6 +722,7 @@ golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMx
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac h1:8R1esu+8QioDxo4E4mX6bFztO+dMTM49DNAaWfO5OeY=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand Down Expand Up @@ -834,6 +836,7 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
Expand Down Expand Up @@ -926,6 +929,7 @@ helm.sh/helm/v3 v3.2.4/go.mod h1:ZaXz/vzktgwjyGGFbUWtIQkscfE7WYoRGP2szqAFHR0=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ=
Expand All @@ -952,9 +956,6 @@ k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDN
k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
k8s.io/kubectl v0.18.0 h1:hu52Ndq/d099YW+3sS3VARxFz61Wheiq8K9S7oa82Dk=
k8s.io/kubectl v0.18.0/go.mod h1:LOkWx9Z5DXMEg5KtOjHhRiC1fqJPLyCr3KtQgEolCkU=
k8s.io/kubectl v0.18.5 h1:htctXnWqcF1VBkuzbWINqnwx/rM7byH9o2ZuHntlbJo=
k8s.io/kubectl v0.18.6 h1:IFPNuLPkZ59vSGQzynXY8XGz9yuOSRpkJupnobdYvO4=
k8s.io/kubelet v0.16.8/go.mod h1:mzDpnryQg2dlB6V3/WAgb1baIamiICtWpXMFrPOFh6I=
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
k8s.io/metrics v0.18.0/go.mod h1:8aYTW18koXqjLVKL7Ds05RPMX9ipJZI3mywYvBOxXd4=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU=
Expand Down
2 changes: 1 addition & 1 deletion pkg/defragmentor/defragmentor_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"testing"
"time"

"github.com/coreos/etcd/embed"
"github.com/gardener/etcd-backup-restore/test/utils"
"github.com/sirupsen/logrus"
"go.etcd.io/etcd/embed"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
6 changes: 3 additions & 3 deletions pkg/etcdutil/etcdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"crypto/tls"

"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/transport"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/pkg/transport"
)

// GetTLSClientForEtcd creates an etcd client using the TLS config params.
Expand All @@ -38,7 +38,7 @@ func GetTLSClientForEtcd(tlsConfig *EtcdConnectionConfig) (*clientv3.Client, err
}

if tlsConfig.CaFile != "" {
tlsinfo.CAFile = tlsConfig.CaFile
tlsinfo.TrustedCAFile = tlsConfig.CaFile
cfgtls = &tlsinfo
}

Expand Down
6 changes: 4 additions & 2 deletions pkg/initializer/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"go.uber.org/zap"
)

// Initialize has the following steps:
Expand Down Expand Up @@ -68,7 +69,7 @@ func (e *EtcdInitializer) Initialize(mode validator.Mode, failBelowRevision int6

//NewInitializer creates an etcd initializer object.
func NewInitializer(options *restorer.RestoreOptions, snapstoreConfig *snapstore.Config, logger *logrus.Logger) *EtcdInitializer {

zapLogger, _ := zap.NewProduction()
etcdInit := &EtcdInitializer{
Config: &Config{
SnapstoreConfig: snapstoreConfig,
Expand All @@ -79,7 +80,8 @@ func NewInitializer(options *restorer.RestoreOptions, snapstoreConfig *snapstore
DataDir: options.Config.RestoreDataDir,
SnapstoreConfig: snapstoreConfig,
},
Logger: logger,
Logger: logger,
ZapLogger: zapLogger,
},
Logger: logger,
}
Expand Down
21 changes: 11 additions & 10 deletions pkg/initializer/validator/datavalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ import (
"os"
"path/filepath"

bolt "github.com/coreos/bbolt"
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/wal"
"github.com/coreos/etcd/wal/walpb"
"github.com/gardener/etcd-backup-restore/pkg/miscellaneous"
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/sirupsen/logrus"
bolt "go.etcd.io/bbolt"
"go.etcd.io/etcd/etcdserver/api/snap"
"go.etcd.io/etcd/raft/raftpb"
"go.etcd.io/etcd/wal"
"go.etcd.io/etcd/wal/walpb"
"go.uber.org/zap"
)

var (
Expand Down Expand Up @@ -129,7 +130,7 @@ func (d *DataValidator) checkForDataCorruption() error {
walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term
}
d.Logger.Info("Verifying WAL directory...")
if err := verifyWALDir(d.walDir(), walsnap); err != nil {
if err := verifyWALDir(d.ZapLogger, d.walDir(), walsnap); err != nil {
return fmt.Errorf("Invalid wal files: %v", err)
}
d.Logger.Info("Verifying DB file...")
Expand Down Expand Up @@ -167,22 +168,22 @@ func directoryExist(dir string) (bool, error) {
}

func (d *DataValidator) verifySnapDir() (*raftpb.Snapshot, error) {
ssr := snap.New(d.snapDir())
ssr := snap.New(d.ZapLogger, d.snapDir())
return ssr.Load()
}

func verifyWALDir(waldir string, snap walpb.Snapshot) error {
func verifyWALDir(logger *zap.Logger, waldir string, snap walpb.Snapshot) error {
var err error

repaired := false
for {
if err = wal.Verify(waldir, snap); err != nil {
if err = wal.Verify(logger, waldir, snap); err != nil {
// we can only repair ErrUnexpectedEOF and we never repair twice.
if repaired || err != io.ErrUnexpectedEOF {
fmt.Printf("read wal error (%v) and cannot be repaired.\n", err)
return err
}
if !wal.Repair(waldir) {
if !wal.Repair(logger, waldir) {
fmt.Printf("WAL error (%v) cannot be repaired.\n", err)
return err
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/initializer/validator/datavalidator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/gardener/etcd-backup-restore/test/utils"
"go.uber.org/zap"

. "github.com/gardener/etcd-backup-restore/pkg/initializer/validator"
. "github.com/onsi/ginkgo"
Expand All @@ -44,12 +45,14 @@ var _ = Describe("Running Datavalidator", func() {
Provider: "Local",
}

zapLogger, _ := zap.NewProduction()
validator = &DataValidator{
Config: &Config{
DataDir: restoreDataDir,
SnapstoreConfig: snapstoreConfig,
},
Logger: logger.Logger,
Logger: logger.Logger,
ZapLogger: zapLogger,
}
})

Expand Down
6 changes: 4 additions & 2 deletions pkg/initializer/validator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package validator
import (
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/sirupsen/logrus"
"go.uber.org/zap"
)

// DataDirStatus represents the status of the etcd data directory.
Expand Down Expand Up @@ -61,8 +62,9 @@ type Config struct {

// DataValidator contains implements Validator interface to perform data validation.
type DataValidator struct {
Config *Config
Logger *logrus.Logger
Config *Config
Logger *logrus.Logger
ZapLogger *zap.Logger
}

// Validator is the interface for data validation actions.
Expand Down
2 changes: 1 addition & 1 deletion pkg/initializer/validator/validator_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"testing"
"time"

"github.com/coreos/etcd/embed"
"github.com/gardener/etcd-backup-restore/pkg/etcdutil"
"github.com/gardener/etcd-backup-restore/pkg/snapshot/snapshotter"
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
"github.com/gardener/etcd-backup-restore/test/utils"
"github.com/sirupsen/logrus"
"go.etcd.io/etcd/embed"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/backuprestoreserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/gardener/etcd-backup-restore/pkg/metrics"
"github.com/prometheus/client_golang/prometheus"

"github.com/coreos/etcd/pkg/types"
"github.com/gardener/etcd-backup-restore/pkg/defragmentor"
"github.com/gardener/etcd-backup-restore/pkg/etcdutil"
"github.com/gardener/etcd-backup-restore/pkg/initializer"
Expand All @@ -34,6 +33,7 @@ import (
"github.com/gardener/etcd-backup-restore/pkg/snapstore"
cron "github.com/robfig/cron/v3"
"github.com/sirupsen/logrus"
"go.etcd.io/etcd/pkg/types"
)

// BackupRestoreServer holds the details for backup-restore server.
Expand Down
2 changes: 1 addition & 1 deletion pkg/snapshot/restorer/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"path"

"github.com/coreos/etcd/pkg/types"
flag "github.com/spf13/pflag"
"go.etcd.io/etcd/pkg/types"
)

// NewRestorationConfig returns the restoration config.
Expand Down
Loading