From 7bde4c572b7fc2b5827ec041116bb6336072591f Mon Sep 17 00:00:00 2001 From: Pavel Okhlopkov <36456348+ldmonster@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:34:17 +0300 Subject: [PATCH 1/5] Fix/double logging std (#677) Signed-off-by: Pavel Okhlopkov Co-authored-by: Pavel Okhlopkov --- pkg/executor/executor.go | 66 +++++++++++++++++++++++++++++++---- pkg/executor/executor_test.go | 16 ++++++++- 2 files changed, 75 insertions(+), 7 deletions(-) diff --git a/pkg/executor/executor.go b/pkg/executor/executor.go index 95d5ddb3..e62b7b81 100644 --- a/pkg/executor/executor.go +++ b/pkg/executor/executor.go @@ -1,6 +1,7 @@ package executor import ( + "bufio" "bytes" "encoding/json" "fmt" @@ -77,17 +78,18 @@ type proxyJSONLogger struct { logProxyHookJSON bool } -func (pj *proxyJSONLogger) Write(p []byte) (n int, err error) { - pj.buf = append(pj.buf, p...) - +func (pj *proxyJSONLogger) Write(p []byte) (int, error) { if !pj.logProxyHookJSON { - pj.Entry.Log(log.InfoLevel, strings.TrimSpace(string(pj.buf))) + pj.writerScanner(p) return len(p), nil } + // join all parts of json + pj.buf = append(pj.buf, p...) + var line interface{} - err = json.Unmarshal(pj.buf, &line) + err := json.Unmarshal(pj.buf, &line) if err != nil { if err.Error() == "unexpected end of JSON input" { return len(p), nil @@ -107,15 +109,67 @@ func (pj *proxyJSONLogger) Write(p []byte) (n int, err error) { logMap[k] = v } - logLine, _ := json.Marshal(logMap) + logLineRaw, _ := json.Marshal(logMap) + + logLine := string(logLineRaw) logEntry := pj.WithField(app.ProxyJsonLogKey, true) + if len(logLine) > 10000 { + logLine = fmt.Sprintf("%s:truncated", string(logLine[:10000])) + + truncatedLog, _ := json.Marshal(map[string]string{ + "truncated": logLine, + }) + + logEntry.Log(log.FatalLevel, string(truncatedLog)) + } + logEntry.Log(log.FatalLevel, string(logLine)) return len(p), nil } +func (pj *proxyJSONLogger) writerScanner(p []byte) { + scanner := bufio.NewScanner(bytes.NewReader(p)) + + // Set the buffer size to the maximum token size to avoid buffer overflows + scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize) + + // Define a split function to split the input into chunks of up to 64KB + chunkSize := bufio.MaxScanTokenSize // 64KB + splitFunc := func(data []byte, atEOF bool) (int, []byte, error) { + if len(data) >= chunkSize { + return chunkSize, data[:chunkSize], nil + } + + return bufio.ScanLines(data, atEOF) + } + + // Use the custom split function to split the input + scanner.Split(splitFunc) + + // Scan the input and write it to the logger using the specified print function + for scanner.Scan() { + // prevent empty logging + str := strings.TrimSpace(scanner.Text()) + if str == "" { + continue + } + + if len(str) > 10000 { + str = fmt.Sprintf("%s:truncated", str[:10000]) + } + + pj.Entry.Info(str) + } + + // If there was an error while scanning the input, log an error + if err := scanner.Err(); err != nil { + pj.Entry.Errorf("Error while reading from Writer: %s", err) + } +} + func Output(cmd *exec.Cmd) (output []byte, err error) { // TODO context: hook name, hook phase, hook binding // TODO observability diff --git a/pkg/executor/executor_test.go b/pkg/executor/executor_test.go index d3815555..a3cae4d3 100644 --- a/pkg/executor/executor_test.go +++ b/pkg/executor/executor_test.go @@ -55,7 +55,7 @@ func TestRunAndLogLines(t *testing.T) { cmd := exec.Command("cat", f.Name()) _, err = RunAndLogLines(cmd, map[string]string{"a": "b"}) assert.NoError(t, err) - assert.Contains(t, buf.String(), `\",\"output\":\"stdout\"}" a=b output=stdout proxyJsonLog=true`) + assert.Contains(t, buf.String(), `:truncated\"}" a=b output=stdout proxyJsonLog=true`) buf.Reset() }) @@ -82,6 +82,20 @@ func TestRunAndLogLines(t *testing.T) { buf.Reset() }) + + t.Run("multiline non json", func(t *testing.T) { + app.LogProxyHookJSON = false + cmd := exec.Command("echo", ` +a b +c d +`) + _, err := RunAndLogLines(cmd, map[string]string{"foor": "baar"}) + assert.NoError(t, err) + assert.Contains(t, buf.String(), `level=info msg="a b" foor=baar output=stdout`) + assert.Contains(t, buf.String(), `level=info msg="c d" foor=baar output=stdout`) + + buf.Reset() + }) } var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") From e643dfffedc6e79305b4eaf175b9ce67c42e0551 Mon Sep 17 00:00:00 2001 From: Mikhail Scherba <41360396+miklezzzz@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:55:26 +0400 Subject: [PATCH 2/5] [metric_storage] Metric storage group expire (#676) Signed-off-by: Mikhail Scherba --- pkg/metric/grouped_storage_mock.go | 326 +++++++++++++++++++++++++ pkg/metric/storage.go | 1 + pkg/metric_storage/metric_storage.go | 2 +- pkg/metric_storage/vault/vault.go | 41 +++- pkg/metric_storage/vault/vault_test.go | 39 ++- 5 files changed, 394 insertions(+), 15 deletions(-) diff --git a/pkg/metric/grouped_storage_mock.go b/pkg/metric/grouped_storage_mock.go index 86df32c4..babe2e96 100644 --- a/pkg/metric/grouped_storage_mock.go +++ b/pkg/metric/grouped_storage_mock.go @@ -25,6 +25,13 @@ type GroupedStorageMock struct { beforeCounterAddCounter uint64 CounterAddMock mGroupedStorageMockCounterAdd + funcExpireGroupMetricByName func(group string, name string) + funcExpireGroupMetricByNameOrigin string + inspectFuncExpireGroupMetricByName func(group string, name string) + afterExpireGroupMetricByNameCounter uint64 + beforeExpireGroupMetricByNameCounter uint64 + ExpireGroupMetricByNameMock mGroupedStorageMockExpireGroupMetricByName + funcExpireGroupMetrics func(group string) funcExpireGroupMetricsOrigin string inspectFuncExpireGroupMetrics func(group string) @@ -72,6 +79,9 @@ func NewGroupedStorageMock(t minimock.Tester) *GroupedStorageMock { m.CounterAddMock = mGroupedStorageMockCounterAdd{mock: m} m.CounterAddMock.callArgs = []*GroupedStorageMockCounterAddParams{} + m.ExpireGroupMetricByNameMock = mGroupedStorageMockExpireGroupMetricByName{mock: m} + m.ExpireGroupMetricByNameMock.callArgs = []*GroupedStorageMockExpireGroupMetricByNameParams{} + m.ExpireGroupMetricsMock = mGroupedStorageMockExpireGroupMetrics{mock: m} m.ExpireGroupMetricsMock.callArgs = []*GroupedStorageMockExpireGroupMetricsParams{} @@ -466,6 +476,319 @@ func (m *GroupedStorageMock) MinimockCounterAddInspect() { } } +type mGroupedStorageMockExpireGroupMetricByName struct { + optional bool + mock *GroupedStorageMock + defaultExpectation *GroupedStorageMockExpireGroupMetricByNameExpectation + expectations []*GroupedStorageMockExpireGroupMetricByNameExpectation + + callArgs []*GroupedStorageMockExpireGroupMetricByNameParams + mutex sync.RWMutex + + expectedInvocations uint64 + expectedInvocationsOrigin string +} + +// GroupedStorageMockExpireGroupMetricByNameExpectation specifies expectation struct of the GroupedStorage.ExpireGroupMetricByName +type GroupedStorageMockExpireGroupMetricByNameExpectation struct { + mock *GroupedStorageMock + params *GroupedStorageMockExpireGroupMetricByNameParams + paramPtrs *GroupedStorageMockExpireGroupMetricByNameParamPtrs + expectationOrigins GroupedStorageMockExpireGroupMetricByNameExpectationOrigins + + returnOrigin string + Counter uint64 +} + +// GroupedStorageMockExpireGroupMetricByNameParams contains parameters of the GroupedStorage.ExpireGroupMetricByName +type GroupedStorageMockExpireGroupMetricByNameParams struct { + group string + name string +} + +// GroupedStorageMockExpireGroupMetricByNameParamPtrs contains pointers to parameters of the GroupedStorage.ExpireGroupMetricByName +type GroupedStorageMockExpireGroupMetricByNameParamPtrs struct { + group *string + name *string +} + +// GroupedStorageMockExpireGroupMetricByNameOrigins contains origins of expectations of the GroupedStorage.ExpireGroupMetricByName +type GroupedStorageMockExpireGroupMetricByNameExpectationOrigins struct { + origin string + originGroup string + originName string +} + +// Marks this method to be optional. The default behavior of any method with Return() is '1 or more', meaning +// the test will fail minimock's automatic final call check if the mocked method was not called at least once. +// Optional() makes method check to work in '0 or more' mode. +// It is NOT RECOMMENDED to use this option unless you really need it, as default behaviour helps to +// catch the problems when the expected method call is totally skipped during test run. +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Optional() *mGroupedStorageMockExpireGroupMetricByName { + mmExpireGroupMetricByName.optional = true + return mmExpireGroupMetricByName +} + +// Expect sets up expected params for GroupedStorage.ExpireGroupMetricByName +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Expect(group string, name string) *mGroupedStorageMockExpireGroupMetricByName { + if mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Set") + } + + if mmExpireGroupMetricByName.defaultExpectation == nil { + mmExpireGroupMetricByName.defaultExpectation = &GroupedStorageMockExpireGroupMetricByNameExpectation{} + } + + if mmExpireGroupMetricByName.defaultExpectation.paramPtrs != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by ExpectParams functions") + } + + mmExpireGroupMetricByName.defaultExpectation.params = &GroupedStorageMockExpireGroupMetricByNameParams{group, name} + mmExpireGroupMetricByName.defaultExpectation.expectationOrigins.origin = minimock.CallerInfo(1) + for _, e := range mmExpireGroupMetricByName.expectations { + if minimock.Equal(e.params, mmExpireGroupMetricByName.defaultExpectation.params) { + mmExpireGroupMetricByName.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmExpireGroupMetricByName.defaultExpectation.params) + } + } + + return mmExpireGroupMetricByName +} + +// ExpectGroupParam1 sets up expected param group for GroupedStorage.ExpireGroupMetricByName +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) ExpectGroupParam1(group string) *mGroupedStorageMockExpireGroupMetricByName { + if mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Set") + } + + if mmExpireGroupMetricByName.defaultExpectation == nil { + mmExpireGroupMetricByName.defaultExpectation = &GroupedStorageMockExpireGroupMetricByNameExpectation{} + } + + if mmExpireGroupMetricByName.defaultExpectation.params != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Expect") + } + + if mmExpireGroupMetricByName.defaultExpectation.paramPtrs == nil { + mmExpireGroupMetricByName.defaultExpectation.paramPtrs = &GroupedStorageMockExpireGroupMetricByNameParamPtrs{} + } + mmExpireGroupMetricByName.defaultExpectation.paramPtrs.group = &group + mmExpireGroupMetricByName.defaultExpectation.expectationOrigins.originGroup = minimock.CallerInfo(1) + + return mmExpireGroupMetricByName +} + +// ExpectNameParam2 sets up expected param name for GroupedStorage.ExpireGroupMetricByName +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) ExpectNameParam2(name string) *mGroupedStorageMockExpireGroupMetricByName { + if mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Set") + } + + if mmExpireGroupMetricByName.defaultExpectation == nil { + mmExpireGroupMetricByName.defaultExpectation = &GroupedStorageMockExpireGroupMetricByNameExpectation{} + } + + if mmExpireGroupMetricByName.defaultExpectation.params != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Expect") + } + + if mmExpireGroupMetricByName.defaultExpectation.paramPtrs == nil { + mmExpireGroupMetricByName.defaultExpectation.paramPtrs = &GroupedStorageMockExpireGroupMetricByNameParamPtrs{} + } + mmExpireGroupMetricByName.defaultExpectation.paramPtrs.name = &name + mmExpireGroupMetricByName.defaultExpectation.expectationOrigins.originName = minimock.CallerInfo(1) + + return mmExpireGroupMetricByName +} + +// Inspect accepts an inspector function that has same arguments as the GroupedStorage.ExpireGroupMetricByName +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Inspect(f func(group string, name string)) *mGroupedStorageMockExpireGroupMetricByName { + if mmExpireGroupMetricByName.mock.inspectFuncExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("Inspect function is already set for GroupedStorageMock.ExpireGroupMetricByName") + } + + mmExpireGroupMetricByName.mock.inspectFuncExpireGroupMetricByName = f + + return mmExpireGroupMetricByName +} + +// Return sets up results that will be returned by GroupedStorage.ExpireGroupMetricByName +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Return() *GroupedStorageMock { + if mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("GroupedStorageMock.ExpireGroupMetricByName mock is already set by Set") + } + + if mmExpireGroupMetricByName.defaultExpectation == nil { + mmExpireGroupMetricByName.defaultExpectation = &GroupedStorageMockExpireGroupMetricByNameExpectation{mock: mmExpireGroupMetricByName.mock} + } + + mmExpireGroupMetricByName.defaultExpectation.returnOrigin = minimock.CallerInfo(1) + return mmExpireGroupMetricByName.mock +} + +// Set uses given function f to mock the GroupedStorage.ExpireGroupMetricByName method +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Set(f func(group string, name string)) *GroupedStorageMock { + if mmExpireGroupMetricByName.defaultExpectation != nil { + mmExpireGroupMetricByName.mock.t.Fatalf("Default expectation is already set for the GroupedStorage.ExpireGroupMetricByName method") + } + + if len(mmExpireGroupMetricByName.expectations) > 0 { + mmExpireGroupMetricByName.mock.t.Fatalf("Some expectations are already set for the GroupedStorage.ExpireGroupMetricByName method") + } + + mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName = f + mmExpireGroupMetricByName.mock.funcExpireGroupMetricByNameOrigin = minimock.CallerInfo(1) + return mmExpireGroupMetricByName.mock +} + +// Times sets number of times GroupedStorage.ExpireGroupMetricByName should be invoked +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Times(n uint64) *mGroupedStorageMockExpireGroupMetricByName { + if n == 0 { + mmExpireGroupMetricByName.mock.t.Fatalf("Times of GroupedStorageMock.ExpireGroupMetricByName mock can not be zero") + } + mm_atomic.StoreUint64(&mmExpireGroupMetricByName.expectedInvocations, n) + mmExpireGroupMetricByName.expectedInvocationsOrigin = minimock.CallerInfo(1) + return mmExpireGroupMetricByName +} + +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) invocationsDone() bool { + if len(mmExpireGroupMetricByName.expectations) == 0 && mmExpireGroupMetricByName.defaultExpectation == nil && mmExpireGroupMetricByName.mock.funcExpireGroupMetricByName == nil { + return true + } + + totalInvocations := mm_atomic.LoadUint64(&mmExpireGroupMetricByName.mock.afterExpireGroupMetricByNameCounter) + expectedInvocations := mm_atomic.LoadUint64(&mmExpireGroupMetricByName.expectedInvocations) + + return totalInvocations > 0 && (expectedInvocations == 0 || expectedInvocations == totalInvocations) +} + +// ExpireGroupMetricByName implements GroupedStorage +func (mmExpireGroupMetricByName *GroupedStorageMock) ExpireGroupMetricByName(group string, name string) { + mm_atomic.AddUint64(&mmExpireGroupMetricByName.beforeExpireGroupMetricByNameCounter, 1) + defer mm_atomic.AddUint64(&mmExpireGroupMetricByName.afterExpireGroupMetricByNameCounter, 1) + + mmExpireGroupMetricByName.t.Helper() + + if mmExpireGroupMetricByName.inspectFuncExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.inspectFuncExpireGroupMetricByName(group, name) + } + + mm_params := GroupedStorageMockExpireGroupMetricByNameParams{group, name} + + // Record call args + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.mutex.Lock() + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.callArgs = append(mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.callArgs, &mm_params) + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.mutex.Unlock() + + for _, e := range mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.expectations { + if minimock.Equal(*e.params, mm_params) { + mm_atomic.AddUint64(&e.Counter, 1) + return + } + } + + if mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation != nil { + mm_atomic.AddUint64(&mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.Counter, 1) + mm_want := mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.params + mm_want_ptrs := mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.paramPtrs + + mm_got := GroupedStorageMockExpireGroupMetricByNameParams{group, name} + + if mm_want_ptrs != nil { + + if mm_want_ptrs.group != nil && !minimock.Equal(*mm_want_ptrs.group, mm_got.group) { + mmExpireGroupMetricByName.t.Errorf("GroupedStorageMock.ExpireGroupMetricByName got unexpected parameter group, expected at\n%s:\nwant: %#v\n got: %#v%s\n", + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.expectationOrigins.originGroup, *mm_want_ptrs.group, mm_got.group, minimock.Diff(*mm_want_ptrs.group, mm_got.group)) + } + + if mm_want_ptrs.name != nil && !minimock.Equal(*mm_want_ptrs.name, mm_got.name) { + mmExpireGroupMetricByName.t.Errorf("GroupedStorageMock.ExpireGroupMetricByName got unexpected parameter name, expected at\n%s:\nwant: %#v\n got: %#v%s\n", + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.expectationOrigins.originName, *mm_want_ptrs.name, mm_got.name, minimock.Diff(*mm_want_ptrs.name, mm_got.name)) + } + + } else if mm_want != nil && !minimock.Equal(*mm_want, mm_got) { + mmExpireGroupMetricByName.t.Errorf("GroupedStorageMock.ExpireGroupMetricByName got unexpected parameters, expected at\n%s:\nwant: %#v\n got: %#v%s\n", + mmExpireGroupMetricByName.ExpireGroupMetricByNameMock.defaultExpectation.expectationOrigins.origin, *mm_want, mm_got, minimock.Diff(*mm_want, mm_got)) + } + + return + + } + if mmExpireGroupMetricByName.funcExpireGroupMetricByName != nil { + mmExpireGroupMetricByName.funcExpireGroupMetricByName(group, name) + return + } + mmExpireGroupMetricByName.t.Fatalf("Unexpected call to GroupedStorageMock.ExpireGroupMetricByName. %v %v", group, name) + +} + +// ExpireGroupMetricByNameAfterCounter returns a count of finished GroupedStorageMock.ExpireGroupMetricByName invocations +func (mmExpireGroupMetricByName *GroupedStorageMock) ExpireGroupMetricByNameAfterCounter() uint64 { + return mm_atomic.LoadUint64(&mmExpireGroupMetricByName.afterExpireGroupMetricByNameCounter) +} + +// ExpireGroupMetricByNameBeforeCounter returns a count of GroupedStorageMock.ExpireGroupMetricByName invocations +func (mmExpireGroupMetricByName *GroupedStorageMock) ExpireGroupMetricByNameBeforeCounter() uint64 { + return mm_atomic.LoadUint64(&mmExpireGroupMetricByName.beforeExpireGroupMetricByNameCounter) +} + +// Calls returns a list of arguments used in each call to GroupedStorageMock.ExpireGroupMetricByName. +// The list is in the same order as the calls were made (i.e. recent calls have a higher index) +func (mmExpireGroupMetricByName *mGroupedStorageMockExpireGroupMetricByName) Calls() []*GroupedStorageMockExpireGroupMetricByNameParams { + mmExpireGroupMetricByName.mutex.RLock() + + argCopy := make([]*GroupedStorageMockExpireGroupMetricByNameParams, len(mmExpireGroupMetricByName.callArgs)) + copy(argCopy, mmExpireGroupMetricByName.callArgs) + + mmExpireGroupMetricByName.mutex.RUnlock() + + return argCopy +} + +// MinimockExpireGroupMetricByNameDone returns true if the count of the ExpireGroupMetricByName invocations corresponds +// the number of defined expectations +func (m *GroupedStorageMock) MinimockExpireGroupMetricByNameDone() bool { + if m.ExpireGroupMetricByNameMock.optional { + // Optional methods provide '0 or more' call count restriction. + return true + } + + for _, e := range m.ExpireGroupMetricByNameMock.expectations { + if mm_atomic.LoadUint64(&e.Counter) < 1 { + return false + } + } + + return m.ExpireGroupMetricByNameMock.invocationsDone() +} + +// MinimockExpireGroupMetricByNameInspect logs each unmet expectation +func (m *GroupedStorageMock) MinimockExpireGroupMetricByNameInspect() { + for _, e := range m.ExpireGroupMetricByNameMock.expectations { + if mm_atomic.LoadUint64(&e.Counter) < 1 { + m.t.Errorf("Expected call to GroupedStorageMock.ExpireGroupMetricByName at\n%s with params: %#v", e.expectationOrigins.origin, *e.params) + } + } + + afterExpireGroupMetricByNameCounter := mm_atomic.LoadUint64(&m.afterExpireGroupMetricByNameCounter) + // if default expectation was set then invocations count should be greater than zero + if m.ExpireGroupMetricByNameMock.defaultExpectation != nil && afterExpireGroupMetricByNameCounter < 1 { + if m.ExpireGroupMetricByNameMock.defaultExpectation.params == nil { + m.t.Errorf("Expected call to GroupedStorageMock.ExpireGroupMetricByName at\n%s", m.ExpireGroupMetricByNameMock.defaultExpectation.returnOrigin) + } else { + m.t.Errorf("Expected call to GroupedStorageMock.ExpireGroupMetricByName at\n%s with params: %#v", m.ExpireGroupMetricByNameMock.defaultExpectation.expectationOrigins.origin, *m.ExpireGroupMetricByNameMock.defaultExpectation.params) + } + } + // if func was set then invocations count should be greater than zero + if m.funcExpireGroupMetricByName != nil && afterExpireGroupMetricByNameCounter < 1 { + m.t.Errorf("Expected call to GroupedStorageMock.ExpireGroupMetricByName at\n%s", m.funcExpireGroupMetricByNameOrigin) + } + + if !m.ExpireGroupMetricByNameMock.invocationsDone() && afterExpireGroupMetricByNameCounter > 0 { + m.t.Errorf("Expected %d calls to GroupedStorageMock.ExpireGroupMetricByName at\n%s but found %d calls", + mm_atomic.LoadUint64(&m.ExpireGroupMetricByNameMock.expectedInvocations), m.ExpireGroupMetricByNameMock.expectedInvocationsOrigin, afterExpireGroupMetricByNameCounter) + } +} + type mGroupedStorageMockExpireGroupMetrics struct { optional bool mock *GroupedStorageMock @@ -2001,6 +2324,8 @@ func (m *GroupedStorageMock) MinimockFinish() { if !m.minimockDone() { m.MinimockCounterAddInspect() + m.MinimockExpireGroupMetricByNameInspect() + m.MinimockExpireGroupMetricsInspect() m.MinimockGaugeSetInspect() @@ -2034,6 +2359,7 @@ func (m *GroupedStorageMock) minimockDone() bool { done := true return done && m.MinimockCounterAddDone() && + m.MinimockExpireGroupMetricByNameDone() && m.MinimockExpireGroupMetricsDone() && m.MinimockGaugeSetDone() && m.MinimockGetOrCreateCounterCollectorDone() && diff --git a/pkg/metric/storage.go b/pkg/metric/storage.go index c460ecb2..4cdca8b1 100644 --- a/pkg/metric/storage.go +++ b/pkg/metric/storage.go @@ -28,6 +28,7 @@ type Storage interface { type GroupedStorage interface { Registerer() prometheus.Registerer ExpireGroupMetrics(group string) + ExpireGroupMetricByName(group, name string) GetOrCreateCounterCollector(name string, labelNames []string) (*ConstCounterCollector, error) GetOrCreateGaugeCollector(name string, labelNames []string) (*ConstGaugeCollector, error) CounterAdd(group string, name string, value float64, labels map[string]string) diff --git a/pkg/metric_storage/metric_storage.go b/pkg/metric_storage/metric_storage.go index 3ed7db55..6adf62c8 100644 --- a/pkg/metric_storage/metric_storage.go +++ b/pkg/metric_storage/metric_storage.go @@ -55,10 +55,10 @@ func NewMetricStorage(ctx context.Context, prefix string, newRegistry bool) *Met Counters: make(map[string]*prometheus.CounterVec), Histograms: make(map[string]*prometheus.HistogramVec), HistogramBuckets: make(map[string][]float64), - groupedVault: vault.NewGroupedVault(), Gatherer: prometheus.DefaultGatherer, Registerer: prometheus.DefaultRegisterer, } + m.groupedVault = vault.NewGroupedVault(m.resolveMetricName) m.groupedVault.SetRegisterer(m.Registerer) if newRegistry { diff --git a/pkg/metric_storage/vault/vault.go b/pkg/metric_storage/vault/vault.go index 8ebbcfe6..6827306c 100644 --- a/pkg/metric_storage/vault/vault.go +++ b/pkg/metric_storage/vault/vault.go @@ -15,11 +15,13 @@ type GroupedVault struct { collectors map[string]metric.ConstCollector mtx sync.Mutex registerer prometheus.Registerer + resolveMetricNameFunc func(name string) string } -func NewGroupedVault() *GroupedVault { +func NewGroupedVault(resolveMetricNameFunc func(name string) string) *GroupedVault { return &GroupedVault{ collectors: make(map[string]metric.ConstCollector), + resolveMetricNameFunc : resolveMetricNameFunc, } } @@ -34,22 +36,34 @@ func (v *GroupedVault) SetRegisterer(r prometheus.Registerer) { // ClearAllMetrics takes each collector in collectors and clear all metrics by group. func (v *GroupedVault) ExpireGroupMetrics(group string) { v.mtx.Lock() - defer v.mtx.Unlock() for _, collector := range v.collectors { collector.ExpireGroupMetrics(group) } + v.mtx.Unlock() +} + +// ExpireGroupMetricByName gets a collector by its name and clears all metrics inside the collector by the group. +func (v *GroupedVault) ExpireGroupMetricByName(group, name string) { + metricName := v.resolveMetricNameFunc(name) + v.mtx.Lock() + collector, ok := v.collectors[metricName] + if ok { + collector.ExpireGroupMetrics(group) + } + v.mtx.Unlock() } func (v *GroupedVault) GetOrCreateCounterCollector(name string, labelNames []string) (*metric.ConstCounterCollector, error) { + metricName := v.resolveMetricNameFunc(name) v.mtx.Lock() defer v.mtx.Unlock() - collector, ok := v.collectors[name] + collector, ok := v.collectors[metricName] if !ok { - collector = metric.NewConstCounterCollector(name, labelNames) + collector = metric.NewConstCounterCollector(metricName, labelNames) if err := v.registerer.Register(collector); err != nil { - return nil, fmt.Errorf("counter '%s' %v registration: %v", name, labelNames, err) + return nil, fmt.Errorf("counter '%s' %v registration: %v", metricName, labelNames, err) } - v.collectors[name] = collector + v.collectors[metricName] = collector } else if !IsSubset(collector.LabelNames(), labelNames) { collector.UpdateLabels(labelNames) } @@ -60,15 +74,16 @@ func (v *GroupedVault) GetOrCreateCounterCollector(name string, labelNames []str } func (v *GroupedVault) GetOrCreateGaugeCollector(name string, labelNames []string) (*metric.ConstGaugeCollector, error) { + metricName := v.resolveMetricNameFunc(name) v.mtx.Lock() defer v.mtx.Unlock() - collector, ok := v.collectors[name] + collector, ok := v.collectors[metricName] if !ok { - collector = metric.NewConstGaugeCollector(name, labelNames) + collector = metric.NewConstGaugeCollector(metricName, labelNames) if err := v.registerer.Register(collector); err != nil { - return nil, fmt.Errorf("gauge '%s' %v registration: %v", name, labelNames, err) + return nil, fmt.Errorf("gauge '%s' %v registration: %v", metricName, labelNames, err) } - v.collectors[name] = collector + v.collectors[metricName] = collector } else if !IsSubset(collector.LabelNames(), labelNames) { collector.UpdateLabels(labelNames) } @@ -80,7 +95,8 @@ func (v *GroupedVault) GetOrCreateGaugeCollector(name string, labelNames []strin } func (v *GroupedVault) CounterAdd(group string, name string, value float64, labels map[string]string) { - c, err := v.GetOrCreateCounterCollector(name, LabelNames(labels)) + metricName := v.resolveMetricNameFunc(name) + c, err := v.GetOrCreateCounterCollector(metricName, LabelNames(labels)) if err != nil { log.Errorf("CounterAdd: %v", err) return @@ -89,7 +105,8 @@ func (v *GroupedVault) CounterAdd(group string, name string, value float64, labe } func (v *GroupedVault) GaugeSet(group string, name string, value float64, labels map[string]string) { - c, err := v.GetOrCreateGaugeCollector(name, LabelNames(labels)) + metricName := v.resolveMetricNameFunc(name) + c, err := v.GetOrCreateGaugeCollector(metricName, LabelNames(labels)) if err != nil { log.Errorf("GaugeSet: %v", err) return diff --git a/pkg/metric_storage/vault/vault_test.go b/pkg/metric_storage/vault/vault_test.go index 473f974f..d24714e6 100644 --- a/pkg/metric_storage/vault/vault_test.go +++ b/pkg/metric_storage/vault/vault_test.go @@ -17,7 +17,7 @@ func Test_CounterAdd(t *testing.T) { buf := &bytes.Buffer{} log.SetOutput(buf) - v := NewGroupedVault() + v := NewGroupedVault(func (name string) string { return name }) v.registerer = prometheus.DefaultRegisterer v.CounterAdd("group1", "metric_total", 1.0, map[string]string{"lbl": "val"}) @@ -125,6 +125,8 @@ metric2_total{lbl="val222"} 2 v.CounterAdd("group3", "metric_total4", 39.0, map[string]string{"j": "j1"}) v.CounterAdd("group3", "metric_total4", 1.0, map[string]string{"j": "j1"}) v.CounterAdd("group3", "metric_total4", 1.0, map[string]string{"a": "", "b": "", "c": "", "d": "", "j": "j1"}) + v.CounterAdd("group3", "metric_total5", 7.0, map[string]string{"g": "g1"}) + v.CounterAdd("group3", "metric_total5", 11.0, map[string]string{"foo": "bar"}) g.Expect(buf.String()).ShouldNot(ContainSubstring("error"), "error occurred in log: %s", buf.String()) @@ -151,8 +153,41 @@ metric_total4{a="a1", b="b1", c="c1", d="d1", j=""} 99 metric_total4{a="", b="", c="c2", d="", j=""} 19 metric_total4{a="", b="", c="", d="", j=""} 29 metric_total4{a="", b="", c="", d="", j="j1"} 41 +# HELP metric_total5 metric_total5 +# TYPE metric_total5 counter +metric_total5{foo="", g="g1"} 7 +metric_total5{foo="bar", g=""} 11 ` - err = promtest.GatherAndCompare(prometheus.DefaultGatherer, strings.NewReader(expect), "metric_total1", "metric_total2", "metric_total3", "metric_total4") + err = promtest.GatherAndCompare(prometheus.DefaultGatherer, strings.NewReader(expect), "metric_total1", "metric_total2", "metric_total3", "metric_total4", "metric_total5") + g.Expect(err).ShouldNot(HaveOccurred()) + + expect = ` +# HELP metric_total1 metric_total1 +# TYPE metric_total1 gauge +metric_total1{a="A", b="", c=""} 5 +metric_total1{a="", b="", c="C"} 2 +metric_total1{a="A", b="B", c=""} 3 +# HELP metric_total2 metric_total2 +# TYPE metric_total2 gauge +metric_total2{a="A1", b="", c=""} 1 +metric_total2{a="", b="", c="C2"} 2 +metric_total2{a="A3", b="B3", c=""} 3 +# HELP metric_total3 metric_total3 +# TYPE metric_total3 counter +metric_total3{lbl="val222", ord=""} 5 +metric_total3{lbl="", ord="ord222"} 10 +metric_total3{lbl="val222", ord="ord222"} 108 +# HELP metric_total4 metric_total4 +# TYPE metric_total4 counter +metric_total4{a="", b="", c="", d="d1", j=""} 9 +metric_total4{a="a1", b="b1", c="c1", d="d1", j=""} 99 +metric_total4{a="", b="", c="c2", d="", j=""} 19 +metric_total4{a="", b="", c="", d="", j=""} 29 +metric_total4{a="", b="", c="", d="", j="j1"} 41 +` + + v.ExpireGroupMetricByName("group3", "metric_total5") + err = promtest.GatherAndCompare(prometheus.DefaultGatherer, strings.NewReader(expect), "metric_total1", "metric_total2", "metric_totalr3", "metric_total4", "metric_total5") g.Expect(err).ShouldNot(HaveOccurred()) } From 4e7c300bab639fc332c39dd6b021b6d6d9aa8ed9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:55:51 +0400 Subject: [PATCH 3/5] chore(deps): bump github.com/onsi/gomega from 1.34.1 to 1.34.2 (#667) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.34.1 to 1.34.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.34.1...v1.34.2) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 18 +++++++++--------- go.sum | 39 +++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 636bbbf6..44522fb6 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/kennygrant/sanitize v1.2.4 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.34.1 + github.com/onsi/gomega v1.34.2 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 github.com/sirupsen/logrus v1.9.3 @@ -33,6 +33,8 @@ require ( // Remove 'in body' from errors, fix for Go 1.16 (https://github.com/go-openapi/validate/pull/138). replace github.com/go-openapi/validate => github.com/flant/go-openapi-validate v0.19.12-flant.0 +require github.com/gojuno/minimock/v3 v3.4.0 + require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect @@ -43,7 +45,7 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/analysis v0.19.10 // indirect github.com/go-openapi/errors v0.19.7 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect @@ -53,7 +55,6 @@ require ( github.com/go-stack/stack v1.8.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/gojuno/minimock/v3 v3.4.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect @@ -79,13 +80,12 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/tidwall/pretty v1.2.0 // indirect go.mongodb.org/mongo-driver v1.5.4 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.27.0 // indirect + golang.org/x/net v0.28.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/tools v0.24.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 38efe316..ee7323e6 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= @@ -90,6 +90,7 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -146,7 +147,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -182,6 +184,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -215,11 +218,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= +github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -243,6 +247,7 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -294,8 +299,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -311,8 +314,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -338,16 +341,16 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -362,8 +365,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From f4ae05254b434706bf17e22c698566040980a882 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:56:45 +0400 Subject: [PATCH 4/5] chore(deps): bump actions/cache from 4.1.0 to 4.1.2 (#678) Bumps [actions/cache](https://github.com/actions/cache) from 4.1.0 to 4.1.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v4.1.0...v4.1.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/tests-labeled.yaml | 2 +- .github/workflows/tests.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c35ad1a5..626a8e59 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,7 +18,7 @@ jobs: - name: Restore Go modules id: go-modules-cache - uses: actions/cache@v4.1.0 + uses: actions/cache@v4.1.2 with: path: | ~/go/pkg/mod diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7343d18f..dbbe778c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -20,7 +20,7 @@ jobs: - name: Restore Go modules id: go-modules-cache - uses: actions/cache@v4.1.0 + uses: actions/cache@v4.1.2 with: path: | ~/go/pkg/mod diff --git a/.github/workflows/tests-labeled.yaml b/.github/workflows/tests-labeled.yaml index d7bf546a..2fd9f8bc 100644 --- a/.github/workflows/tests-labeled.yaml +++ b/.github/workflows/tests-labeled.yaml @@ -73,7 +73,7 @@ jobs: - name: Restore Go modules id: go-modules-cache - uses: actions/cache@v4.1.0 + uses: actions/cache@v4.1.2 with: path: | ~/go/pkg/mod diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9c724239..d983ca15 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -19,7 +19,7 @@ jobs: - name: Restore Go modules id: go-modules-cache - uses: actions/cache@v4.1.0 + uses: actions/cache@v4.1.2 with: path: | ~/go/pkg/mod From 6f640b44adf128c6a16b605321fa72e16ae2ff9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:11:36 +0400 Subject: [PATCH 5/5] chore(deps): bump github.com/prometheus/client_golang (#672) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.5. - [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.19.1...v1.20.5) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 17 +++++++++-------- go.sum | 36 ++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index 44522fb6..1760e495 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.34.2 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/client_golang v1.20.5 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 golang.org/x/time v0.7.0 @@ -40,7 +40,7 @@ require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect @@ -66,6 +66,8 @@ require ( github.com/imdario/mergo v0.3.15 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -74,20 +76,19 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.48.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tidwall/pretty v1.2.0 // indirect go.mongodb.org/mongo-driver v1.5.4 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.24.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index ee7323e6..df1e9159 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:o github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -122,7 +122,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gojuno/minimock/v3 v3.4.0 h1:htPGQuFvmCaTygTnARPp5tSWZUZxOnu8A2RDVyl/LA8= github.com/gojuno/minimock/v3 v3.4.0/go.mod h1:0PdkFMCugnywaAqwrdWMZMzHhSH3ZoXlMVHiRVdIrLk= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -179,6 +178,8 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= 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.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -190,6 +191,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -235,14 +238,14 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -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.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +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.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +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/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -305,7 +308,6 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -316,8 +318,8 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -371,16 +373,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=