Skip to content

Commit

Permalink
go.mod,backend: update coreos/etcd dependency to release-3.4 branch
Browse files Browse the repository at this point in the history
etcd rewrote its import path from coreos/etcd to go.etcd.io/etcd.
Changed the imports path in this commit, which also updates the code
version.

This lets us remove the github.com/ugorji/go/codec dependency, which
was pinned to a fairly old version. The net change is a loss of 30,000
lines of code in the vendor directory. (I first noticed this problem
because the outdated go/codec dependency was causing a dependency
failure when I tried to put Terraform and another project in the same
vendor directory.)

Note the version shows up funkily in go.mod, but I verified
visually it's the same commit as the "release-3.4" tag in
github.com/coreos/etcd. The etcd team plans to fix the release version
tagging in v3.5, which should be released soon.
  • Loading branch information
kevinburke1 committed Feb 8, 2021
1 parent e39abbf commit 9bb961d
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 93 deletions.
2 changes: 1 addition & 1 deletion backend/remote-state/etcdv2/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"context"
"strings"

etcdapi "github.com/coreos/etcd/client"
"github.com/hashicorp/terraform/backend"
"github.com/hashicorp/terraform/internal/legacy/helper/schema"
"github.com/hashicorp/terraform/states/remote"
"github.com/hashicorp/terraform/states/statemgr"
etcdapi "go.etcd.io/etcd/client"
)

func New() backend.Backend {
Expand Down
2 changes: 1 addition & 1 deletion backend/remote-state/etcdv2/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"crypto/md5"
"fmt"

etcdapi "github.com/coreos/etcd/client"
"github.com/hashicorp/terraform/states/remote"
etcdapi "go.etcd.io/etcd/client"
)

// EtcdClient is a remote client that stores data in etcd.
Expand Down
4 changes: 2 additions & 2 deletions backend/remote-state/etcdv3/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package etcd
import (
"context"

etcdv3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/transport"
"github.com/hashicorp/terraform/backend"
"github.com/hashicorp/terraform/internal/legacy/helper/schema"
etcdv3 "go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/pkg/transport"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion backend/remote-state/etcdv3/backend_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"
"strings"

etcdv3 "github.com/coreos/etcd/clientv3"
etcdv3 "go.etcd.io/etcd/clientv3"

"github.com/hashicorp/terraform/backend"
"github.com/hashicorp/terraform/states"
Expand Down
2 changes: 1 addition & 1 deletion backend/remote-state/etcdv3/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"
"time"

etcdv3 "github.com/coreos/etcd/clientv3"
"github.com/hashicorp/terraform/backend"
etcdv3 "go.etcd.io/etcd/clientv3"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions backend/remote-state/etcdv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"sync"
"time"

etcdv3 "github.com/coreos/etcd/clientv3"
etcdv3sync "github.com/coreos/etcd/clientv3/concurrency"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/terraform/states/remote"
"github.com/hashicorp/terraform/states/statemgr"
etcdv3 "go.etcd.io/etcd/clientv3"
etcdv3sync "go.etcd.io/etcd/clientv3/concurrency"
)

const (
Expand Down
20 changes: 2 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@ require (
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/bgentry/speakeasy v0.1.0
github.com/bmatcuk/doublestar v1.1.5
github.com/boltdb/bolt v1.3.1 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/coreos/bbolt v1.3.0 // indirect
github.com/coreos/etcd v3.3.10+incompatible
github.com/coreos/go-semver v0.2.0 // indirect
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf
github.com/davecgh/go-spew v1.1.1
github.com/dylanmei/iso8601 v0.1.0 // indirect
github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1
Expand All @@ -41,10 +36,6 @@ require (
github.com/gophercloud/gophercloud v0.10.1-0.20200424014253-c3bfe50899e5
github.com/gophercloud/utils v0.0.0-20200423144003-7c72efc7435d
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.com/gorilla/websocket v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.8.5 // indirect
github.com/hashicorp/aws-sdk-go-base v0.6.0
github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089
github.com/hashicorp/errwrap v1.0.0
Expand All @@ -71,7 +62,6 @@ require (
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/jmespath/go-jmespath v0.4.0
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926
github.com/jtolds/gls v4.2.1+incompatible // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
Expand Down Expand Up @@ -99,25 +89,19 @@ require (
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
github.com/pkg/errors v0.9.1
github.com/posener/complete v1.2.1
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/afero v1.2.2
github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect
github.com/tombuildsstuff/giovanni v0.12.0
github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect
github.com/xanzy/ssh-agent v0.2.1
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
github.com/zclconf/go-cty v1.7.1
github.com/zclconf/go-cty-yaml v1.0.2
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
go.etcd.io/etcd v0.5.0-alpha.5.0.20210123184945-d51c6c689ba3
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/mod v0.3.0
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
Expand Down
Loading

0 comments on commit 9bb961d

Please sign in to comment.