From 0e847c7f403c526bebf56efdd72580284afef70d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 09:05:57 +0000 Subject: [PATCH 1/3] Bump github.com/prometheus/client_golang from 1.14.0 to 1.16.0 Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 76bd2680c..fc4430c46 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/golang/snappy v0.0.3 // indirect github.com/percona/exporter_shared v0.7.4 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.16.0 github.com/prometheus/client_model v0.4.0 github.com/prometheus/common v0.42.0 github.com/prometheus/exporter-toolkit v0.10.0 diff --git a/go.sum b/go.sum index a3ce3ba1b..e2744392a 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 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.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +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_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= From d17cf2de7f45c100960379eda7cf434aafb46e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C4=8Ctvrtka?= Date: Wed, 16 Aug 2023 12:31:30 +0200 Subject: [PATCH 2/3] Fix tests. --- exporter/v1_compatibility_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exporter/v1_compatibility_test.go b/exporter/v1_compatibility_test.go index de7910849..6f67aa932 100644 --- a/exporter/v1_compatibility_test.go +++ b/exporter/v1_compatibility_test.go @@ -87,7 +87,7 @@ func TestMakeLockMetric(t *testing.T) { want := `Desc{fqName: "mongodb_ss_locks_acquireCount", ` + `help: "mongodb_ss_locks_acquireCount", ` + - `constLabels: {}, variableLabels: [lock_mode resource]}` + `constLabels: {}, variableLabels: [{lock_mode } {resource }]}` p, err := makeLockMetric(m, lm) assert.NoError(t, err) @@ -118,19 +118,19 @@ func TestAddLocksMetrics(t *testing.T) { err := metric.Write(&m) assert.NoError(t, err) - ms = strings.ReplaceAll(ms, "resource lock_mode", "lock_mode resource") + ms = strings.ReplaceAll(ms, "{resource } {lock_mode }", "{lock_mode } {resource }") desc = append(desc, ms) } sort.Strings(desc) want := []string{ - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_acquireWaitCount\", help: \"mongodb_ss_locks_acquireWaitCount\", constLabels: {}, variableLabels: [lock_mode resource]}", - "Desc{fqName: \"mongodb_ss_locks_timeAcquiringMicros\", help: \"mongodb_ss_locks_timeAcquiringMicros\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireWaitCount\", help: \"mongodb_ss_locks_acquireWaitCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_timeAcquiringMicros\", help: \"mongodb_ss_locks_timeAcquiringMicros\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", } assert.Equal(t, want, desc) From 08f1e869aae8557264578a82b19048c584296ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C4=8Ctvrtka?= Date: Thu, 7 Dec 2023 10:17:15 +0100 Subject: [PATCH 3/3] Revert "Fix tests." This reverts commit d17cf2de7f45c100960379eda7cf434aafb46e39. --- exporter/v1_compatibility_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/exporter/v1_compatibility_test.go b/exporter/v1_compatibility_test.go index 08793735a..6dcbff713 100644 --- a/exporter/v1_compatibility_test.go +++ b/exporter/v1_compatibility_test.go @@ -87,7 +87,7 @@ func TestMakeLockMetric(t *testing.T) { want := `Desc{fqName: "mongodb_ss_locks_acquireCount", ` + `help: "mongodb_ss_locks_acquireCount", ` + - `constLabels: {}, variableLabels: [{lock_mode } {resource }]}` + `constLabels: {}, variableLabels: [lock_mode resource]}` p, err := makeLockMetric(m, lm) assert.NoError(t, err) @@ -118,19 +118,19 @@ func TestAddLocksMetrics(t *testing.T) { err := metric.Write(&m) assert.NoError(t, err) - ms = strings.ReplaceAll(ms, "{resource } {lock_mode }", "{lock_mode } {resource }") + ms = strings.ReplaceAll(ms, "resource lock_mode", "lock_mode resource") desc = append(desc, ms) } sort.Strings(desc) want := []string{ - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_acquireWaitCount\", help: \"mongodb_ss_locks_acquireWaitCount\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", - "Desc{fqName: \"mongodb_ss_locks_timeAcquiringMicros\", help: \"mongodb_ss_locks_timeAcquiringMicros\", constLabels: {}, variableLabels: [{lock_mode } {resource }]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireCount\", help: \"mongodb_ss_locks_acquireCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_acquireWaitCount\", help: \"mongodb_ss_locks_acquireWaitCount\", constLabels: {}, variableLabels: [lock_mode resource]}", + "Desc{fqName: \"mongodb_ss_locks_timeAcquiringMicros\", help: \"mongodb_ss_locks_timeAcquiringMicros\", constLabels: {}, variableLabels: [lock_mode resource]}", } assert.Equal(t, want, desc)