From 5a2599832ce164633615f079dd70ffa75aa93f75 Mon Sep 17 00:00:00 2001 From: "william.vanhevelingen" Date: Fri, 23 Feb 2024 22:09:35 -0800 Subject: [PATCH] chore(deps): bump prometheus dependencies Signed-off-by: william.vanhevelingen fixes #12429, fixes #12272, fixes #11957 Signed-off-by: william.vanhevelingen --- go.mod | 9 +++---- go.sum | 18 ++++++------- workflow/controller/operator_metrics_test.go | 28 ++++++++++---------- workflow/metrics/metrics_test.go | 6 ++--- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 5cc23c88b5a8..d9ab55bdf521 100644 --- a/go.mod +++ b/go.mod @@ -39,9 +39,9 @@ require ( github.com/klauspost/pgzip v1.2.6 github.com/minio/minio-go/v7 v7.0.66 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/client_model v0.3.0 - github.com/prometheus/common v0.42.0 + github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_model v0.6.0 + github.com/prometheus/common v0.48.0 github.com/robfig/cron/v3 v3.0.1 github.com/sethvargo/go-limiter v0.7.2 github.com/sirupsen/logrus v1.9.3 @@ -224,7 +224,6 @@ require ( github.com/lithammer/dedent v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -246,7 +245,7 @@ require ( github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rs/xid v1.5.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect diff --git a/go.sum b/go.sum index 2b57e46edd82..214d45a0ac41 100644 --- a/go.sum +++ b/go.sum @@ -758,8 +758,6 @@ github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= @@ -864,27 +862,27 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 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.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 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.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= diff --git a/workflow/controller/operator_metrics_test.go b/workflow/controller/operator_metrics_test.go index 51b597ee9d69..d5fbff41b4c3 100644 --- a/workflow/controller/operator_metrics_test.go +++ b/workflow/controller/operator_metrics_test.go @@ -70,7 +70,7 @@ func TestBasicMetric(t *testing.T) { metric := controller.metrics.GetCustomMetric(metricDesc).(prometheus.Gauge) metricString, err := getMetricStringValue(metric) assert.NoError(t, err) - assert.Contains(t, metricString, `label: gauge: gauge:`) + assert.Contains(t, metricAddGaugeValue, `label:{name:"name" value:"random-int"} gauge:{value:10}`) metricSubGauge := controller.metrics.GetCustomMetric(metricSubDesc).(prometheus.Gauge) metricSubGaugeValue, err := getMetricStringValue(metricSubGauge) assert.NoError(t, err) - assert.Contains(t, metricSubGaugeValue, `label: gauge:`) + assert.Contains(t, metricSubGaugeValue, `label:{name:"name" value:"random-int"} gauge:{value:-5}`) metricSetGauge := controller.metrics.GetCustomMetric(metricSetDesc).(prometheus.Gauge) metricSetGaugeValue, err := getMetricStringValue(metricSetGauge) assert.NoError(t, err) - assert.Contains(t, metricSetGaugeValue, `label: gauge:`) + assert.Contains(t, metricSetGaugeValue, `label:{name:"name" value:"random-int"} gauge:{value:50}`) metricDefaultGauge := controller.metrics.GetCustomMetric(metricDefaultDesc).(prometheus.Gauge) metricDefaultGaugeValue, err := getMetricStringValue(metricDefaultGauge) assert.NoError(t, err) - assert.Contains(t, metricDefaultGaugeValue, `label: gauge:`) + assert.Contains(t, metricDefaultGaugeValue, `label:{name:"name" value:"random-int"} gauge:{value:15}`) } var counterMetric = ` @@ -221,13 +221,13 @@ func TestCounterMetric(t *testing.T) { metricTotalCounter := controller.metrics.GetCustomMetric(metricTotalDesc).(prometheus.Counter) metricTotalCounterString, err := getMetricStringValue(metricTotalCounter) assert.NoError(t, err) - assert.Contains(t, metricTotalCounterString, `label: counter:`) + assert.Contains(t, metricTotalCounterString, `label:{name:"name" value:"flakey"} counter:{value:1`) metricErrorCounter, ok := controller.metrics.GetCustomMetric(metricErrorDesc).(prometheus.Counter) if ok { metricErrorCounterString, err := getMetricStringValue(metricErrorCounter) assert.NoError(t, err) - assert.Contains(t, metricErrorCounterString, `label: counter:`) + assert.Contains(t, metricErrorCounterString, `label:{name:"name" value:"flakey"} counter:{value:1`) } } @@ -325,7 +325,7 @@ func TestMetricEmissionSameOperationCreationAndFailure(t *testing.T) { metricErrorCounter := controller.metrics.GetCustomMetric(metricErrorDesc).(prometheus.Counter) metricErrorCounterString, err := getMetricStringValue(metricErrorCounter) assert.NoError(t, err) - assert.Contains(t, metricErrorCounterString, `counter: `) + assert.Contains(t, metricErrorCounterString, `counter:{value:1 `) } var testRetryStrategyMetric = ` @@ -406,14 +406,14 @@ func TestRetryStrategyMetric(t *testing.T) { metricErrorCounter := controller.metrics.GetCustomMetric(metricErrorDesc).(prometheus.Counter) metricErrorCounterString, err := getMetricStringValue(metricErrorCounter) assert.NoError(t, err) - assert.Contains(t, metricErrorCounterString, `counter: `) + assert.Contains(t, metricErrorCounterString, `counter:{value:1 `) metricErrorDesc = wf.Spec.Templates[1].Metrics.Prometheus[0].GetDesc() assert.NotNil(t, controller.metrics.GetCustomMetric(metricErrorDesc)) metricErrorCounter = controller.metrics.GetCustomMetric(metricErrorDesc).(prometheus.Counter) metricErrorCounterString, err = getMetricStringValue(metricErrorCounter) assert.NoError(t, err) - assert.Contains(t, metricErrorCounterString, `counter: `) + assert.Contains(t, metricErrorCounterString, `counter:{value:1 `) } } @@ -524,7 +524,7 @@ func TestDAGTmplMetrics(t *testing.T) { metricHistogram := controller.metrics.GetCustomMetric(metricDesc).(prometheus.Histogram) metricHistogramString, err := getMetricStringValue(metricHistogram) assert.NoError(t, err) - assert.Contains(t, metricHistogramString, `histogram: `) + assert.Contains(t, metricCounterString, `counter:{value:1 `) } var testRealtimeWorkflowMetric = ` @@ -584,7 +584,7 @@ func TestRealtimeWorkflowMetric(t *testing.T) { metricErrorCounter := controller.metrics.GetCustomMetric(metricErrorDesc) metricErrorCounterString, err := getMetricStringValue(metricErrorCounter) assert.NoError(t, err) - assert.Contains(t, metricErrorCounterString, `label: gauge: gauge: