From 8a98520d56eed3848096734487d8bd3eb9162a65 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 17 Apr 2023 14:02:05 -0700 Subject: [PATCH] hashicorp/go-msgpack v2 (#16810) * Upgrade from hashicorp/go-msgpack v1.1.5 to v2.1.0 Fixes #16808 * Update hashicorp/net-rpc-msgpackrpc to v2 to match go-msgpack * deps: use go-msgpack v2.0.0 go-msgpack v2.1.0 includes some code changes that we will need to investigate furthere to assess its impact on Nomad, so keeping this dependency on v2.0.0 for now since it's no-op. --------- Co-authored-by: Luiz Aoqui --- GNUmakefile | 2 +- client/agent_endpoint.go | 2 +- client/agent_endpoint_test.go | 2 +- client/alloc_endpoint.go | 2 +- client/alloc_endpoint_test.go | 2 +- client/fs_endpoint.go | 2 +- client/fs_endpoint_test.go | 2 +- client/rpc.go | 2 +- client/state/upgrade.go | 2 +- client/structs/structs.go | 2 +- client/testutil/rpc.go | 2 +- command/agent/agent_endpoint.go | 2 +- command/agent/agent_endpoint_test.go | 2 +- command/agent/alloc_endpoint.go | 2 +- command/agent/event_endpoint.go | 2 +- command/agent/fs_endpoint.go | 2 +- command/agent/http.go | 2 +- command/agent/http_test.go | 2 +- command/agent/operator_endpoint.go | 2 +- command/data_format.go | 2 +- go.mod | 5 +++-- go.sum | 9 +++++---- helper/boltdd/boltdd.go | 2 +- helper/boltdd/boltdd_test.go | 2 +- helper/pluginutils/hclutils/testing.go | 2 +- helper/pluginutils/hclutils/types.go | 2 +- helper/pluginutils/hclutils/util.go | 2 +- helper/pool/pool.go | 2 +- helper/raftutil/msgpack.go | 2 +- helper/raftutil/msgpack_test.go | 2 +- helper/raftutil/state.go | 2 +- helper/snapshot/snapshot_test.go | 2 +- nomad/acl_endpoint_test.go | 2 +- nomad/acl_test.go | 2 +- nomad/alloc_endpoint_test.go | 2 +- nomad/client_agent_endpoint.go | 2 +- nomad/client_agent_endpoint_test.go | 2 +- nomad/client_alloc_endpoint.go | 2 +- nomad/client_alloc_endpoint_test.go | 4 ++-- nomad/client_csi_endpoint_test.go | 2 +- nomad/client_fs_endpoint.go | 2 +- nomad/client_fs_endpoint_test.go | 4 ++-- nomad/client_rpc.go | 4 ++-- nomad/client_stats_endpoint_test.go | 2 +- nomad/core_sched_test.go | 2 +- nomad/csi_endpoint_test.go | 2 +- nomad/deployment_endpoint_test.go | 2 +- nomad/drainer_int_test.go | 7 +++---- nomad/encrypter_test.go | 2 +- nomad/eval_broker_test.go | 2 +- nomad/eval_endpoint_test.go | 2 +- nomad/event_endpoint.go | 2 +- nomad/event_endpoint_test.go | 4 ++-- nomad/fsm.go | 2 +- nomad/fsm_registry_oss.go | 2 +- nomad/heartbeat_test.go | 2 +- nomad/job_endpoint_oss_test.go | 2 +- nomad/job_endpoint_test.go | 2 +- nomad/keyring_endpoint_test.go | 2 +- nomad/namespace_endpoint_test.go | 2 +- nomad/node_endpoint_test.go | 2 +- nomad/operator_endpoint.go | 2 +- nomad/operator_endpoint_test.go | 4 ++-- nomad/periodic_endpoint_test.go | 2 +- nomad/plan_endpoint_test.go | 2 +- nomad/plan_normalization_test.go | 2 +- nomad/regions_endpoint_test.go | 2 +- nomad/rpc.go | 2 +- nomad/rpc_test.go | 4 ++-- nomad/scaling_endpoint_test.go | 2 +- nomad/search_endpoint_test.go | 2 +- nomad/server_test.go | 2 +- nomad/service_registration_endpoint_test.go | 2 +- nomad/status_endpoint_test.go | 2 +- nomad/stream/ndjson.go | 2 +- nomad/structs/encoding.go | 2 +- nomad/structs/generate.sh | 2 +- nomad/structs/handlers.go | 2 +- nomad/structs/structs.go | 2 +- nomad/system_endpoint_test.go | 2 +- nomad/timetable.go | 2 +- nomad/timetable_test.go | 2 +- nomad/variables_endpoint_test.go | 2 +- plugins/base/plugin.go | 2 +- plugins/drivers/testutils/testing_test.go | 2 +- 85 files changed, 99 insertions(+), 98 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index e02a84a0f..12e0b1a41 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -138,7 +138,7 @@ deps: ## Install build and development dependencies go install gotest.tools/gotestsum@v1.10.0 go install github.com/hashicorp/hcl/v2/cmd/hclfmt@d0c4fa8b0bbc2e4eeccd1ed2a32c2089ed8c5cf1 go install github.com/golang/protobuf/protoc-gen-go@v1.3.4 - go install github.com/hashicorp/go-msgpack/codec/codecgen@v1.1.5 + go install github.com/hashicorp/go-msgpack/v2/codec/codecgen@v2.0.0 go install github.com/bufbuild/buf/cmd/buf@v0.36.0 go install github.com/hashicorp/go-changelog/cmd/changelog-build@latest go install golang.org/x/tools/cmd/stringer@v0.1.12 diff --git a/client/agent_endpoint.go b/client/agent_endpoint.go index e0d4636f3..090a7facf 100644 --- a/client/agent_endpoint.go +++ b/client/agent_endpoint.go @@ -10,7 +10,7 @@ import ( "io" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/command/agent/host" "github.com/hashicorp/nomad/command/agent/monitor" diff --git a/client/agent_endpoint_test.go b/client/agent_endpoint_test.go index 86fd0c18e..811e41296 100644 --- a/client/agent_endpoint_test.go +++ b/client/agent_endpoint_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/config" diff --git a/client/alloc_endpoint.go b/client/alloc_endpoint.go index 7b4aa90c4..6cac13689 100644 --- a/client/alloc_endpoint.go +++ b/client/alloc_endpoint.go @@ -12,7 +12,7 @@ import ( "time" "github.com/armon/go-metrics" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper/pointer" diff --git a/client/alloc_endpoint_test.go b/client/alloc_endpoint_test.go index cf59d6ccb..65a0aa837 100644 --- a/client/alloc_endpoint_test.go +++ b/client/alloc_endpoint_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/config" diff --git a/client/fs_endpoint.go b/client/fs_endpoint.go index df2a46beb..ba3230ed3 100644 --- a/client/fs_endpoint.go +++ b/client/fs_endpoint.go @@ -19,7 +19,7 @@ import ( "time" metrics "github.com/armon/go-metrics" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hpcloud/tail/watch" "github.com/hashicorp/nomad/acl" diff --git a/client/fs_endpoint_test.go b/client/fs_endpoint_test.go index ad52c69d3..a860b9dc7 100644 --- a/client/fs_endpoint_test.go +++ b/client/fs_endpoint_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/allocdir" diff --git a/client/rpc.go b/client/rpc.go index 860fb996b..3b68043c4 100644 --- a/client/rpc.go +++ b/client/rpc.go @@ -12,7 +12,7 @@ import ( "time" metrics "github.com/armon/go-metrics" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/client/servers" "github.com/hashicorp/nomad/helper" inmem "github.com/hashicorp/nomad/helper/codec" diff --git a/client/state/upgrade.go b/client/state/upgrade.go index f6e7ab3a3..bd3d3c4ae 100644 --- a/client/state/upgrade.go +++ b/client/state/upgrade.go @@ -10,7 +10,7 @@ import ( "os" hclog "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/client/dynamicplugins" "github.com/hashicorp/nomad/helper/boltdd" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/structs/structs.go b/client/structs/structs.go index 103e166fc..b08ee3bc1 100644 --- a/client/structs/structs.go +++ b/client/structs/structs.go @@ -3,7 +3,7 @@ package structs -//go:generate codecgen -c github.com/hashicorp/go-msgpack/codec -st codec -d 102 -t codegen_generated -o structs.generated.go structs.go +//go:generate codecgen -c github.com/hashicorp/go-msgpack/v2/codec -st codec -d 102 -t codegen_generated -o structs.generated.go structs.go import ( "errors" diff --git a/client/testutil/rpc.go b/client/testutil/rpc.go index c1a1d6466..44286472d 100644 --- a/client/testutil/rpc.go +++ b/client/testutil/rpc.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/require" diff --git a/command/agent/agent_endpoint.go b/command/agent/agent_endpoint.go index f4c20d393..09312414d 100644 --- a/command/agent/agent_endpoint.go +++ b/command/agent/agent_endpoint.go @@ -18,7 +18,7 @@ import ( "github.com/docker/docker/pkg/ioutils" log "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/api" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/command/agent/host" diff --git a/command/agent/agent_endpoint_test.go b/command/agent/agent_endpoint_test.go index 706e86945..8aa39cae0 100644 --- a/command/agent/agent_endpoint_test.go +++ b/command/agent/agent_endpoint_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/ci" diff --git a/command/agent/alloc_endpoint.go b/command/agent/alloc_endpoint.go index 3d71d8b78..788562bfe 100644 --- a/command/agent/alloc_endpoint.go +++ b/command/agent/alloc_endpoint.go @@ -15,7 +15,7 @@ import ( "github.com/golang/snappy" "github.com/gorilla/websocket" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers" diff --git a/command/agent/event_endpoint.go b/command/agent/event_endpoint.go index 89fd81bd2..eb4f6d35e 100644 --- a/command/agent/event_endpoint.go +++ b/command/agent/event_endpoint.go @@ -15,7 +15,7 @@ import ( "strings" "github.com/docker/docker/pkg/ioutils" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" "golang.org/x/sync/errgroup" ) diff --git a/command/agent/fs_endpoint.go b/command/agent/fs_endpoint.go index 1cc7a6924..6453c1322 100644 --- a/command/agent/fs_endpoint.go +++ b/command/agent/fs_endpoint.go @@ -14,7 +14,7 @@ import ( "strings" "github.com/docker/docker/pkg/ioutils" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/command/agent/http.go b/command/agent/http.go index 5ccba35d6..b9e3b2723 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -25,7 +25,7 @@ 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/go-msgpack/v2/codec" multierror "github.com/hashicorp/go-multierror" "github.com/rs/cors" "golang.org/x/time/rate" diff --git a/command/agent/http_test.go b/command/agent/http_test.go index 59e4dd159..5f9d308ca 100644 --- a/command/agent/http_test.go +++ b/command/agent/http_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/ci" diff --git a/command/agent/operator_endpoint.go b/command/agent/operator_endpoint.go index 63394d046..90df8bee0 100644 --- a/command/agent/operator_endpoint.go +++ b/command/agent/operator_endpoint.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/raft" "github.com/hashicorp/nomad/api" diff --git a/command/data_format.go b/command/data_format.go index dc31d8813..a1c309e99 100644 --- a/command/data_format.go +++ b/command/data_format.go @@ -9,7 +9,7 @@ import ( "text/template" "github.com/Masterminds/sprig/v3" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) var ( diff --git a/go.mod b/go.mod index 00463d106..a1675582f 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/hashicorp/go-immutable-radix/v2 v2.0.0 github.com/hashicorp/go-kms-wrapping/v2 v2.0.5 github.com/hashicorp/go-memdb v1.3.4 - github.com/hashicorp/go-msgpack v1.1.5 + github.com/hashicorp/go-msgpack/v2 v2.0.0 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-plugin v1.4.9 github.com/hashicorp/go-secure-stdlib/listenerutil v0.1.4 @@ -70,7 +70,7 @@ require ( github.com/hashicorp/hil v0.0.0-20210521165536-27a72121fd40 github.com/hashicorp/logutils v1.0.0 github.com/hashicorp/memberlist v0.5.0 - github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69 + github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 github.com/hashicorp/nomad/api v0.0.0-20221006174558-2aa7e66bdb52 github.com/hashicorp/raft v1.3.11 github.com/hashicorp/raft-autopilot v0.1.6 @@ -202,6 +202,7 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect diff --git a/go.sum b/go.sum index 66833084e..eaf82dd9e 100644 --- a/go.sum +++ b/go.sum @@ -839,9 +839,10 @@ github.com/hashicorp/go-kms-wrapping/v2 v2.0.5/go.mod h1:sDQAfwJGv25uGPZA04x87ER github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= -github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= +github.com/hashicorp/go-msgpack/v2 v2.0.0 h1:c1fiLq1LNghmLOry1ipGhvLDi+/zEoaEP2JrE1oFJ9s= +github.com/hashicorp/go-msgpack/v2 v2.0.0/go.mod h1:JIxYkkFJRDDRSoWQBSh7s9QAVThq+82iWmUpmE4jKak= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= @@ -911,8 +912,8 @@ github.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69 h1:lc3c72qGlIMDqQpQH82Y4vaglRMMFdJbziYWriR4UcE= -github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69/go.mod h1:/z+jUGRBlwVpUZfjute9jWaF6/HuhjuFQuL1YXzVD1Q= +github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 h1:kBpVVl1sl3MaSrs97e0+pDQhSrqJv9gVbSUrPpVfl1w= +github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0/go.mod h1:6pdNz0vo0mF0GvhwDG56O3N18qBrAz/XRIcfINfTbwo= github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= github.com/hashicorp/raft v1.2.0/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= github.com/hashicorp/raft v1.3.11 h1:p3v6gf6l3S797NnK5av3HcczOC1T5CLoaRvg0g9ys4A= diff --git a/helper/boltdd/boltdd.go b/helper/boltdd/boltdd.go index c968bfde9..bbc5260c7 100644 --- a/helper/boltdd/boltdd.go +++ b/helper/boltdd/boltdd.go @@ -11,7 +11,7 @@ import ( "os" "sync" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" "go.etcd.io/bbolt" "golang.org/x/crypto/blake2b" diff --git a/helper/boltdd/boltdd_test.go b/helper/boltdd/boltdd_test.go index e8cbfcf0e..514bf25f9 100644 --- a/helper/boltdd/boltdd_test.go +++ b/helper/boltdd/boltdd_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "testing" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/helper/pluginutils/hclutils/testing.go b/helper/pluginutils/hclutils/testing.go index 558bdb34d..a4e26f782 100644 --- a/helper/pluginutils/hclutils/testing.go +++ b/helper/pluginutils/hclutils/testing.go @@ -6,7 +6,7 @@ package hclutils import ( "testing" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/hcl" "github.com/hashicorp/hcl/hcl/ast" "github.com/hashicorp/nomad/helper/pluginutils/hclspecutils" diff --git a/helper/pluginutils/hclutils/types.go b/helper/pluginutils/hclutils/types.go index 35146624f..2dea95d8f 100644 --- a/helper/pluginutils/hclutils/types.go +++ b/helper/pluginutils/hclutils/types.go @@ -4,7 +4,7 @@ package hclutils import ( - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) // MapStrInt is a wrapper for map[string]int that handles diff --git a/helper/pluginutils/hclutils/util.go b/helper/pluginutils/hclutils/util.go index ffe71ad8f..fd7f293b8 100644 --- a/helper/pluginutils/hclutils/util.go +++ b/helper/pluginutils/hclutils/util.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" hcl "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hcldec" hjson "github.com/hashicorp/hcl/v2/json" diff --git a/helper/pool/pool.go b/helper/pool/pool.go index 3c6599b74..8539142cb 100644 --- a/helper/pool/pool.go +++ b/helper/pool/pool.go @@ -15,7 +15,7 @@ import ( "time" hclog "github.com/hashicorp/go-hclog" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/tlsutil" "github.com/hashicorp/nomad/nomad/structs" diff --git a/helper/raftutil/msgpack.go b/helper/raftutil/msgpack.go index f8f5b9ad1..e6f67debb 100644 --- a/helper/raftutil/msgpack.go +++ b/helper/raftutil/msgpack.go @@ -9,7 +9,7 @@ import ( "time" "unicode" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/helper/raftutil/msgpack_test.go b/helper/raftutil/msgpack_test.go index 96acb2329..7b73fbed0 100644 --- a/helper/raftutil/msgpack_test.go +++ b/helper/raftutil/msgpack_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/structs" "github.com/stretchr/testify/require" diff --git a/helper/raftutil/state.go b/helper/raftutil/state.go index 144d6880e..e480134c1 100644 --- a/helper/raftutil/state.go +++ b/helper/raftutil/state.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/raft" raftboltdb "github.com/hashicorp/raft-boltdb/v2" diff --git a/helper/snapshot/snapshot_test.go b/helper/snapshot/snapshot_test.go index 80c062956..299a466c8 100644 --- a/helper/snapshot/snapshot_test.go +++ b/helper/snapshot/snapshot_test.go @@ -16,7 +16,7 @@ import ( "time" "github.com/hashicorp/consul/sdk/testutil" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/raft" "github.com/stretchr/testify/require" diff --git a/nomad/acl_endpoint_test.go b/nomad/acl_endpoint_test.go index 27cdc8ab9..0eff573f1 100644 --- a/nomad/acl_endpoint_test.go +++ b/nomad/acl_endpoint_test.go @@ -14,7 +14,7 @@ import ( "github.com/golang-jwt/jwt/v4" capOIDC "github.com/hashicorp/cap/oidc" "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/acl_test.go b/nomad/acl_test.go index d0124ff57..c20296860 100644 --- a/nomad/acl_test.go +++ b/nomad/acl_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/alloc_endpoint_test.go b/nomad/alloc_endpoint_test.go index 1d3ad5d3c..ab1c27454 100644 --- a/nomad/alloc_endpoint_test.go +++ b/nomad/alloc_endpoint_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/client_agent_endpoint.go b/nomad/client_agent_endpoint.go index a3cc070bf..522fd0d19 100644 --- a/nomad/client_agent_endpoint.go +++ b/nomad/client_agent_endpoint.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/nomad/structs" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) type Agent struct { diff --git a/nomad/client_agent_endpoint_test.go b/nomad/client_agent_endpoint_test.go index 256529d25..f70a38992 100644 --- a/nomad/client_agent_endpoint_test.go +++ b/nomad/client_agent_endpoint_test.go @@ -14,7 +14,7 @@ import ( "time" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client" diff --git a/nomad/client_alloc_endpoint.go b/nomad/client_alloc_endpoint.go index 83ba5fb7e..51cf3a78e 100644 --- a/nomad/client_alloc_endpoint.go +++ b/nomad/client_alloc_endpoint.go @@ -12,7 +12,7 @@ import ( "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" diff --git a/nomad/client_alloc_endpoint_test.go b/nomad/client_alloc_endpoint_test.go index 0bb91171a..89710fa0d 100644 --- a/nomad/client_alloc_endpoint_test.go +++ b/nomad/client_alloc_endpoint_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + "github.com/hashicorp/go-msgpack/v2/codec" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client" diff --git a/nomad/client_csi_endpoint_test.go b/nomad/client_csi_endpoint_test.go index 2de42e422..cbc3c6dcc 100644 --- a/nomad/client_csi_endpoint_test.go +++ b/nomad/client_csi_endpoint_test.go @@ -10,7 +10,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client" "github.com/hashicorp/nomad/client/config" diff --git a/nomad/client_fs_endpoint.go b/nomad/client_fs_endpoint.go index eefa26d4a..43dc21dae 100644 --- a/nomad/client_fs_endpoint.go +++ b/nomad/client_fs_endpoint.go @@ -16,7 +16,7 @@ import ( cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper/pointer" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/client_fs_endpoint_test.go b/nomad/client_fs_endpoint_test.go index 8074ac7d4..89a9d7c76 100644 --- a/nomad/client_fs_endpoint_test.go +++ b/nomad/client_fs_endpoint_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - codec "github.com/hashicorp/go-msgpack/codec" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + codec "github.com/hashicorp/go-msgpack/v2/codec" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client" diff --git a/nomad/client_rpc.go b/nomad/client_rpc.go index 457127334..7c7c61b94 100644 --- a/nomad/client_rpc.go +++ b/nomad/client_rpc.go @@ -9,9 +9,9 @@ import ( "net" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" multierror "github.com/hashicorp/go-multierror" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/helper/pool" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/yamux" diff --git a/nomad/client_stats_endpoint_test.go b/nomad/client_stats_endpoint_test.go index bf63aa03f..297c2a43c 100644 --- a/nomad/client_stats_endpoint_test.go +++ b/nomad/client_stats_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client" diff --git a/nomad/core_sched_test.go b/nomad/core_sched_test.go index 0008ab8f3..ed00e8409 100644 --- a/nomad/core_sched_test.go +++ b/nomad/core_sched_test.go @@ -9,7 +9,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/csi_endpoint_test.go b/nomad/csi_endpoint_test.go index f2482b608..0eea60209 100644 --- a/nomad/csi_endpoint_test.go +++ b/nomad/csi_endpoint_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/shoenig/test" "github.com/shoenig/test/must" "github.com/stretchr/testify/assert" diff --git a/nomad/deployment_endpoint_test.go b/nomad/deployment_endpoint_test.go index 1847a1f14..f4e592101 100644 --- a/nomad/deployment_endpoint_test.go +++ b/nomad/deployment_endpoint_test.go @@ -8,7 +8,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/drainer_int_test.go b/nomad/drainer_int_test.go index 4a9dc49d4..ac17ef5db 100644 --- a/nomad/drainer_int_test.go +++ b/nomad/drainer_int_test.go @@ -11,10 +11,7 @@ import ( log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" - "github.com/shoenig/test/must" - "github.com/shoenig/test/wait" - + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/helper/uuid" @@ -23,6 +20,8 @@ import ( "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" + "github.com/shoenig/test/must" + "github.com/shoenig/test/wait" ) // allocClientStateSimulator simulates the updates in state from the diff --git a/nomad/encrypter_test.go b/nomad/encrypter_test.go index 7641cd3ba..307af30ed 100644 --- a/nomad/encrypter_test.go +++ b/nomad/encrypter_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/shoenig/test/must" "github.com/stretchr/testify/require" diff --git a/nomad/eval_broker_test.go b/nomad/eval_broker_test.go index 8248cc57d..69ea743fc 100644 --- a/nomad/eval_broker_test.go +++ b/nomad/eval_broker_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/shoenig/test" "github.com/shoenig/test/must" "github.com/shoenig/test/wait" diff --git a/nomad/eval_endpoint_test.go b/nomad/eval_endpoint_test.go index 14c9570e4..4578cdfd1 100644 --- a/nomad/eval_endpoint_test.go +++ b/nomad/eval_endpoint_test.go @@ -12,7 +12,7 @@ import ( memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/go-set" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/event_endpoint.go b/nomad/event_endpoint.go index 704d7346f..8a3a6c307 100644 --- a/nomad/event_endpoint.go +++ b/nomad/event_endpoint.go @@ -8,7 +8,7 @@ import ( "io" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/nomad/stream" diff --git a/nomad/event_endpoint_test.go b/nomad/event_endpoint_test.go index 59417c996..d79ca2908 100644 --- a/nomad/event_endpoint_test.go +++ b/nomad/event_endpoint_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + "github.com/hashicorp/go-msgpack/v2/codec" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/fsm.go b/nomad/fsm.go index ab5d6c495..1d2e78f1c 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/go-bexpr" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/fsm_registry_oss.go b/nomad/fsm_registry_oss.go index bd01763da..bb11f4305 100644 --- a/nomad/fsm_registry_oss.go +++ b/nomad/fsm_registry_oss.go @@ -7,7 +7,7 @@ package nomad import ( - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/raft" ) diff --git a/nomad/heartbeat_test.go b/nomad/heartbeat_test.go index ced7a9813..047d96392 100644 --- a/nomad/heartbeat_test.go +++ b/nomad/heartbeat_test.go @@ -9,7 +9,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/job_endpoint_oss_test.go b/nomad/job_endpoint_oss_test.go index dce79decb..b14813a32 100644 --- a/nomad/job_endpoint_oss_test.go +++ b/nomad/job_endpoint_oss_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/job_endpoint_test.go b/nomad/job_endpoint_test.go index b39e95014..99536ed92 100644 --- a/nomad/job_endpoint_test.go +++ b/nomad/job_endpoint_test.go @@ -12,7 +12,7 @@ import ( "time" "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/keyring_endpoint_test.go b/nomad/keyring_endpoint_test.go index 4fe0df701..60478f068 100644 --- a/nomad/keyring_endpoint_test.go +++ b/nomad/keyring_endpoint_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/stretchr/testify/require" "github.com/hashicorp/nomad/ci" diff --git a/nomad/namespace_endpoint_test.go b/nomad/namespace_endpoint_test.go index a0578b513..2ec4ed8d8 100644 --- a/nomad/namespace_endpoint_test.go +++ b/nomad/namespace_endpoint_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/node_endpoint_test.go b/nomad/node_endpoint_test.go index a3c5b203c..ca9dbbe89 100644 --- a/nomad/node_endpoint_test.go +++ b/nomad/node_endpoint_test.go @@ -14,7 +14,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/command/agent/consul" diff --git a/nomad/operator_endpoint.go b/nomad/operator_endpoint.go index 858e176b1..0e3da5ec5 100644 --- a/nomad/operator_endpoint.go +++ b/nomad/operator_endpoint.go @@ -11,7 +11,7 @@ import ( "time" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" diff --git a/nomad/operator_endpoint_test.go b/nomad/operator_endpoint_test.go index 517feac10..10a8c34ff 100644 --- a/nomad/operator_endpoint_test.go +++ b/nomad/operator_endpoint_test.go @@ -16,8 +16,8 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + "github.com/hashicorp/go-msgpack/v2/codec" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" cstructs "github.com/hashicorp/nomad/client/structs" diff --git a/nomad/periodic_endpoint_test.go b/nomad/periodic_endpoint_test.go index e2a04eb29..3091c3e08 100644 --- a/nomad/periodic_endpoint_test.go +++ b/nomad/periodic_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/plan_endpoint_test.go b/nomad/plan_endpoint_test.go index 20e056d59..2bc189def 100644 --- a/nomad/plan_endpoint_test.go +++ b/nomad/plan_endpoint_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/plan_normalization_test.go b/nomad/plan_normalization_test.go index 7819dac21..d2e1d1f41 100644 --- a/nomad/plan_normalization_test.go +++ b/nomad/plan_normalization_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/regions_endpoint_test.go b/nomad/regions_endpoint_test.go index 18db40bfb..f9c2db61d 100644 --- a/nomad/regions_endpoint_test.go +++ b/nomad/regions_endpoint_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" diff --git a/nomad/rpc.go b/nomad/rpc.go index 448597ea8..081a3c895 100644 --- a/nomad/rpc.go +++ b/nomad/rpc.go @@ -21,7 +21,7 @@ import ( "github.com/hashicorp/go-connlimit" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/pool" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/rpc_test.go b/nomad/rpc_test.go index 5e06ab8cd..7313e86db 100644 --- a/nomad/rpc_test.go +++ b/nomad/rpc_test.go @@ -19,9 +19,9 @@ import ( "time" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/go-sockaddr" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper/pool" diff --git a/nomad/scaling_endpoint_test.go b/nomad/scaling_endpoint_test.go index 7c747a6ae..7e8ef4cfb 100644 --- a/nomad/scaling_endpoint_test.go +++ b/nomad/scaling_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/search_endpoint_test.go b/nomad/search_endpoint_test.go index 59cecdde4..510d5ae48 100644 --- a/nomad/search_endpoint_test.go +++ b/nomad/search_endpoint_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/server_test.go b/nomad/server_test.go index 67a9d2b53..8d7edc109 100644 --- a/nomad/server_test.go +++ b/nomad/server_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/service_registration_endpoint_test.go b/nomad/service_registration_endpoint_test.go index f8bc8f6d3..749226730 100644 --- a/nomad/service_registration_endpoint_test.go +++ b/nomad/service_registration_endpoint_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/status_endpoint_test.go b/nomad/status_endpoint_test.go index 0c71c8315..f2937ece2 100644 --- a/nomad/status_endpoint_test.go +++ b/nomad/status_endpoint_test.go @@ -6,7 +6,7 @@ package nomad import ( "testing" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/stream/ndjson.go b/nomad/stream/ndjson.go index 7e048f3bf..22af2dea1 100644 --- a/nomad/stream/ndjson.go +++ b/nomad/stream/ndjson.go @@ -9,7 +9,7 @@ import ( "fmt" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/structs/encoding.go b/nomad/structs/encoding.go index 3ea1500d0..85d4388c5 100644 --- a/nomad/structs/encoding.go +++ b/nomad/structs/encoding.go @@ -6,7 +6,7 @@ package structs import ( "reflect" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) // extendFunc is a mapping from one struct to another, to change the shape of the encoded JSON diff --git a/nomad/structs/generate.sh b/nomad/structs/generate.sh index d59405594..31a95418b 100755 --- a/nomad/structs/generate.sh +++ b/nomad/structs/generate.sh @@ -6,7 +6,7 @@ set -e FILES="$(ls ./*.go | grep -v -e _test.go -e .generated.go | tr '\n' ' ')" codecgen \ - -c github.com/hashicorp/go-msgpack/codec \ + -c github.com/hashicorp/go-msgpack/v2/codec \ -st codec \ -d 100 \ -t codegen_generated \ diff --git a/nomad/structs/handlers.go b/nomad/structs/handlers.go index c3edd63a8..31e5fcc4c 100644 --- a/nomad/structs/handlers.go +++ b/nomad/structs/handlers.go @@ -4,7 +4,7 @@ package structs import ( - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) var ( diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 52d0af2df..e4e461d9c 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -29,7 +29,7 @@ import ( jwt "github.com/golang-jwt/jwt/v4" "github.com/hashicorp/cronexpr" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-set" "github.com/hashicorp/go-version" diff --git a/nomad/system_endpoint_test.go b/nomad/system_endpoint_test.go index e67a9b59b..60f391471 100644 --- a/nomad/system_endpoint_test.go +++ b/nomad/system_endpoint_test.go @@ -9,7 +9,7 @@ import ( "testing" memdb "github.com/hashicorp/go-memdb" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/timetable.go b/nomad/timetable.go index 06d80d06f..ba343ddca 100644 --- a/nomad/timetable.go +++ b/nomad/timetable.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" ) // TimeTable is used to associate a Raft index with a timestamp. diff --git a/nomad/timetable_test.go b/nomad/timetable_test.go index 0e50e58b4..c8050dbec 100644 --- a/nomad/timetable_test.go +++ b/nomad/timetable_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/variables_endpoint_test.go b/nomad/variables_endpoint_test.go index 14f168795..d643782d5 100644 --- a/nomad/variables_endpoint_test.go +++ b/nomad/variables_endpoint_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc/v2" "github.com/shoenig/test/must" "github.com/hashicorp/nomad/acl" diff --git a/plugins/base/plugin.go b/plugins/base/plugin.go index b75869944..61e232d8d 100644 --- a/plugins/base/plugin.go +++ b/plugins/base/plugin.go @@ -8,7 +8,7 @@ import ( "context" "reflect" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/plugins/base/proto" "google.golang.org/grpc" diff --git a/plugins/drivers/testutils/testing_test.go b/plugins/drivers/testutils/testing_test.go index 928063372..120a935d6 100644 --- a/plugins/drivers/testutils/testing_test.go +++ b/plugins/drivers/testutils/testing_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-msgpack/codec" + "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/plugins/drivers"