From d2c8f871a7ef64f1fee826f1eacf8d150988ace7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 19 Oct 2024 04:19:07 +0000 Subject: [PATCH] fix(deps): update patch digest dependencies --- go.mod | 10 +++---- go.sum | 20 ++++++------- .../prometheus/testutil/testutil.go | 30 ++++++++----------- vendor/modules.txt | 10 +++---- 4 files changed, 32 insertions(+), 38 deletions(-) diff --git a/go.mod b/go.mod index 44728aec38..0c85495feb 100644 --- a/go.mod +++ b/go.mod @@ -61,15 +61,15 @@ require ( github.com/jinzhu/copier v0.4.0 github.com/kubernetes-csi/csi-lib-utils v0.19.0 github.com/longhorn/backing-image-manager v1.8.0-dev-20241006 - github.com/longhorn/backupstore v0.0.0-20241013024428-b52180a5191f - github.com/longhorn/go-common-libs v0.0.0-20241012153249-4c71f1cbdd9e - github.com/longhorn/go-iscsi-helper v0.0.0-20241006012607-08f5166d1fad - github.com/longhorn/go-spdk-helper v0.0.0-20240922062342-22115a91cbe9 + github.com/longhorn/backupstore v0.0.0-20241019040107-9af970b538d9 + github.com/longhorn/go-common-libs v0.0.0-20241018042323-54da24c0807f + github.com/longhorn/go-iscsi-helper v0.0.0-20241018035016-4f89087f131a + github.com/longhorn/go-spdk-helper v0.0.0-20241018034138-ef1671b8828a github.com/longhorn/longhorn-engine v1.8.0-dev-20241006 github.com/longhorn/longhorn-instance-manager v1.8.0-dev-20241006 github.com/longhorn/longhorn-share-manager v1.7.0-rc1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.20.4 + github.com/prometheus/client_golang v1.20.5 github.com/rancher/dynamiclistener v0.6.0 github.com/rancher/go-rancher v0.1.1-0.20220412083059-ff12399dd57b github.com/rancher/wrangler/v3 v3.0.0 diff --git a/go.sum b/go.sum index 42ee459591..f7561baa38 100644 --- a/go.sum +++ b/go.sum @@ -160,14 +160,14 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/longhorn/backing-image-manager v1.8.0-dev-20241006 h1:F0e8AWz1lBqrBwitsVMCDY+8777UFL2N3vvy/iISV+4= github.com/longhorn/backing-image-manager v1.8.0-dev-20241006/go.mod h1:346sxN8ZSI6xZpp80nZFkd9LBQ2lrQj6lTTJ5XirDb8= -github.com/longhorn/backupstore v0.0.0-20241013024428-b52180a5191f h1:p2DmYXbpCSYRrdpZR5w9Py3sgXfK8zdWxfpH83tnk7E= -github.com/longhorn/backupstore v0.0.0-20241013024428-b52180a5191f/go.mod h1:Wv5tV0/Jv2OuYo8ZcpgsLVOS4xos2qKLrLQ7pgWsfFY= -github.com/longhorn/go-common-libs v0.0.0-20241012153249-4c71f1cbdd9e h1:ux8DZoSohmkA4vpvmlw8ow5pGsaSiVRAONkGx7l1R1Y= -github.com/longhorn/go-common-libs v0.0.0-20241012153249-4c71f1cbdd9e/go.mod h1:ypnoivZeYoZVRqeI2MQHEGA+Vqt8DZVkCbhf/3Ogx7Q= -github.com/longhorn/go-iscsi-helper v0.0.0-20241006012607-08f5166d1fad h1:AqhTx1s0Ym//9Tdhyo/i+gCpRAJLFwue8QWD5XCRVz8= -github.com/longhorn/go-iscsi-helper v0.0.0-20241006012607-08f5166d1fad/go.mod h1:pumnMfyGDTfupyMeT7G3m/Xc15Veo8nKkod5Unv4ff0= -github.com/longhorn/go-spdk-helper v0.0.0-20240922062342-22115a91cbe9 h1:DVYw6dzssMcCOAQSqXLVJIQQiKdZD7lAKfnU2ZTf4Mo= -github.com/longhorn/go-spdk-helper v0.0.0-20240922062342-22115a91cbe9/go.mod h1:pKbJjuJN69T+qDaJIkR1NcpGqCzj/vGv1NTTDiaE5s0= +github.com/longhorn/backupstore v0.0.0-20241019040107-9af970b538d9 h1:AsSKjJE86AlE2KmlzHTeDNHKL3vcWRbyaF5UeSlC7Rw= +github.com/longhorn/backupstore v0.0.0-20241019040107-9af970b538d9/go.mod h1:pjGUeLCEvhf60bwNtS+I30ypt6I9lZ2ofXHZ2oLUmgM= +github.com/longhorn/go-common-libs v0.0.0-20241018042323-54da24c0807f h1:X0Ty+fnoZ5ExhHdD42TdXd2GAU5sXyaio3AAZlO3fwI= +github.com/longhorn/go-common-libs v0.0.0-20241018042323-54da24c0807f/go.mod h1:ypnoivZeYoZVRqeI2MQHEGA+Vqt8DZVkCbhf/3Ogx7Q= +github.com/longhorn/go-iscsi-helper v0.0.0-20241018035016-4f89087f131a h1:TarAvaVXy2+gLUvCAaVovr8BR9cvfvQALAxPly61bhg= +github.com/longhorn/go-iscsi-helper v0.0.0-20241018035016-4f89087f131a/go.mod h1:oWdfPL2qthHBLT+Gc+F+74hjCuVg3u9Ra/lj2s7rBKQ= +github.com/longhorn/go-spdk-helper v0.0.0-20241018034138-ef1671b8828a h1:Do47so6CGBNXET60D5xG+uTigHEhFkqBWxsOUtCBYs8= +github.com/longhorn/go-spdk-helper v0.0.0-20241018034138-ef1671b8828a/go.mod h1:6M1KFegUVaufWbVnMSGyvs+1JFEPFz3gjM6mmcN2/2o= github.com/longhorn/longhorn-engine v1.8.0-dev-20241006 h1:5Lt3hBp1Cwq0x63rBPiYzPtDFznrSump5etrNgpjkpo= github.com/longhorn/longhorn-engine v1.8.0-dev-20241006/go.mod h1:002zgFfWQEPrGsxVDKgJnZFboN7ixt/WogpJ08tsrvY= github.com/longhorn/longhorn-instance-manager v1.8.0-dev-20241006 h1:HsdJqE7BSHMTjaHCLQpWMd2DypGoZjZN5+V9m2tjQaY= @@ -217,8 +217,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +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= 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= diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go index e0ac346665..6f1200180a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go @@ -158,6 +158,9 @@ func GatherAndCount(g prometheus.Gatherer, metricNames ...string) (int, error) { // ScrapeAndCompare calls a remote exporter's endpoint which is expected to return some metrics in // plain text format. Then it compares it with the results that the `expected` would return. // If the `metricNames` is not empty it would filter the comparison only to the given metric names. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and scraped metrics. See https://github.com/prometheus/client_golang/issues/1351. func ScrapeAndCompare(url string, expected io.Reader, metricNames ...string) error { resp, err := http.Get(url) if err != nil { @@ -185,6 +188,9 @@ func ScrapeAndCompare(url string, expected io.Reader, metricNames ...string) err // CollectAndCompare collects the metrics identified by `metricNames` and compares them in the Prometheus text // exposition format to the data read from expected. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and collected metrics. See https://github.com/prometheus/client_golang/issues/1351. func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames ...string) error { reg := prometheus.NewPedanticRegistry() if err := reg.Register(c); err != nil { @@ -197,6 +203,9 @@ func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames . // it to an expected output read from the provided Reader in the Prometheus text // exposition format. If any metricNames are provided, only metrics with those // names are compared. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and gathered metrics. See https://github.com/prometheus/client_golang/issues/1351. func GatherAndCompare(g prometheus.Gatherer, expected io.Reader, metricNames ...string) error { return TransactionalGatherAndCompare(prometheus.ToTransactionalGatherer(g), expected, metricNames...) } @@ -205,6 +214,9 @@ func GatherAndCompare(g prometheus.Gatherer, expected io.Reader, metricNames ... // it to an expected output read from the provided Reader in the Prometheus text // exposition format. If any metricNames are provided, only metrics with those // names are compared. +// +// NOTE: Be mindful of accidental discrepancies between expected and metricNames; metricNames filter +// both expected and gathered metrics. See https://github.com/prometheus/client_golang/issues/1351. func TransactionalGatherAndCompare(g prometheus.TransactionalGatherer, expected io.Reader, metricNames ...string) error { got, done, err := g.Gather() defer done() @@ -277,15 +289,6 @@ func compareMetricFamilies(got, expected []*dto.MetricFamily, metricNames ...str if metricNames != nil { got = filterMetrics(got, metricNames) expected = filterMetrics(expected, metricNames) - if len(metricNames) > len(got) { - var missingMetricNames []string - for _, name := range metricNames { - if ok := hasMetricByName(got, name); !ok { - missingMetricNames = append(missingMetricNames, name) - } - } - return fmt.Errorf("expected metric name(s) not found: %v", missingMetricNames) - } } return compare(got, expected) @@ -327,12 +330,3 @@ func filterMetrics(metrics []*dto.MetricFamily, names []string) []*dto.MetricFam } return filtered } - -func hasMetricByName(metrics []*dto.MetricFamily, name string) bool { - for _, mf := range metrics { - if mf.GetName() == name { - return true - } - } - return false -} diff --git a/vendor/modules.txt b/vendor/modules.txt index f50ae5028c..67be7335ca 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -239,7 +239,7 @@ github.com/longhorn/backing-image-manager/pkg/client github.com/longhorn/backing-image-manager/pkg/meta github.com/longhorn/backing-image-manager/pkg/types github.com/longhorn/backing-image-manager/pkg/util -# github.com/longhorn/backupstore v0.0.0-20241013024428-b52180a5191f +# github.com/longhorn/backupstore v0.0.0-20241019040107-9af970b538d9 ## explicit; go 1.22.0 github.com/longhorn/backupstore github.com/longhorn/backupstore/backupbackingimage @@ -248,7 +248,7 @@ github.com/longhorn/backupstore/logging github.com/longhorn/backupstore/systembackup github.com/longhorn/backupstore/types github.com/longhorn/backupstore/util -# github.com/longhorn/go-common-libs v0.0.0-20241012153249-4c71f1cbdd9e +# github.com/longhorn/go-common-libs v0.0.0-20241018042323-54da24c0807f ## explicit; go 1.22.0 github.com/longhorn/go-common-libs/backup github.com/longhorn/go-common-libs/exec @@ -261,14 +261,14 @@ github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/test/fake github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/go-iscsi-helper v0.0.0-20241006012607-08f5166d1fad +# github.com/longhorn/go-iscsi-helper v0.0.0-20241018035016-4f89087f131a ## explicit; go 1.22.0 github.com/longhorn/go-iscsi-helper/iscsi github.com/longhorn/go-iscsi-helper/iscsidev github.com/longhorn/go-iscsi-helper/longhorndev github.com/longhorn/go-iscsi-helper/types github.com/longhorn/go-iscsi-helper/util -# github.com/longhorn/go-spdk-helper v0.0.0-20240922062342-22115a91cbe9 +# github.com/longhorn/go-spdk-helper v0.0.0-20241018034138-ef1671b8828a ## explicit; go 1.22.0 github.com/longhorn/go-spdk-helper/pkg/types # github.com/longhorn/longhorn-engine v1.8.0-dev-20241006 @@ -354,7 +354,7 @@ github.com/pmezard/go-difflib/difflib # github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 ## explicit; go 1.14 github.com/power-devops/perfstat -# github.com/prometheus/client_golang v1.20.4 +# github.com/prometheus/client_golang v1.20.5 ## explicit; go 1.20 github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header