diff --git a/client/agent_endpoint.go b/client/agent_endpoint.go index bfec6302a..ee6e5c113 100644 --- a/client/agent_endpoint.go +++ b/client/agent_endpoint.go @@ -7,11 +7,11 @@ import ( "io" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/command/agent/monitor" "github.com/hashicorp/nomad/command/agent/pprof" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" diff --git a/client/agent_endpoint_test.go b/client/agent_endpoint_test.go index d75af2bc7..e976688d0 100644 --- a/client/agent_endpoint_test.go +++ b/client/agent_endpoint_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client/config" sframer "github.com/hashicorp/nomad/client/lib/streamframer" @@ -20,7 +21,6 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) func TestMonitor_Monitor(t *testing.T) { diff --git a/client/alloc_endpoint.go b/client/alloc_endpoint.go index 815af3f6a..bd3b2750c 100644 --- a/client/alloc_endpoint.go +++ b/client/alloc_endpoint.go @@ -9,6 +9,7 @@ import ( "time" metrics "github.com/armon/go-metrics" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper" @@ -16,7 +17,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" nstructs "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers" - "github.com/hashicorp/go-msgpack/codec" ) // Allocations endpoint is used for interacting with client allocations diff --git a/client/alloc_endpoint_test.go b/client/alloc_endpoint_test.go index 9cbc9b34c..246fa79c7 100644 --- a/client/alloc_endpoint_test.go +++ b/client/alloc_endpoint_test.go @@ -10,6 +10,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client/config" cstructs "github.com/hashicorp/nomad/client/structs" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" "golang.org/x/sys/unix" ) diff --git a/client/fs_endpoint.go b/client/fs_endpoint.go index af0a5455c..d16b05bd0 100644 --- a/client/fs_endpoint.go +++ b/client/fs_endpoint.go @@ -16,6 +16,7 @@ import ( "time" metrics "github.com/armon/go-metrics" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client/allocdir" sframer "github.com/hashicorp/nomad/client/lib/streamframer" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" "github.com/hpcloud/tail/watch" - "github.com/hashicorp/go-msgpack/codec" ) var ( diff --git a/client/fs_endpoint_test.go b/client/fs_endpoint_test.go index 8bff2f494..e1a53c1cb 100644 --- a/client/fs_endpoint_test.go +++ b/client/fs_endpoint_test.go @@ -16,6 +16,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" @@ -28,7 +29,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) // tempAllocDir returns a new alloc dir that is rooted in a temp dir. The caller diff --git a/client/rpc.go b/client/rpc.go index edbe6d42a..dfac3be48 100644 --- a/client/rpc.go +++ b/client/rpc.go @@ -10,12 +10,12 @@ import ( metrics "github.com/armon/go-metrics" "github.com/hashicorp/consul/lib" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/client/servers" inmem "github.com/hashicorp/nomad/helper/codec" "github.com/hashicorp/nomad/helper/pool" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/yamux" - "github.com/hashicorp/go-msgpack/codec" ) // rpcEndpoints holds the RPC endpoints diff --git a/client/state/upgrade.go b/client/state/upgrade.go index f8879dde2..f8dd33ba1 100644 --- a/client/state/upgrade.go +++ b/client/state/upgrade.go @@ -7,9 +7,9 @@ import ( "github.com/boltdb/bolt" hclog "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/helper/boltdd" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" ) // NeedsUpgrade returns true if the BoltDB needs upgrading or false if it is diff --git a/client/testutil/rpc.go b/client/testutil/rpc.go index 62cec6bf6..b6d4c66b7 100644 --- a/client/testutil/rpc.go +++ b/client/testutil/rpc.go @@ -8,10 +8,10 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) // StreamingRPC may be satisfied by client.Client or server.Server. diff --git a/command/agent/agent_endpoint.go b/command/agent/agent_endpoint.go index d6ba7f2f8..c50e4a0fb 100644 --- a/command/agent/agent_endpoint.go +++ b/command/agent/agent_endpoint.go @@ -14,13 +14,13 @@ import ( "github.com/docker/docker/pkg/ioutils" log "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/command/agent/pprof" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/serf/serf" "github.com/mitchellh/copystructure" - "github.com/hashicorp/go-msgpack/codec" ) type Member struct { diff --git a/command/agent/alloc_endpoint.go b/command/agent/alloc_endpoint.go index 80cf24206..839022a54 100644 --- a/command/agent/alloc_endpoint.go +++ b/command/agent/alloc_endpoint.go @@ -12,10 +12,10 @@ import ( "github.com/golang/snappy" "github.com/gorilla/websocket" + "github.com/hashicorp/go-msgpack/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers" - "github.com/hashicorp/go-msgpack/codec" ) const ( diff --git a/command/agent/fs_endpoint.go b/command/agent/fs_endpoint.go index 09bfef512..a186b7da9 100644 --- a/command/agent/fs_endpoint.go +++ b/command/agent/fs_endpoint.go @@ -11,9 +11,9 @@ import ( "strings" "github.com/docker/docker/pkg/ioutils" + "github.com/hashicorp/go-msgpack/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" ) var ( diff --git a/command/agent/http.go b/command/agent/http.go index c660898c0..d2d7f1914 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -18,11 +18,11 @@ import ( "github.com/gorilla/websocket" "github.com/hashicorp/go-connlimit" log "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/helper/noxssrw" "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/structs" "github.com/rs/cors" - "github.com/hashicorp/go-msgpack/codec" ) const ( diff --git a/command/agent/http_test.go b/command/agent/http_test.go index 2676e3118..5659db111 100644 --- a/command/agent/http_test.go +++ b/command/agent/http_test.go @@ -15,6 +15,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/testlog" @@ -24,7 +25,6 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) // makeHTTPServer returns a test server whose logs will be written to diff --git a/helper/boltdd/boltdd.go b/helper/boltdd/boltdd.go index 82b749872..2c221c10a 100644 --- a/helper/boltdd/boltdd.go +++ b/helper/boltdd/boltdd.go @@ -9,8 +9,8 @@ import ( "sync" "github.com/boltdb/bolt" - "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/nomad/nomad/structs" "golang.org/x/crypto/blake2b" ) diff --git a/helper/boltdd/boltdd_test.go b/helper/boltdd/boltdd_test.go index 1702292ec..8425c746b 100644 --- a/helper/boltdd/boltdd_test.go +++ b/helper/boltdd/boltdd_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/boltdb/bolt" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) type testingT interface { diff --git a/helper/pluginutils/hclutils/testing.go b/helper/pluginutils/hclutils/testing.go index 31bc89a30..782d3f68d 100644 --- a/helper/pluginutils/hclutils/testing.go +++ b/helper/pluginutils/hclutils/testing.go @@ -3,6 +3,7 @@ package hclutils import ( "testing" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/hcl" "github.com/hashicorp/hcl/hcl/ast" "github.com/hashicorp/nomad/helper/pluginutils/hclspecutils" @@ -11,7 +12,6 @@ import ( "github.com/hashicorp/nomad/plugins/shared/hclspec" "github.com/mitchellh/mapstructure" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" "github.com/zclconf/go-cty/cty" ) diff --git a/helper/pluginutils/hclutils/util.go b/helper/pluginutils/hclutils/util.go index 158931f28..3e11b2676 100644 --- a/helper/pluginutils/hclutils/util.go +++ b/helper/pluginutils/hclutils/util.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/hcl2/hcl" hjson "github.com/hashicorp/hcl2/hcl/json" "github.com/hashicorp/hcl2/hcldec" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" "github.com/zclconf/go-cty/cty/function/stdlib" diff --git a/nomad/client_agent_endpoint_test.go b/nomad/client_agent_endpoint_test.go index a464f8467..9b869850f 100644 --- a/nomad/client_agent_endpoint_test.go +++ b/nomad/client_agent_endpoint_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client" "github.com/hashicorp/nomad/client/config" @@ -23,7 +24,6 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) func TestMonitor_Monitor_Remote_Client(t *testing.T) { diff --git a/nomad/client_alloc_endpoint.go b/nomad/client_alloc_endpoint.go index a4a290b36..75013d044 100644 --- a/nomad/client_alloc_endpoint.go +++ b/nomad/client_alloc_endpoint.go @@ -9,9 +9,9 @@ import ( metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-msgpack/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper" - "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/client_alloc_endpoint_test.go b/nomad/client_alloc_endpoint_test.go index 4f92d50de..2f865d437 100644 --- a/nomad/client_alloc_endpoint_test.go +++ b/nomad/client_alloc_endpoint_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client" @@ -22,7 +23,6 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/kr/pretty" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) func TestClientAllocations_GarbageCollectAll_Local(t *testing.T) { diff --git a/nomad/client_fs_endpoint.go b/nomad/client_fs_endpoint.go index 3146b2aab..fda308848 100644 --- a/nomad/client_fs_endpoint.go +++ b/nomad/client_fs_endpoint.go @@ -12,10 +12,10 @@ import ( log "github.com/hashicorp/go-hclog" cstructs "github.com/hashicorp/nomad/client/structs" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" ) // FileSystem endpoint is used for accessing the logs and filesystem of diff --git a/nomad/client_fs_endpoint_test.go b/nomad/client_fs_endpoint_test.go index cb00ad9c1..882d6dbbe 100644 --- a/nomad/client_fs_endpoint_test.go +++ b/nomad/client_fs_endpoint_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + codec "github.com/hashicorp/go-msgpack/codec" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/client" @@ -18,7 +19,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/require" - codec "github.com/hashicorp/go-msgpack/codec" ) func TestClientFS_List_Local(t *testing.T) { diff --git a/nomad/client_rpc.go b/nomad/client_rpc.go index b73cdbcea..1c3471d19 100644 --- a/nomad/client_rpc.go +++ b/nomad/client_rpc.go @@ -6,12 +6,12 @@ import ( "net" "time" + "github.com/hashicorp/go-msgpack/codec" multierror "github.com/hashicorp/go-multierror" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/helper/pool" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/yamux" - "github.com/hashicorp/go-msgpack/codec" ) // nodeConnState is used to track connection information about a Nomad Client. diff --git a/nomad/fsm.go b/nomad/fsm.go index 900fac573..d6900a1c7 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -10,13 +10,13 @@ import ( metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/scheduler" "github.com/hashicorp/raft" "github.com/pkg/errors" - "github.com/hashicorp/go-msgpack/codec" ) const ( diff --git a/nomad/fsm_registry_oss.go b/nomad/fsm_registry_oss.go index 79fea028e..3ac0351ae 100644 --- a/nomad/fsm_registry_oss.go +++ b/nomad/fsm_registry_oss.go @@ -3,8 +3,8 @@ package nomad import ( - "github.com/hashicorp/raft" "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/raft" ) // registerLogAppliers is a no-op for open-source only FSMs. diff --git a/nomad/plan_normalization_test.go b/nomad/plan_normalization_test.go index 863abd6ae..ee478f8d4 100644 --- a/nomad/plan_normalization_test.go +++ b/nomad/plan_normalization_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/assert" - "github.com/hashicorp/go-msgpack/codec" ) // This test compares the size of the normalized + OmitEmpty raft plan log entry diff --git a/nomad/rpc.go b/nomad/rpc.go index de4240ba4..f9d488399 100644 --- a/nomad/rpc.go +++ b/nomad/rpc.go @@ -21,13 +21,13 @@ import ( memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/consul/lib" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/helper/pool" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/raft" "github.com/hashicorp/yamux" - "github.com/hashicorp/go-msgpack/codec" ) const ( diff --git a/nomad/rpc_test.go b/nomad/rpc_test.go index 69f0c89dd..bee07a9f5 100644 --- a/nomad/rpc_test.go +++ b/nomad/rpc_test.go @@ -12,6 +12,7 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper/pool" @@ -26,7 +27,6 @@ import ( "github.com/hashicorp/yamux" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) // rpcClient is a test helper method to return a ClientCodec to use to make rpc diff --git a/nomad/timetable_test.go b/nomad/timetable_test.go index 5798a3750..b5377fbf3 100644 --- a/nomad/timetable_test.go +++ b/nomad/timetable_test.go @@ -8,8 +8,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/nomad/nomad/structs" ) func TestTimeTable(t *testing.T) { diff --git a/plugins/base/plugin.go b/plugins/base/plugin.go index 057c99a91..74bcaa0c7 100644 --- a/plugins/base/plugin.go +++ b/plugins/base/plugin.go @@ -5,9 +5,9 @@ import ( "context" "reflect" + "github.com/hashicorp/go-msgpack/codec" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/plugins/base/proto" - "github.com/hashicorp/go-msgpack/codec" "google.golang.org/grpc" ) diff --git a/plugins/drivers/testutils/testing_test.go b/plugins/drivers/testutils/testing_test.go index d83091eda..e8e75e3a7 100644 --- a/plugins/drivers/testutils/testing_test.go +++ b/plugins/drivers/testutils/testing_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" + "github.com/hashicorp/go-msgpack/codec" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers" pstructs "github.com/hashicorp/nomad/plugins/shared/structs" "github.com/stretchr/testify/require" - "github.com/hashicorp/go-msgpack/codec" ) var _ drivers.DriverPlugin = (*MockDriver)(nil)