From ea87b6824d009870a593a8c4dc5cfae10207318e Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 17 Aug 2021 11:27:37 -0500 Subject: [PATCH] Upgrade bolt to bbolt boltdb/bolt is no longer a maintained project. bbolt is the CoreOS fork that the author of boltdb suggests using as a replacement. --- go.mod | 1 + go.sum | 2 ++ internal/client/server.go | 2 +- internal/server/singleprocess/service.go | 2 +- internal/server/singleprocess/state/basis.go | 2 +- internal/server/singleprocess/state/config.go | 2 +- internal/server/singleprocess/state/db.go | 2 +- internal/server/singleprocess/state/generic_operation.go | 3 ++- internal/server/singleprocess/state/hmac.go | 2 +- internal/server/singleprocess/state/job.go | 2 +- internal/server/singleprocess/state/project.go | 2 +- internal/server/singleprocess/state/server_config.go | 2 +- internal/server/singleprocess/state/server_id.go | 2 +- internal/server/singleprocess/state/snapshot.go | 2 +- internal/server/singleprocess/state/state.go | 2 +- internal/server/singleprocess/state/target.go | 2 +- internal/server/singleprocess/state/testing.go | 2 +- internal/server/singleprocess/testing.go | 2 +- 18 files changed, 20 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 467dc9d29..8312859f1 100644 --- a/go.mod +++ b/go.mod @@ -87,6 +87,7 @@ require ( github.com/stretchr/testify v1.6.1 github.com/zclconf/go-cty v1.5.1 github.com/zclconf/go-cty-yaml v1.0.2 + go.etcd.io/bbolt v1.3.6 // indirect golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e diff --git a/go.sum b/go.sum index bf38571af..9143f6804 100644 --- a/go.sum +++ b/go.sum @@ -1302,6 +1302,8 @@ gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2 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/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= diff --git a/internal/client/server.go b/internal/client/server.go index 294d068e5..c244b205c 100644 --- a/internal/client/server.go +++ b/internal/client/server.go @@ -8,10 +8,10 @@ import ( "runtime" "time" - "github.com/boltdb/bolt" "github.com/golang/protobuf/ptypes/empty" "github.com/hashicorp/go-plugin" "github.com/hashicorp/vagrant-plugin-sdk/helper/paths" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc" "github.com/hashicorp/vagrant/internal/protocolversion" diff --git a/internal/server/singleprocess/service.go b/internal/server/singleprocess/service.go index d45b515ba..bd3f2e025 100644 --- a/internal/server/singleprocess/service.go +++ b/internal/server/singleprocess/service.go @@ -1,7 +1,7 @@ package singleprocess import ( - "github.com/boltdb/bolt" + bolt "go.etcd.io/bbolt" "github.com/hashicorp/go-hclog" diff --git a/internal/server/singleprocess/state/basis.go b/internal/server/singleprocess/state/basis.go index 8d77bd32c..e2a032fa1 100644 --- a/internal/server/singleprocess/state/basis.go +++ b/internal/server/singleprocess/state/basis.go @@ -3,9 +3,9 @@ package state import ( "strings" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/config.go b/internal/server/singleprocess/state/config.go index 664bd9bf7..f797f07cf 100644 --- a/internal/server/singleprocess/state/config.go +++ b/internal/server/singleprocess/state/config.go @@ -4,10 +4,10 @@ import ( "fmt" "sort" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/hashicorp/go-memdb" "github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk" + bolt "go.etcd.io/bbolt" "github.com/hashicorp/vagrant/internal/server/proto/vagrant_server" serversort "github.com/hashicorp/vagrant/internal/server/sort" diff --git a/internal/server/singleprocess/state/db.go b/internal/server/singleprocess/state/db.go index b5de8a15d..8ff0fc574 100644 --- a/internal/server/singleprocess/state/db.go +++ b/internal/server/singleprocess/state/db.go @@ -4,8 +4,8 @@ import ( "strconv" "strings" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/server/singleprocess/state/generic_operation.go b/internal/server/singleprocess/state/generic_operation.go index cab37a524..2a502296d 100644 --- a/internal/server/singleprocess/state/generic_operation.go +++ b/internal/server/singleprocess/state/generic_operation.go @@ -8,11 +8,12 @@ import ( "sync/atomic" "time" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/hashicorp/go-memdb" "github.com/mitchellh/go-testing-interface" + bolt "go.etcd.io/bbolt" + // "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/hmac.go b/internal/server/singleprocess/state/hmac.go index 619a8a891..88d027da1 100644 --- a/internal/server/singleprocess/state/hmac.go +++ b/internal/server/singleprocess/state/hmac.go @@ -5,9 +5,9 @@ import ( "io" "sync/atomic" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "github.com/hashicorp/vagrant/internal/server/proto/vagrant_server" ) diff --git a/internal/server/singleprocess/state/job.go b/internal/server/singleprocess/state/job.go index c930084d0..b795e6e80 100644 --- a/internal/server/singleprocess/state/job.go +++ b/internal/server/singleprocess/state/job.go @@ -7,11 +7,11 @@ import ( "sort" "time" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/timestamp" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/project.go b/internal/server/singleprocess/state/project.go index 95df4e3b6..edf92f91e 100644 --- a/internal/server/singleprocess/state/project.go +++ b/internal/server/singleprocess/state/project.go @@ -3,9 +3,9 @@ package state import ( "strings" - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/server_config.go b/internal/server/singleprocess/state/server_config.go index 37bbe8095..62602decb 100644 --- a/internal/server/singleprocess/state/server_config.go +++ b/internal/server/singleprocess/state/server_config.go @@ -1,9 +1,9 @@ package state import ( - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "github.com/hashicorp/vagrant/internal/server/proto/vagrant_server" ) diff --git a/internal/server/singleprocess/state/server_id.go b/internal/server/singleprocess/state/server_id.go index d4c54451a..232bd0aef 100644 --- a/internal/server/singleprocess/state/server_id.go +++ b/internal/server/singleprocess/state/server_id.go @@ -1,7 +1,7 @@ package state import ( - "github.com/boltdb/bolt" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/internal/server/singleprocess/state/snapshot.go b/internal/server/singleprocess/state/snapshot.go index 78244f460..b63fca239 100644 --- a/internal/server/singleprocess/state/snapshot.go +++ b/internal/server/singleprocess/state/snapshot.go @@ -13,10 +13,10 @@ import ( "strings" "time" - "github.com/boltdb/bolt" "github.com/gofrs/flock" "github.com/hashicorp/go-hclog" "github.com/natefinch/atomic" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/state.go b/internal/server/singleprocess/state/state.go index d032a22a7..f77403ed1 100644 --- a/internal/server/singleprocess/state/state.go +++ b/internal/server/singleprocess/state/state.go @@ -8,10 +8,10 @@ import ( "reflect" "time" - "github.com/boltdb/bolt" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" "github.com/oklog/ulid/v2" + bolt "go.etcd.io/bbolt" ) // The global variables below can be set by init() functions of other diff --git a/internal/server/singleprocess/state/target.go b/internal/server/singleprocess/state/target.go index 792f416d7..0d45c3062 100644 --- a/internal/server/singleprocess/state/target.go +++ b/internal/server/singleprocess/state/target.go @@ -1,10 +1,10 @@ package state import ( - "github.com/boltdb/bolt" "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/hashicorp/go-memdb" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/server/singleprocess/state/testing.go b/internal/server/singleprocess/state/testing.go index b6f345ef1..4c494de4e 100644 --- a/internal/server/singleprocess/state/testing.go +++ b/internal/server/singleprocess/state/testing.go @@ -5,13 +5,13 @@ import ( "os" "path/filepath" - "github.com/boltdb/bolt" "github.com/hashicorp/go-hclog" "github.com/hashicorp/vagrant-plugin-sdk/proto/vagrant_plugin_sdk" "github.com/hashicorp/vagrant/internal/server/proto/vagrant_server" serverptypes "github.com/hashicorp/vagrant/internal/server/ptypes" "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" + bolt "go.etcd.io/bbolt" ) // TestState returns an initialized State for testing. diff --git a/internal/server/singleprocess/testing.go b/internal/server/singleprocess/testing.go index 65e52ae37..9cd916acb 100644 --- a/internal/server/singleprocess/testing.go +++ b/internal/server/singleprocess/testing.go @@ -6,10 +6,10 @@ import ( "os" "path/filepath" - "github.com/boltdb/bolt" "github.com/imdario/mergo" "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" + bolt "go.etcd.io/bbolt" "github.com/hashicorp/vagrant/internal/server" pb "github.com/hashicorp/vagrant/internal/server/proto/vagrant_server"