From 833e240597c4e890e085e3f9669b781180ab23a7 Mon Sep 17 00:00:00 2001 From: Matt Keeler Date: Fri, 31 Jan 2025 15:22:00 -0500 Subject: [PATCH] Upgrade to using hashicorp/go-metrics@v0.5.4 (#24856) * Upgrade to using hashicorp/go-metrics@v0.5.4 This also requires bumping the dependencies for: * memberlist * serf * raft * raft-boltdb * (and indirectly hashicorp/mdns due to the memberlist or serf update) Unlike some other HashiCorp products, Nomads root module is currently expected to be consumed by others. This means that it needs to be treated more like our libraries and upgrade to hashicorp/go-metrics by utilizing its compat packages. This allows those importing the root module to control the metrics module used via build tags. --- GNUmakefile | 2 +- client/acl.go | 2 +- client/agent_endpoint.go | 2 +- client/alloc_endpoint.go | 2 +- client/allocrunner/alloc_runner.go | 2 +- client/allocrunner/alloc_runner_test.go | 2 +- client/allocrunner/hookstats/hookstats.go | 2 +- .../allocrunner/hookstats/hookstats_test.go | 2 +- client/allocrunner/taskrunner/task_runner.go | 2 +- .../taskrunner/task_runner_test.go | 2 +- client/allocrunner/taskrunner/tasklet.go | 2 +- client/client.go | 2 +- client/client_stats_endpoint.go | 2 +- client/client_test.go | 2 +- client/config/arconfig.go | 2 +- client/csi_endpoint.go | 2 +- client/fingerprint/zstorage_windows.go | 6 +- client/fs_endpoint.go | 2 +- client/host_volume_endpoint.go | 2 +- client/meta_endpoint.go | 2 +- client/rpc.go | 2 +- client/vaultclient/vaultclient.go | 2 +- command/agent/agent.go | 2 +- command/agent/bindata_assetfs.go | 118 +++++++++--------- command/agent/command.go | 8 +- command/agent/consul/service_client.go | 2 +- command/agent/http.go | 2 +- command/agent/metrics_endpoint_test.go | 2 +- command/agent/testagent.go | 2 +- go.mod | 15 +-- go.sum | 53 +++++--- helper/users/lookup_windows_test.go | 1 + lib/auth/jwt/validator.go | 2 +- nomad/acl_endpoint.go | 2 +- nomad/alloc_endpoint.go | 2 +- nomad/auth/auth.go | 2 +- nomad/autopilot.go | 2 +- nomad/blocked_evals.go | 2 +- nomad/client_alloc_endpoint.go | 2 +- nomad/client_csi_endpoint.go | 2 +- nomad/client_fs_endpoint.go | 2 +- nomad/client_host_volume_endpoint.go | 2 +- nomad/client_meta_endpoint.go | 2 +- nomad/client_stats_endpoint.go | 2 +- nomad/consul.go | 2 +- nomad/csi_endpoint.go | 2 +- nomad/deployment_endpoint.go | 2 +- nomad/eval_broker.go | 2 +- nomad/eval_endpoint.go | 2 +- nomad/fsm.go | 2 +- nomad/heartbeat.go | 2 +- nomad/host_volume_endpoint.go | 2 +- nomad/job_endpoint.go | 2 +- nomad/job_endpoint_statuses.go | 2 +- nomad/keyring_endpoint.go | 2 +- nomad/leader.go | 2 +- nomad/lock/delay.go | 2 +- nomad/lock/ttl.go | 2 +- nomad/namespace_endpoint.go | 2 +- nomad/node_endpoint.go | 2 +- nomad/node_pool_endpoint.go | 2 +- nomad/periodic_endpoint.go | 2 +- nomad/plan_apply.go | 2 +- nomad/plan_apply_node_tracker.go | 2 +- nomad/plan_endpoint.go | 2 +- nomad/plan_queue.go | 2 +- nomad/rpc.go | 2 +- nomad/rpc_rate_metrics.go | 2 +- nomad/scaling_endpoint.go | 2 +- nomad/search_endpoint.go | 2 +- nomad/server.go | 2 +- nomad/service_registration_endpoint.go | 2 +- nomad/stream/event_broker.go | 2 +- nomad/structs/cni_config_test.go | 3 +- nomad/variables_endpoint.go | 2 +- nomad/vault.go | 2 +- nomad/worker.go | 2 +- scheduler/reconcile.go | 2 +- 78 files changed, 190 insertions(+), 156 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 29632edf4..a56419d4f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -23,7 +23,7 @@ ifndef BIN BIN := $(GOPATH)/bin endif -GO_TAGS := $(GO_TAGS) +GO_TAGS := hashicorpmetrics $(GO_TAGS) ifeq ($(CI),true) GO_TAGS := codegen_generated $(GO_TAGS) diff --git a/client/acl.go b/client/acl.go index fee8472d4..914f4fe71 100644 --- a/client/acl.go +++ b/client/acl.go @@ -6,7 +6,7 @@ package client import ( "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-set/v3" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/structs" diff --git a/client/agent_endpoint.go b/client/agent_endpoint.go index 4d676bc31..a47dcde05 100644 --- a/client/agent_endpoint.go +++ b/client/agent_endpoint.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/nomad/structs" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" sframer "github.com/hashicorp/nomad/client/lib/streamframer" cstructs "github.com/hashicorp/nomad/client/structs" diff --git a/client/alloc_endpoint.go b/client/alloc_endpoint.go index e8a98745f..3a7fde445 100644 --- a/client/alloc_endpoint.go +++ b/client/alloc_endpoint.go @@ -12,7 +12,7 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" diff --git a/client/allocrunner/alloc_runner.go b/client/allocrunner/alloc_runner.go index 9b3959845..095b93cb5 100644 --- a/client/allocrunner/alloc_runner.go +++ b/client/allocrunner/alloc_runner.go @@ -10,8 +10,8 @@ import ( "sync" "time" - "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/allocrunner/hookstats" diff --git a/client/allocrunner/alloc_runner_test.go b/client/allocrunner/alloc_runner_test.go index 591aa596e..af9679854 100644 --- a/client/allocrunner/alloc_runner_test.go +++ b/client/allocrunner/alloc_runner_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/consul/api" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/allochealth" diff --git a/client/allocrunner/hookstats/hookstats.go b/client/allocrunner/hookstats/hookstats.go index 583c44141..8b6543ae1 100644 --- a/client/allocrunner/hookstats/hookstats.go +++ b/client/allocrunner/hookstats/hookstats.go @@ -6,7 +6,7 @@ package hookstats import ( "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/client/allocrunner/interfaces" ) diff --git a/client/allocrunner/hookstats/hookstats_test.go b/client/allocrunner/hookstats/hookstats_test.go index ecc4d3f57..834f01f3b 100644 --- a/client/allocrunner/hookstats/hookstats_test.go +++ b/client/allocrunner/hookstats/hookstats_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/ci" "github.com/shoenig/test/must" ) diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index a45def36b..0719c0213 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -12,8 +12,8 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/hcl/v2/hcldec" "github.com/hashicorp/nomad/client/allocdir" diff --git a/client/allocrunner/taskrunner/task_runner_test.go b/client/allocrunner/taskrunner/task_runner_test.go index 645b33c3b..5ec2f7c5d 100644 --- a/client/allocrunner/taskrunner/task_runner_test.go +++ b/client/allocrunner/taskrunner/task_runner_test.go @@ -20,9 +20,9 @@ import ( "testing" "time" - "github.com/armon/go-metrics" "github.com/golang/snappy" consulapi "github.com/hashicorp/consul/api" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/allocrunner/hookstats" diff --git a/client/allocrunner/taskrunner/tasklet.go b/client/allocrunner/taskrunner/tasklet.go index c402f7dcb..553a2cd10 100644 --- a/client/allocrunner/taskrunner/tasklet.go +++ b/client/allocrunner/taskrunner/tasklet.go @@ -7,8 +7,8 @@ import ( "context" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/client/allocrunner/taskrunner/interfaces" ) diff --git a/client/client.go b/client/client.go index 57361320f..2f6440579 100644 --- a/client/client.go +++ b/client/client.go @@ -18,9 +18,9 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" consulapi "github.com/hashicorp/consul/api" hclog "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/allocrunner" diff --git a/client/client_stats_endpoint.go b/client/client_stats_endpoint.go index ac5ddc81e..c2f763889 100644 --- a/client/client_stats_endpoint.go +++ b/client/client_stats_endpoint.go @@ -6,7 +6,7 @@ package client import ( "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/client/structs" nstructs "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/client_test.go b/client/client_test.go index 40a580332..bc3d3e048 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" - "github.com/armon/go-metrics" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/client/allocrunner" "github.com/hashicorp/nomad/client/allocrunner/interfaces" diff --git a/client/config/arconfig.go b/client/config/arconfig.go index e2e7f16e7..8f29e803d 100644 --- a/client/config/arconfig.go +++ b/client/config/arconfig.go @@ -6,8 +6,8 @@ package config import ( "context" - "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/client/allocdir" arinterfaces "github.com/hashicorp/nomad/client/allocrunner/interfaces" "github.com/hashicorp/nomad/client/consul" diff --git a/client/csi_endpoint.go b/client/csi_endpoint.go index 9d32f27cd..0135f0a8f 100644 --- a/client/csi_endpoint.go +++ b/client/csi_endpoint.go @@ -9,8 +9,8 @@ import ( "fmt" "time" - metrics "github.com/armon/go-metrics" grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/client/dynamicplugins" "github.com/hashicorp/nomad/client/pluginmanager/csimanager" diff --git a/client/fingerprint/zstorage_windows.go b/client/fingerprint/zstorage_windows.go index 21b347717..adf8de77a 100644 --- a/client/fingerprint/zstorage_windows.go +++ b/client/fingerprint/zstorage_windows.go @@ -5,8 +5,10 @@ package fingerprint -import "unsafe" -import "syscall" +import ( + "syscall" + "unsafe" +) var _ unsafe.Pointer diff --git a/client/fs_endpoint.go b/client/fs_endpoint.go index 33f0cdb08..693dd4d98 100644 --- a/client/fs_endpoint.go +++ b/client/fs_endpoint.go @@ -18,7 +18,7 @@ import ( "syscall" "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hpcloud/tail/watch" diff --git a/client/host_volume_endpoint.go b/client/host_volume_endpoint.go index 491a548bf..690d28d26 100644 --- a/client/host_volume_endpoint.go +++ b/client/host_volume_endpoint.go @@ -7,7 +7,7 @@ import ( "context" "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" cstructs "github.com/hashicorp/nomad/client/structs" ) diff --git a/client/meta_endpoint.go b/client/meta_endpoint.go index 85b4dfa10..5eb0f48da 100644 --- a/client/meta_endpoint.go +++ b/client/meta_endpoint.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/rpc.go b/client/rpc.go index 8d2525d5a..20708fa8e 100644 --- a/client/rpc.go +++ b/client/rpc.go @@ -11,7 +11,7 @@ import ( "strings" "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/client/servers" "github.com/hashicorp/nomad/helper" diff --git a/client/vaultclient/vaultclient.go b/client/vaultclient/vaultclient.go index ada93ee18..4f86a3a01 100644 --- a/client/vaultclient/vaultclient.go +++ b/client/vaultclient/vaultclient.go @@ -13,8 +13,8 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" hclog "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper/useragent" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" diff --git a/command/agent/agent.go b/command/agent/agent.go index b83ff2229..2dc97e5b0 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -16,10 +16,10 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" "github.com/dustin/go-humanize" consulapi "github.com/hashicorp/consul/api" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" uuidparse "github.com/hashicorp/go-uuid" "github.com/hashicorp/nomad/client" clientconfig "github.com/hashicorp/nomad/client/config" diff --git a/command/agent/bindata_assetfs.go b/command/agent/bindata_assetfs.go index 33fc0658a..5aeccaef2 100644 --- a/command/agent/bindata_assetfs.go +++ b/command/agent/bindata_assetfs.go @@ -31,12 +31,12 @@ // ui/dist/robots.txt // DO NOT EDIT! +//go:build ui // +build ui package agent import ( - "github.com/elazarl/go-bindata-assetfs" "bytes" "compress/gzip" "fmt" @@ -46,6 +46,8 @@ import ( "path/filepath" "strings" "time" + + assetfs "github.com/elazarl/go-bindata-assetfs" ) func bindataRead(data []byte, name string) ([]byte, error) { @@ -731,46 +733,48 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "dist/assets/chunk.265.d2d6721dbed577d51f9b.js": distAssetsChunk265D2d6721dbed577d51f9bJs, - "dist/assets/chunk.280.f72db67a6c61f41fec51.js": distAssetsChunk280F72db67a6c61f41fec51Js, + "dist/assets/chunk.265.d2d6721dbed577d51f9b.js": distAssetsChunk265D2d6721dbed577d51f9bJs, + "dist/assets/chunk.280.f72db67a6c61f41fec51.js": distAssetsChunk280F72db67a6c61f41fec51Js, "dist/assets/chunk.280.f72db67a6c61f41fec51.js.LICENSE.txt": distAssetsChunk280F72db67a6c61f41fec51JsLicenseTxt, - "dist/assets/chunk.50.30654845e67b2aa5686e.js": distAssetsChunk5030654845e67b2aa5686eJs, - "dist/assets/chunk.50.30654845e67b2aa5686e.js.LICENSE.txt": distAssetsChunk5030654845e67b2aa5686eJsLicenseTxt, - "dist/assets/chunk.524.8a7cbc1bbda1cd65853d.css": distAssetsChunk5248a7cbc1bbda1cd65853dCss, - "dist/assets/chunk.524.8a7cbc1bbda1cd65853d.js": distAssetsChunk5248a7cbc1bbda1cd65853dJs, - "dist/assets/chunk.582.9dd6e1fdceaacc304323.css": distAssetsChunk5829dd6e1fdceaacc304323Css, - "dist/assets/chunk.582.9dd6e1fdceaacc304323.js": distAssetsChunk5829dd6e1fdceaacc304323Js, - "dist/assets/chunk.70.50f96fa0437559f4ed93.js": distAssetsChunk7050f96fa0437559f4ed93Js, - "dist/assets/nomad-ui-ef281eada555deb033d988a174d03838.js": distAssetsNomadUiEf281eada555deb033d988a174d03838Js, + "dist/assets/chunk.50.30654845e67b2aa5686e.js": distAssetsChunk5030654845e67b2aa5686eJs, + "dist/assets/chunk.50.30654845e67b2aa5686e.js.LICENSE.txt": distAssetsChunk5030654845e67b2aa5686eJsLicenseTxt, + "dist/assets/chunk.524.8a7cbc1bbda1cd65853d.css": distAssetsChunk5248a7cbc1bbda1cd65853dCss, + "dist/assets/chunk.524.8a7cbc1bbda1cd65853d.js": distAssetsChunk5248a7cbc1bbda1cd65853dJs, + "dist/assets/chunk.582.9dd6e1fdceaacc304323.css": distAssetsChunk5829dd6e1fdceaacc304323Css, + "dist/assets/chunk.582.9dd6e1fdceaacc304323.js": distAssetsChunk5829dd6e1fdceaacc304323Js, + "dist/assets/chunk.70.50f96fa0437559f4ed93.js": distAssetsChunk7050f96fa0437559f4ed93Js, + "dist/assets/nomad-ui-ef281eada555deb033d988a174d03838.js": distAssetsNomadUiEf281eada555deb033d988a174d03838Js, "dist/assets/nomad-ui-fb12b836561815bbbb69332f507b6965.css": distAssetsNomadUiFb12b836561815bbbb69332f507b6965Css, - "dist/assets/vendor-30cee22277ff792556bc9a4ee63697ae.css": distAssetsVendor30cee22277ff792556bc9a4ee63697aeCss, - "dist/assets/vendor-f7a0120fbbcca50536685e8ba157894a.js": distAssetsVendorF7a0120fbbcca50536685e8ba157894aJs, - "dist/crossdomain.xml": distCrossdomainXml, - "dist/favicon.ico": distFaviconIco, - "dist/images/icons/boot.svg": distImagesIconsBootSvg, - "dist/images/icons/box.svg": distImagesIconsBoxSvg, - "dist/images/icons/cancel.svg": distImagesIconsCancelSvg, - "dist/images/icons/clock.svg": distImagesIconsClockSvg, - "dist/images/icons/console.svg": distImagesIconsConsoleSvg, - "dist/images/icons/history.svg": distImagesIconsHistorySvg, - "dist/images/icons/media-pause.svg": distImagesIconsMediaPauseSvg, - "dist/images/icons/media-play.svg": distImagesIconsMediaPlaySvg, - "dist/images/icons/node-init-circle-fill.svg": distImagesIconsNodeInitCircleFillSvg, - "dist/images/icons/nomad-logo-n.svg": distImagesIconsNomadLogoNSvg, - "dist/images/icons/search.svg": distImagesIconsSearchSvg, - "dist/index.html": distIndexHtml, - "dist/robots.txt": distRobotsTxt, + "dist/assets/vendor-30cee22277ff792556bc9a4ee63697ae.css": distAssetsVendor30cee22277ff792556bc9a4ee63697aeCss, + "dist/assets/vendor-f7a0120fbbcca50536685e8ba157894a.js": distAssetsVendorF7a0120fbbcca50536685e8ba157894aJs, + "dist/crossdomain.xml": distCrossdomainXml, + "dist/favicon.ico": distFaviconIco, + "dist/images/icons/boot.svg": distImagesIconsBootSvg, + "dist/images/icons/box.svg": distImagesIconsBoxSvg, + "dist/images/icons/cancel.svg": distImagesIconsCancelSvg, + "dist/images/icons/clock.svg": distImagesIconsClockSvg, + "dist/images/icons/console.svg": distImagesIconsConsoleSvg, + "dist/images/icons/history.svg": distImagesIconsHistorySvg, + "dist/images/icons/media-pause.svg": distImagesIconsMediaPauseSvg, + "dist/images/icons/media-play.svg": distImagesIconsMediaPlaySvg, + "dist/images/icons/node-init-circle-fill.svg": distImagesIconsNodeInitCircleFillSvg, + "dist/images/icons/nomad-logo-n.svg": distImagesIconsNomadLogoNSvg, + "dist/images/icons/search.svg": distImagesIconsSearchSvg, + "dist/index.html": distIndexHtml, + "dist/robots.txt": distRobotsTxt, } // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error @@ -801,39 +805,40 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "dist": &bintree{nil, map[string]*bintree{ "assets": &bintree{nil, map[string]*bintree{ - "chunk.265.d2d6721dbed577d51f9b.js": &bintree{distAssetsChunk265D2d6721dbed577d51f9bJs, map[string]*bintree{}}, - "chunk.280.f72db67a6c61f41fec51.js": &bintree{distAssetsChunk280F72db67a6c61f41fec51Js, map[string]*bintree{}}, + "chunk.265.d2d6721dbed577d51f9b.js": &bintree{distAssetsChunk265D2d6721dbed577d51f9bJs, map[string]*bintree{}}, + "chunk.280.f72db67a6c61f41fec51.js": &bintree{distAssetsChunk280F72db67a6c61f41fec51Js, map[string]*bintree{}}, "chunk.280.f72db67a6c61f41fec51.js.LICENSE.txt": &bintree{distAssetsChunk280F72db67a6c61f41fec51JsLicenseTxt, map[string]*bintree{}}, - "chunk.50.30654845e67b2aa5686e.js": &bintree{distAssetsChunk5030654845e67b2aa5686eJs, map[string]*bintree{}}, - "chunk.50.30654845e67b2aa5686e.js.LICENSE.txt": &bintree{distAssetsChunk5030654845e67b2aa5686eJsLicenseTxt, map[string]*bintree{}}, - "chunk.524.8a7cbc1bbda1cd65853d.css": &bintree{distAssetsChunk5248a7cbc1bbda1cd65853dCss, map[string]*bintree{}}, - "chunk.524.8a7cbc1bbda1cd65853d.js": &bintree{distAssetsChunk5248a7cbc1bbda1cd65853dJs, map[string]*bintree{}}, - "chunk.582.9dd6e1fdceaacc304323.css": &bintree{distAssetsChunk5829dd6e1fdceaacc304323Css, map[string]*bintree{}}, - "chunk.582.9dd6e1fdceaacc304323.js": &bintree{distAssetsChunk5829dd6e1fdceaacc304323Js, map[string]*bintree{}}, - "chunk.70.50f96fa0437559f4ed93.js": &bintree{distAssetsChunk7050f96fa0437559f4ed93Js, map[string]*bintree{}}, - "nomad-ui-ef281eada555deb033d988a174d03838.js": &bintree{distAssetsNomadUiEf281eada555deb033d988a174d03838Js, map[string]*bintree{}}, + "chunk.50.30654845e67b2aa5686e.js": &bintree{distAssetsChunk5030654845e67b2aa5686eJs, map[string]*bintree{}}, + "chunk.50.30654845e67b2aa5686e.js.LICENSE.txt": &bintree{distAssetsChunk5030654845e67b2aa5686eJsLicenseTxt, map[string]*bintree{}}, + "chunk.524.8a7cbc1bbda1cd65853d.css": &bintree{distAssetsChunk5248a7cbc1bbda1cd65853dCss, map[string]*bintree{}}, + "chunk.524.8a7cbc1bbda1cd65853d.js": &bintree{distAssetsChunk5248a7cbc1bbda1cd65853dJs, map[string]*bintree{}}, + "chunk.582.9dd6e1fdceaacc304323.css": &bintree{distAssetsChunk5829dd6e1fdceaacc304323Css, map[string]*bintree{}}, + "chunk.582.9dd6e1fdceaacc304323.js": &bintree{distAssetsChunk5829dd6e1fdceaacc304323Js, map[string]*bintree{}}, + "chunk.70.50f96fa0437559f4ed93.js": &bintree{distAssetsChunk7050f96fa0437559f4ed93Js, map[string]*bintree{}}, + "nomad-ui-ef281eada555deb033d988a174d03838.js": &bintree{distAssetsNomadUiEf281eada555deb033d988a174d03838Js, map[string]*bintree{}}, "nomad-ui-fb12b836561815bbbb69332f507b6965.css": &bintree{distAssetsNomadUiFb12b836561815bbbb69332f507b6965Css, map[string]*bintree{}}, - "vendor-30cee22277ff792556bc9a4ee63697ae.css": &bintree{distAssetsVendor30cee22277ff792556bc9a4ee63697aeCss, map[string]*bintree{}}, - "vendor-f7a0120fbbcca50536685e8ba157894a.js": &bintree{distAssetsVendorF7a0120fbbcca50536685e8ba157894aJs, map[string]*bintree{}}, + "vendor-30cee22277ff792556bc9a4ee63697ae.css": &bintree{distAssetsVendor30cee22277ff792556bc9a4ee63697aeCss, map[string]*bintree{}}, + "vendor-f7a0120fbbcca50536685e8ba157894a.js": &bintree{distAssetsVendorF7a0120fbbcca50536685e8ba157894aJs, map[string]*bintree{}}, }}, "crossdomain.xml": &bintree{distCrossdomainXml, map[string]*bintree{}}, - "favicon.ico": &bintree{distFaviconIco, map[string]*bintree{}}, + "favicon.ico": &bintree{distFaviconIco, map[string]*bintree{}}, "images": &bintree{nil, map[string]*bintree{ "icons": &bintree{nil, map[string]*bintree{ - "boot.svg": &bintree{distImagesIconsBootSvg, map[string]*bintree{}}, - "box.svg": &bintree{distImagesIconsBoxSvg, map[string]*bintree{}}, - "cancel.svg": &bintree{distImagesIconsCancelSvg, map[string]*bintree{}}, - "clock.svg": &bintree{distImagesIconsClockSvg, map[string]*bintree{}}, - "console.svg": &bintree{distImagesIconsConsoleSvg, map[string]*bintree{}}, - "history.svg": &bintree{distImagesIconsHistorySvg, map[string]*bintree{}}, - "media-pause.svg": &bintree{distImagesIconsMediaPauseSvg, map[string]*bintree{}}, - "media-play.svg": &bintree{distImagesIconsMediaPlaySvg, map[string]*bintree{}}, + "boot.svg": &bintree{distImagesIconsBootSvg, map[string]*bintree{}}, + "box.svg": &bintree{distImagesIconsBoxSvg, map[string]*bintree{}}, + "cancel.svg": &bintree{distImagesIconsCancelSvg, map[string]*bintree{}}, + "clock.svg": &bintree{distImagesIconsClockSvg, map[string]*bintree{}}, + "console.svg": &bintree{distImagesIconsConsoleSvg, map[string]*bintree{}}, + "history.svg": &bintree{distImagesIconsHistorySvg, map[string]*bintree{}}, + "media-pause.svg": &bintree{distImagesIconsMediaPauseSvg, map[string]*bintree{}}, + "media-play.svg": &bintree{distImagesIconsMediaPlaySvg, map[string]*bintree{}}, "node-init-circle-fill.svg": &bintree{distImagesIconsNodeInitCircleFillSvg, map[string]*bintree{}}, - "nomad-logo-n.svg": &bintree{distImagesIconsNomadLogoNSvg, map[string]*bintree{}}, - "search.svg": &bintree{distImagesIconsSearchSvg, map[string]*bintree{}}, + "nomad-logo-n.svg": &bintree{distImagesIconsNomadLogoNSvg, map[string]*bintree{}}, + "search.svg": &bintree{distImagesIconsSearchSvg, map[string]*bintree{}}, }}, }}, "index.html": &bintree{distIndexHtml, map[string]*bintree{}}, @@ -888,7 +893,6 @@ func _filePath(dir, name string) string { return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - func assetFS() *assetfs.AssetFS { assetInfo := func(path string) (os.FileInfo, error) { return os.Stat(path) diff --git a/command/agent/command.go b/command/agent/command.go index 5ef74c4eb..d0f354edc 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -19,14 +19,14 @@ import ( "syscall" "time" - metrics "github.com/armon/go-metrics" - "github.com/armon/go-metrics/circonus" - "github.com/armon/go-metrics/datadog" - "github.com/armon/go-metrics/prometheus" "github.com/hashicorp/cli" checkpoint "github.com/hashicorp/go-checkpoint" discover "github.com/hashicorp/go-discover" hclog "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" + "github.com/hashicorp/go-metrics/compat/circonus" + "github.com/hashicorp/go-metrics/compat/datadog" + "github.com/hashicorp/go-metrics/compat/prometheus" gsyslog "github.com/hashicorp/go-syslog" "github.com/hashicorp/nomad/helper" flaghelper "github.com/hashicorp/nomad/helper/flags" diff --git a/command/agent/consul/service_client.go b/command/agent/consul/service_client.go index f5c18e452..6589a6d41 100644 --- a/command/agent/consul/service_client.go +++ b/command/agent/consul/service_client.go @@ -19,9 +19,9 @@ import ( "sync/atomic" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/consul/api" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-set/v3" "github.com/hashicorp/nomad/client/serviceregistration" diff --git a/command/agent/http.go b/command/agent/http.go index 6d47e4e78..03bd7ea7b 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -19,12 +19,12 @@ import ( "sync" "time" - "github.com/armon/go-metrics" assetfs "github.com/elazarl/go-bindata-assetfs" "github.com/gorilla/handlers" "github.com/gorilla/websocket" "github.com/hashicorp/go-connlimit" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" multierror "github.com/hashicorp/go-multierror" "github.com/rs/cors" diff --git a/command/agent/metrics_endpoint_test.go b/command/agent/metrics_endpoint_test.go index fac79b2d8..b3c75b5aa 100644 --- a/command/agent/metrics_endpoint_test.go +++ b/command/agent/metrics_endpoint_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/ci" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/command/agent/testagent.go b/command/agent/testagent.go index 702898ce0..ecff31f56 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -14,8 +14,8 @@ import ( "testing" "time" - metrics "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/ci" client "github.com/hashicorp/nomad/client/config" diff --git a/go.mod b/go.mod index ed32d8e50..0a6997310 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.23 // Pinned dependencies are noted in github.com/hashicorp/nomad/issues/11826. replace ( github.com/Microsoft/go-winio => github.com/endocrimes/go-winio v0.4.13-0.20190628114223-fb47a8b41948 - github.com/armon/go-metrics => github.com/armon/go-metrics v0.0.0-20230509193637-d9ca9af9f1f9 github.com/hashicorp/hcl => github.com/hashicorp/hcl v1.0.1-0.20201016140508-a07e7d50bbee ) @@ -17,7 +16,6 @@ require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/Microsoft/go-winio v0.6.1 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e - github.com/armon/go-metrics v0.5.3 github.com/aws/aws-sdk-go-v2/config v1.28.6 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 github.com/aws/smithy-go v1.22.1 @@ -66,6 +64,7 @@ require ( github.com/hashicorp/go-kms-wrapping/wrappers/gcpckms/v2 v2.0.12 github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.12 github.com/hashicorp/go-memdb v1.3.4 + github.com/hashicorp/go-metrics v0.5.4 github.com/hashicorp/go-msgpack/v2 v2.1.2 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-netaddrs v0.1.0 @@ -81,13 +80,13 @@ require ( github.com/hashicorp/hcl v1.0.1-vault-3 github.com/hashicorp/hcl/v2 v2.20.2-0.20240517235513-55d9c02d147d github.com/hashicorp/hil v0.0.0-20210521165536-27a72121fd40 - github.com/hashicorp/memberlist v0.5.1 + github.com/hashicorp/memberlist v0.5.2 github.com/hashicorp/net-rpc-msgpackrpc/v2 v2.0.0 github.com/hashicorp/nomad/api v0.0.0-20230103221135-ce00d683f9be - github.com/hashicorp/raft v1.7.1 + github.com/hashicorp/raft v1.7.2 github.com/hashicorp/raft-autopilot v0.1.6 - github.com/hashicorp/raft-boltdb/v2 v2.3.0 - github.com/hashicorp/serf v0.10.2-0.20240320153621-5d32001edfaa + github.com/hashicorp/raft-boltdb/v2 v2.3.1 + github.com/hashicorp/serf v0.10.2 github.com/hashicorp/vault/api v1.15.0 github.com/hashicorp/yamux v0.1.2 github.com/hpcloud/tail v1.0.1-0.20170814160653-37f427138745 @@ -182,6 +181,7 @@ require ( github.com/agext/levenshtein v1.2.1 // indirect github.com/apparentlymart/go-cidr v1.0.1 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go v1.55.6 // indirect github.com/aws/aws-sdk-go-v2 v1.32.7 // indirect @@ -254,7 +254,8 @@ require ( github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.3 // indirect github.com/hashicorp/go-set/v2 v2.1.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/hashicorp/mdns v1.0.4 // indirect + github.com/hashicorp/mdns v1.0.5 // indirect + github.com/hashicorp/raft-boltdb v0.0.0-20250113192317-e8660f88bcc9 // indirect github.com/hashicorp/vault/api/auth/kubernetes v0.5.0 // indirect github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 // indirect github.com/huandu/xstrings v1.5.0 // indirect diff --git a/go.sum b/go.sum index 4ca6b1734..73745d2c1 100644 --- a/go.sum +++ b/go.sum @@ -680,6 +680,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= @@ -719,6 +720,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= @@ -731,8 +733,9 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20230509193637-d9ca9af9f1f9 h1:51N4T44k8crLrlHy1zgBKGdYKjzjquaXw/RPbq/bH+o= -github.com/armon/go-metrics v0.0.0-20230509193637-d9ca9af9f1f9/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -1206,6 +1209,8 @@ github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.12 h1:E8pzzF7i44OZ github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.12/go.mod h1:YRqguGarF7kbHeojTPkanH3qvjbEP2pelq5b0ifaQ1M= 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-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6elejKY= +github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v1.1.6-0.20240304204939-8824e8ccc35f h1:/xqzTen8ftnKv3cKa87WEoOLtsDJYFU0ArjrKaPTTkc= github.com/hashicorp/go-msgpack v1.1.6-0.20240304204939-8824e8ccc35f/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= @@ -1269,24 +1274,25 @@ github.com/hashicorp/hcl/v2 v2.20.2-0.20240517235513-55d9c02d147d/go.mod h1:62ZY github.com/hashicorp/hil v0.0.0-20210521165536-27a72121fd40 h1:ExwaL+hUy1ys2AWDbsbh/lxQS2EVCYxuj0LoyLTdB3Y= github.com/hashicorp/hil v0.0.0-20210521165536-27a72121fd40/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -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.1 h1:mk5dRuzeDNis2bi6LLoQIXfMH7JQvAzt3mQD0vNZZUo= -github.com/hashicorp/memberlist v0.5.1/go.mod h1:zGDXV6AqbDTKTM6yxW0I4+JtFzZAJVoIPvss4hV8F24= +github.com/hashicorp/mdns v1.0.5 h1:1M5hW1cunYeoXOqHwEb/GBDDHAFo0Yqb/uz/beC6LbE= +github.com/hashicorp/mdns v1.0.5/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.2 h1:rJoNPWZ0juJBgqn48gjy59K5H4rNgvUoM1kUD7bXiuI= +github.com/hashicorp/memberlist v0.5.2/go.mod h1:Ri9p/tRShbjYnpNf4FFPXG7wxEGY4Nrcn6E7jrVa//4= 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.7.1 h1:ytxsNx4baHsRZrhUcbt3+79zc4ly8qm7pi0393pSchY= -github.com/hashicorp/raft v1.7.1/go.mod h1:hUeiEwQQR/Nk2iKDD0dkEhklSsu3jcAcqvPzPoZSAEM= +github.com/hashicorp/raft v1.7.2 h1:pyvxhfJ4R8VIAlHKvLoKQWElZspsCVT6YWuxVxsPAgc= +github.com/hashicorp/raft v1.7.2/go.mod h1:DfvCGFxpAUPE0L4Uc8JLlTPtc3GzSbdH0MTJCLgnmJQ= github.com/hashicorp/raft-autopilot v0.1.6 h1:C1q3RNF2FfXNZfHWbvVAu0QixaQK8K5pX4O5lh+9z4I= github.com/hashicorp/raft-autopilot v0.1.6/go.mod h1:Af4jZBwaNOI+tXfIqIdbcAnh/UyyqIMj/pOISIfhArw= github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= -github.com/hashicorp/raft-boltdb v0.0.0-20230125174641-2a8082862702 h1:RLKEcCuKcZ+qp2VlaaZsYZfLOmIiuJNpEi48Rl8u9cQ= -github.com/hashicorp/raft-boltdb v0.0.0-20230125174641-2a8082862702/go.mod h1:nTakvJ4XYq45UXtn0DbwR4aU9ZdjlnIenpbs6Cd+FM0= -github.com/hashicorp/raft-boltdb/v2 v2.3.0 h1:fPpQR1iGEVYjZ2OELvUHX600VAK5qmdnDEv3eXOwZUA= -github.com/hashicorp/raft-boltdb/v2 v2.3.0/go.mod h1:YHukhB04ChJsLHLJEUD6vjFyLX2L3dsX3wPBZcX4tmc= -github.com/hashicorp/serf v0.10.2-0.20240320153621-5d32001edfaa h1:UXgK+AZPfeQ1vOXXXfBj7C7mZpWUgRFcMAKpyyYrYgU= -github.com/hashicorp/serf v0.10.2-0.20240320153621-5d32001edfaa/go.mod h1:RiISHML4PEb0ZN6S6uNW04TO8D6EUtTIOpCzzDnZeGk= +github.com/hashicorp/raft-boltdb v0.0.0-20250113192317-e8660f88bcc9 h1:DtRY4x+oreq0BTrrfF66XeCg6DPJuR2AL4Ejeipau/A= +github.com/hashicorp/raft-boltdb v0.0.0-20250113192317-e8660f88bcc9/go.mod h1:FLQZr+lEOtW/5JZQCqRihQOrmyqWRqpJ+pP1gjb8XTE= +github.com/hashicorp/raft-boltdb/v2 v2.3.1 h1:ackhdCNPKblmOhjEU9+4lHSJYFkJd6Jqyvj6eW9pwkc= +github.com/hashicorp/raft-boltdb/v2 v2.3.1/go.mod h1:n4S+g43dXF1tqDT+yzcXHhXM6y7MrlUd3TTwGRcUvQE= +github.com/hashicorp/serf v0.10.2 h1:m5IORhuNSjaxeljg5DeQVDlQyVkhRIjJDimbkCa8aAc= +github.com/hashicorp/serf v0.10.2/go.mod h1:T1CmSGfSeGfnfNy/w0odXQUR1rfECGd2Qdsp84DjOiY= github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= github.com/hashicorp/vault/api v1.15.0 h1:O24FYQCWwhwKnF7CuSqP30S51rTV7vz1iACXE/pj5DA= github.com/hashicorp/vault/api v1.15.0/go.mod h1:+5YTO09JGn0u+b6ySD/LLVf8WkJCPLAL2Vkmrn2+CM8= @@ -1333,11 +1339,14 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= @@ -1353,6 +1362,7 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -1519,9 +1529,12 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1531,15 +1544,21 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -1582,6 +1601,7 @@ github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjM github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/softlayer/softlayer-go v0.0.0-20180806151055-260589d94c7d h1:bVQRCxQvfjNUeRqaY/uT0tFuvuFY0ulgnczuR684Xic= @@ -1807,6 +1827,7 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1951,6 +1972,7 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1966,6 +1988,8 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1989,6 +2013,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/helper/users/lookup_windows_test.go b/helper/users/lookup_windows_test.go index 0c8e5d70d..4ef11b67c 100644 --- a/helper/users/lookup_windows_test.go +++ b/helper/users/lookup_windows_test.go @@ -11,6 +11,7 @@ import ( "path/filepath" "testing" + "github.com/hashicorp/nomad/helper/testlog" "github.com/shoenig/test/must" ) diff --git a/lib/auth/jwt/validator.go b/lib/auth/jwt/validator.go index b1ebaacf8..9f5050de7 100644 --- a/lib/auth/jwt/validator.go +++ b/lib/auth/jwt/validator.go @@ -10,8 +10,8 @@ import ( "slices" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/cap/jwt" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/acl_endpoint.go b/nomad/acl_endpoint.go index 782ed7325..cd48a954d 100644 --- a/nomad/acl_endpoint.go +++ b/nomad/acl_endpoint.go @@ -14,10 +14,10 @@ import ( "strings" "time" - "github.com/armon/go-metrics" capOIDC "github.com/hashicorp/cap/oidc" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-set/v3" policy "github.com/hashicorp/nomad/acl" diff --git a/nomad/alloc_endpoint.go b/nomad/alloc_endpoint.go index 9e8678eb1..d0b47640f 100644 --- a/nomad/alloc_endpoint.go +++ b/nomad/alloc_endpoint.go @@ -8,9 +8,9 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/auth/auth.go b/nomad/auth/auth.go index 38fd64455..a2d88a507 100644 --- a/nomad/auth/auth.go +++ b/nomad/auth/auth.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/autopilot.go b/nomad/autopilot.go index 0d5b59360..a4c7401c9 100644 --- a/nomad/autopilot.go +++ b/nomad/autopilot.go @@ -8,7 +8,7 @@ import ( "fmt" "strconv" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/raft" diff --git a/nomad/blocked_evals.go b/nomad/blocked_evals.go index 57706c195..7368bf30b 100644 --- a/nomad/blocked_evals.go +++ b/nomad/blocked_evals.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/client_alloc_endpoint.go b/nomad/client_alloc_endpoint.go index 9ed17e5fa..e3d9eb571 100644 --- a/nomad/client_alloc_endpoint.go +++ b/nomad/client_alloc_endpoint.go @@ -11,8 +11,8 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/acl" diff --git a/nomad/client_csi_endpoint.go b/nomad/client_csi_endpoint.go index 8f2faf943..4052b380d 100644 --- a/nomad/client_csi_endpoint.go +++ b/nomad/client_csi_endpoint.go @@ -10,9 +10,9 @@ import ( "strings" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/client_fs_endpoint.go b/nomad/client_fs_endpoint.go index 165d88b70..22d1cdd7f 100644 --- a/nomad/client_fs_endpoint.go +++ b/nomad/client_fs_endpoint.go @@ -11,8 +11,8 @@ import ( "strings" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper/pointer" diff --git a/nomad/client_host_volume_endpoint.go b/nomad/client_host_volume_endpoint.go index c4afadc65..5cf2a3fa0 100644 --- a/nomad/client_host_volume_endpoint.go +++ b/nomad/client_host_volume_endpoint.go @@ -7,8 +7,8 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/client_meta_endpoint.go b/nomad/client_meta_endpoint.go index dbf577b6d..1fadd40c7 100644 --- a/nomad/client_meta_endpoint.go +++ b/nomad/client_meta_endpoint.go @@ -6,8 +6,8 @@ package nomad import ( "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/nomad/structs" nstructs "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/client_stats_endpoint.go b/nomad/client_stats_endpoint.go index d74bcdedb..4393a8ca0 100644 --- a/nomad/client_stats_endpoint.go +++ b/nomad/client_stats_endpoint.go @@ -6,8 +6,8 @@ package nomad import ( "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" nstructs "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/client/structs" diff --git a/nomad/consul.go b/nomad/consul.go index 19a8eeed0..2feb99d93 100644 --- a/nomad/consul.go +++ b/nomad/consul.go @@ -13,9 +13,9 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/consul/api" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/csi_endpoint.go b/nomad/csi_endpoint.go index 6f7bd2caa..fc86e7617 100644 --- a/nomad/csi_endpoint.go +++ b/nomad/csi_endpoint.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/dustin/go-humanize" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/acl" diff --git a/nomad/deployment_endpoint.go b/nomad/deployment_endpoint.go index e775f07a7..13291b6de 100644 --- a/nomad/deployment_endpoint.go +++ b/nomad/deployment_endpoint.go @@ -8,9 +8,9 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/eval_broker.go b/nomad/eval_broker.go index 8d99eac45..3205eb552 100644 --- a/nomad/eval_broker.go +++ b/nomad/eval_broker.go @@ -13,7 +13,7 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/broker" diff --git a/nomad/eval_endpoint.go b/nomad/eval_endpoint.go index 018115355..a0d5e3159 100644 --- a/nomad/eval_endpoint.go +++ b/nomad/eval_endpoint.go @@ -9,10 +9,10 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-bexpr" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-version" diff --git a/nomad/fsm.go b/nomad/fsm.go index 3cc4bf101..8ba018ea3 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-bexpr" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/helper/pointer" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/heartbeat.go b/nomad/heartbeat.go index 1d8596a83..720e7b005 100644 --- a/nomad/heartbeat.go +++ b/nomad/heartbeat.go @@ -8,9 +8,9 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/host_volume_endpoint.go b/nomad/host_volume_endpoint.go index aa8e7ced7..4f987212a 100644 --- a/nomad/host_volume_endpoint.go +++ b/nomad/host_volume_endpoint.go @@ -13,9 +13,9 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/helper" diff --git a/nomad/job_endpoint.go b/nomad/job_endpoint.go index 7267f0a15..d38db2db2 100644 --- a/nomad/job_endpoint.go +++ b/nomad/job_endpoint.go @@ -12,10 +12,10 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/golang/snappy" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-set/v3" "github.com/hashicorp/nomad/acl" diff --git a/nomad/job_endpoint_statuses.go b/nomad/job_endpoint_statuses.go index 74ff44562..ff8120fb9 100644 --- a/nomad/job_endpoint_statuses.go +++ b/nomad/job_endpoint_statuses.go @@ -8,8 +8,8 @@ import ( "net/http" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-set/v3" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/keyring_endpoint.go b/nomad/keyring_endpoint.go index 018f7f638..2500cfed8 100644 --- a/nomad/keyring_endpoint.go +++ b/nomad/keyring_endpoint.go @@ -8,9 +8,9 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/leader.go b/nomad/leader.go index 271635b01..0ef08b74c 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -13,9 +13,9 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/lock/delay.go b/nomad/lock/delay.go index 4e1cf89e9..e407f891e 100644 --- a/nomad/lock/delay.go +++ b/nomad/lock/delay.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" ) diff --git a/nomad/lock/ttl.go b/nomad/lock/ttl.go index f0befe3b4..5989a33fa 100644 --- a/nomad/lock/ttl.go +++ b/nomad/lock/ttl.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" ) diff --git a/nomad/namespace_endpoint.go b/nomad/namespace_endpoint.go index 61452345b..b9812dac5 100644 --- a/nomad/namespace_endpoint.go +++ b/nomad/namespace_endpoint.go @@ -7,8 +7,8 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/node_endpoint.go b/nomad/node_endpoint.go index 3f626464c..ed9ca3b91 100644 --- a/nomad/node_endpoint.go +++ b/nomad/node_endpoint.go @@ -13,9 +13,9 @@ import ( "sync" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" vapi "github.com/hashicorp/vault/api" "golang.org/x/sync/errgroup" diff --git a/nomad/node_pool_endpoint.go b/nomad/node_pool_endpoint.go index efc88f39e..25a9292df 100644 --- a/nomad/node_pool_endpoint.go +++ b/nomad/node_pool_endpoint.go @@ -9,8 +9,8 @@ import ( "net/http" "time" - metrics "github.com/armon/go-metrics" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/periodic_endpoint.go b/nomad/periodic_endpoint.go index 1baf9ddfa..bb70ae908 100644 --- a/nomad/periodic_endpoint.go +++ b/nomad/periodic_endpoint.go @@ -7,9 +7,9 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/plan_apply.go b/nomad/plan_apply.go index e2e76894a..5fff21edc 100644 --- a/nomad/plan_apply.go +++ b/nomad/plan_apply.go @@ -9,9 +9,9 @@ import ( "runtime" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/plan_apply_node_tracker.go b/nomad/plan_apply_node_tracker.go index 9f080109c..c79d02e10 100644 --- a/nomad/plan_apply_node_tracker.go +++ b/nomad/plan_apply_node_tracker.go @@ -7,8 +7,8 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" lru "github.com/hashicorp/golang-lru/v2" "github.com/hashicorp/nomad/helper" "golang.org/x/time/rate" diff --git a/nomad/plan_endpoint.go b/nomad/plan_endpoint.go index 465481d1f..79b5026d5 100644 --- a/nomad/plan_endpoint.go +++ b/nomad/plan_endpoint.go @@ -7,8 +7,8 @@ import ( "fmt" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/plan_queue.go b/nomad/plan_queue.go index bd9f23e63..ef132f854 100644 --- a/nomad/plan_queue.go +++ b/nomad/plan_queue.go @@ -9,7 +9,7 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/rpc.go b/nomad/rpc.go index b32cbfaab..455c7162e 100644 --- a/nomad/rpc.go +++ b/nomad/rpc.go @@ -17,10 +17,10 @@ import ( "strings" "time" - metrics "github.com/armon/go-metrics" "github.com/hashicorp/go-connlimit" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-msgpack/v2/codec" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/pool" diff --git a/nomad/rpc_rate_metrics.go b/nomad/rpc_rate_metrics.go index 8caf7a8b9..6b60e2831 100644 --- a/nomad/rpc_rate_metrics.go +++ b/nomad/rpc_rate_metrics.go @@ -4,7 +4,7 @@ package nomad import ( - "github.com/armon/go-metrics" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/scaling_endpoint.go b/nomad/scaling_endpoint.go index d7b3766fd..8ebafd099 100644 --- a/nomad/scaling_endpoint.go +++ b/nomad/scaling_endpoint.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/search_endpoint.go b/nomad/search_endpoint.go index b6743c423..f430b9c21 100644 --- a/nomad/search_endpoint.go +++ b/nomad/search_endpoint.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/server.go b/nomad/server.go index 655ce8758..f77243d88 100644 --- a/nomad/server.go +++ b/nomad/server.go @@ -21,9 +21,9 @@ import ( "sync/atomic" "time" - "github.com/armon/go-metrics" consulapi "github.com/hashicorp/consul/api" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/raft" autopilot "github.com/hashicorp/raft-autopilot" diff --git a/nomad/service_registration_endpoint.go b/nomad/service_registration_endpoint.go index eede684ce..1ed805f67 100644 --- a/nomad/service_registration_endpoint.go +++ b/nomad/service_registration_endpoint.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-set/v3" diff --git a/nomad/stream/event_broker.go b/nomad/stream/event_broker.go index bf9e22c03..733b559bf 100644 --- a/nomad/stream/event_broker.go +++ b/nomad/stream/event_broker.go @@ -9,10 +9,10 @@ import ( "sync" "sync/atomic" - "github.com/armon/go-metrics" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" ) const ( diff --git a/nomad/structs/cni_config_test.go b/nomad/structs/cni_config_test.go index e7cf78b88..04bf65ac9 100644 --- a/nomad/structs/cni_config_test.go +++ b/nomad/structs/cni_config_test.go @@ -4,9 +4,10 @@ package structs import ( + "testing" + "github.com/hashicorp/nomad/ci" "github.com/shoenig/test/must" - "testing" ) func TestCNIConfig_Equal(t *testing.T) { diff --git a/nomad/variables_endpoint.go b/nomad/variables_endpoint.go index 1261e8fe8..819a547d3 100644 --- a/nomad/variables_endpoint.go +++ b/nomad/variables_endpoint.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/armon/go-metrics" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/auth" diff --git a/nomad/vault.go b/nomad/vault.go index e2827a122..71e70c890 100644 --- a/nomad/vault.go +++ b/nomad/vault.go @@ -18,8 +18,8 @@ import ( "github.com/hashicorp/nomad/helper/useragent" tomb "gopkg.in/tomb.v2" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" diff --git a/nomad/worker.go b/nomad/worker.go index b49ebf4a2..0322d7d38 100644 --- a/nomad/worker.go +++ b/nomad/worker.go @@ -12,9 +12,9 @@ import ( "sync" "time" - metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid" diff --git a/scheduler/reconcile.go b/scheduler/reconcile.go index bf9241797..644e274dd 100644 --- a/scheduler/reconcile.go +++ b/scheduler/reconcile.go @@ -14,8 +14,8 @@ import ( "sort" "time" - "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + metrics "github.com/hashicorp/go-metrics/compat" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid"