From e93bdfed6c29abaf0a41bd9e9379f74c6e5738b1 Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Wed, 21 Jan 2026 00:36:07 +0200 Subject: [PATCH 01/13] PT-2508 - fix SIGSEGV error When running pt-mongodb-index-check with missing arguments SIGSEGV error occurs. This error is fixed by removing DefaultHelpPrinter --- src/go/pt-mongodb-index-check/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/pt-mongodb-index-check/main.go b/src/go/pt-mongodb-index-check/main.go index 24cc05e0..36444452 100644 --- a/src/go/pt-mongodb-index-check/main.go +++ b/src/go/pt-mongodb-index-check/main.go @@ -92,7 +92,8 @@ func main() { resp.Unused = findUnused(ctx, client, args.Databases, args.Collections) resp.Duplicated = findDuplicated(ctx, client, args.Databases, args.Collections) default: - kong.DefaultHelpPrinter(kong.HelpOptions{}, kongctx) + kongctx.PrintUsage(false) + return } fmt.Println(output(resp, args.JSON)) From cb6ccffe3bff8052a7a6d3e757225d26433e91f4 Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Wed, 21 Jan 2026 21:53:28 +0200 Subject: [PATCH 02/13] add tests --- src/go/pt-mongodb-index-check/main_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/go/pt-mongodb-index-check/main_test.go b/src/go/pt-mongodb-index-check/main_test.go index d4fcf1ec..d69677f9 100644 --- a/src/go/pt-mongodb-index-check/main_test.go +++ b/src/go/pt-mongodb-index-check/main_test.go @@ -3,6 +3,7 @@ package main import ( "os/exec" "regexp" + "strings" "testing" ) @@ -20,3 +21,16 @@ func TestVersionOption(t *testing.T) { t.Errorf("%s --version returns wrong result:\n%s", toolname, out) } } + +func TestNoCommand(t *testing.T) { + mockMongo := "mongodb://127.0.0.1:27017" + out, err := exec.Command("../../../bin/"+toolname, "--mongodb.uri", mockMongo).Output() + if err != nil { + t.Errorf("error executing %s with no command: %s", toolname, err.Error()) + } + + want := "Usage: pt-mongodb-index-check show-help" + if !strings.Contains(string(out), want) { + t.Errorf("Output missmatch. Output %q should contain %q", string(out), want) + } +} From 8ec90f81096274a0c3b19a9901f0a3cbb6ccd023 Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Mon, 16 Feb 2026 15:06:00 +0200 Subject: [PATCH 03/13] PT-1738 - add mongos to pt-mongodb-summary This commit adds mongos instances report table to the mongodb summary --- src/go/pt-mongodb-summary/main.go | 62 ++++++++++++++++++- src/go/pt-mongodb-summary/templates/mongos.go | 38 ++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 src/go/pt-mongodb-summary/templates/mongos.go diff --git a/src/go/pt-mongodb-summary/main.go b/src/go/pt-mongodb-summary/main.go index 66bff334..5a109250 100644 --- a/src/go/pt-mongodb-summary/main.go +++ b/src/go/pt-mongodb-summary/main.go @@ -15,6 +15,7 @@ package main import ( "bytes" + "cmp" "context" "crypto/tls" "crypto/x509" @@ -26,6 +27,7 @@ import ( "os" "os/user" "path/filepath" + "slices" "strings" "time" @@ -35,6 +37,7 @@ import ( "github.com/pkg/errors" "github.com/shirou/gopsutil/process" log "github.com/sirupsen/logrus" + "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" @@ -159,6 +162,29 @@ type clusterwideInfo struct { Chunks []proto.ChunksByCollection } +type mongosInstance struct { + Name string `bson:"_id"` + LastPing time.Time `bson:"ping"` + UpTime int `bson:"up"` + Version string `bson:"mongoVersion"` +} + +type mongosInfo struct { + Instances []mongosInstance `bson:"instances"` +} + +func (t mongosInfo) MaxNameLen() int { + if len(t.Instances) == 0 { + return 0 + } + + maxInst := slices.MaxFunc(t.Instances, func(a, b mongosInstance) int { + return cmp.Compare(len(a.Name), len(b.Name)) + }) + + return len(maxInst.Name) +} + type cliOptions struct { Host string User string @@ -184,6 +210,7 @@ type collectedInfo struct { RunningOps *opCounters SecuritySettings *security HostInfo *hostInfo + MongosInfo *mongosInfo Errors []string } @@ -256,6 +283,11 @@ func main() { ci := &collectedInfo{} + ci.MongosInfo, err = getMongosInfo(ctx, client) + if err != nil { + log.Warnf("[Error] cannot get mongos info: %v\n", err) + } + ci.HostInfo, err = getHostInfo(ctx, client) if err != nil { log.Errorf("Cannot get host info for %q: %s", opts.Host, err) @@ -332,7 +364,12 @@ func formatResults(ci *collectedInfo, format string) ([]byte, error) { default: buf = new(bytes.Buffer) - t := template.Must(template.New("replicas").Parse(templates.Replicas)) + t := template.Must(template.New("mongos").Parse(templates.MongosInfo)) + if err := t.Execute(buf, ci.MongosInfo); err != nil { + return nil, errors.Wrap(err, "cannot parse mongos section of the output template") + } + + t = template.Must(template.New("replicas").Parse(templates.Replicas)) if err := t.Execute(buf, ci.ReplicaMembers); err != nil { return nil, errors.Wrap(err, "cannot parse replicas section of the output template") } @@ -454,6 +491,29 @@ func countMongodProcesses() (int, error) { return count, nil } +func getMongosInfo(ctx context.Context, client *mongo.Client) (*mongosInfo, error) { + threshold := time.Now().Add(-300 * time.Second) + + filter := bson.M{ + "ping": bson.M{ + "$gt": threshold, + }, + } + + cursor, err := client.Database("config").Collection("mongos").Find(ctx, filter) + if err != nil { + return nil, fmt.Errorf("failed to find mongos: %w", err) + } + defer cursor.Close(ctx) + + var instances []mongosInstance + if err := cursor.All(ctx, &instances); err != nil { + return nil, fmt.Errorf("failed to decode mongos: %w", err) + } + + return &mongosInfo{Instances: instances}, nil +} + func getClusterwideInfo(ctx context.Context, client *mongo.Client) (*clusterwideInfo, error) { var databases databases diff --git a/src/go/pt-mongodb-summary/templates/mongos.go b/src/go/pt-mongodb-summary/templates/mongos.go new file mode 100644 index 00000000..2b4a2f9b --- /dev/null +++ b/src/go/pt-mongodb-summary/templates/mongos.go @@ -0,0 +1,38 @@ +// This program is copyright 2016-2026 Percona LLC and/or its affiliates. +// +// THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation, version 2. +// +// You should have received a copy of the GNU General Public License, version 2 +// along with this program; if not, see . + +package templates + +const MongosInfo = ` +# Mongos ################################################################################################# +{{ $padding := 4 }} +{{- $timeWidth := 25 -}} +{{- $hostWidth := .MaxNameLen -}} +{{- $versionWidth := 12 -}} +{{- printf "%-*s" $hostWidth "Host" -}} +{{- printf "%-*s" $padding " " -}} +{{- printf "%-*s" $timeWidth "LastPing" -}} +{{- printf "%-*s" $padding " " -}} +{{- printf "%-*s" $versionWidth "Version" -}} +{{- printf "%-*s" $padding " " -}}Uptime (sec) +{{- if .Instances -}} +{{- range .Instances }} +{{ printf "%-*s" $hostWidth .Name }} +{{- printf "%-*s" $padding " " -}}{{ printf "%-*s" $timeWidth (.LastPing.Format "2006-01-02T15:04:05Z07:00") }} +{{- printf "%-*s" $padding " " -}}{{ printf "%-*s" $versionWidth .Version }} +{{- printf "%-*s" $padding " " -}}{{ printf "%-15d" .UpTime }} +{{- end }} +{{- else }} + no mongos instances found +{{- end }} +` From e9978af37362f2d28f535b0190634fcb4a156aaf Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Mon, 16 Feb 2026 15:19:37 +0200 Subject: [PATCH 04/13] refactor template --- src/go/pt-mongodb-summary/templates/mongos.go | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/go/pt-mongodb-summary/templates/mongos.go b/src/go/pt-mongodb-summary/templates/mongos.go index 2b4a2f9b..8c4159a9 100644 --- a/src/go/pt-mongodb-summary/templates/mongos.go +++ b/src/go/pt-mongodb-summary/templates/mongos.go @@ -15,24 +15,23 @@ package templates const MongosInfo = ` # Mongos ################################################################################################# -{{ $padding := 4 }} -{{- $timeWidth := 25 -}} +{{ "" }} +{{- $padding := " " -}} +{{- $timeWidth := 20 -}} {{- $hostWidth := .MaxNameLen -}} -{{- $versionWidth := 12 -}} -{{- printf "%-*s" $hostWidth "Host" -}} -{{- printf "%-*s" $padding " " -}} -{{- printf "%-*s" $timeWidth "LastPing" -}} -{{- printf "%-*s" $padding " " -}} -{{- printf "%-*s" $versionWidth "Version" -}} -{{- printf "%-*s" $padding " " -}}Uptime (sec) -{{- if .Instances -}} -{{- range .Instances }} -{{ printf "%-*s" $hostWidth .Name }} -{{- printf "%-*s" $padding " " -}}{{ printf "%-*s" $timeWidth (.LastPing.Format "2006-01-02T15:04:05Z07:00") }} -{{- printf "%-*s" $padding " " -}}{{ printf "%-*s" $versionWidth .Version }} -{{- printf "%-*s" $padding " " -}}{{ printf "%-15d" .UpTime }} -{{- end }} -{{- else }} +{{- $versionWidth := 15 -}} + +{{ printf "%-*s" $hostWidth "Host" }}{{ $padding }} +{{- printf "%-*s" $timeWidth "LastPing" }}{{ $padding }} +{{- printf "%-*s" $versionWidth "Version" }}{{ $padding }}Uptime (sec) +{{ if .Instances -}} +{{- range .Instances -}} +{{ printf "%-*s" $hostWidth .Name }}{{ $padding }} +{{- printf "%-*s" $timeWidth (.LastPing.Format "2006-01-02 15:04:05") }}{{ $padding }} +{{- printf "%-*s" $versionWidth .Version }}{{ $padding }} +{{- printf "%-15d" .UpTime }} +{{ end }} +{{- else -}} no mongos instances found {{- end }} ` From d74e42c51e59931f0b5bcd9e7427505de03dcd7f Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Mon, 16 Feb 2026 15:20:33 +0200 Subject: [PATCH 05/13] template refactor --- src/go/pt-mongodb-summary/templates/mongos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/pt-mongodb-summary/templates/mongos.go b/src/go/pt-mongodb-summary/templates/mongos.go index 8c4159a9..896f09f4 100644 --- a/src/go/pt-mongodb-summary/templates/mongos.go +++ b/src/go/pt-mongodb-summary/templates/mongos.go @@ -27,7 +27,7 @@ const MongosInfo = ` {{ if .Instances -}} {{- range .Instances -}} {{ printf "%-*s" $hostWidth .Name }}{{ $padding }} -{{- printf "%-*s" $timeWidth (.LastPing.Format "2006-01-02 15:04:05") }}{{ $padding }} +{{- printf "%-*s" $timeWidth (.LastPing.Format "2006-01-02T15:04:05Z07:00") }}{{ $padding }} {{- printf "%-*s" $versionWidth .Version }}{{ $padding }} {{- printf "%-15d" .UpTime }} {{ end }} From f001eaa974edfb43fb634304dc53151ad4a2b1c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:50:39 +0000 Subject: [PATCH 06/13] build(deps): bump aquasecurity/trivy-action in /.github/workflows Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.33.1 to 0.34.0. - [Release notes](https://github.com/aquasecurity/trivy-action/releases) - [Commits](https://github.com/aquasecurity/trivy-action/compare/0.33.1...0.34.0) --- updated-dependencies: - dependency-name: aquasecurity/trivy-action dependency-version: 0.34.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/toolkit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/toolkit.yml b/.github/workflows/toolkit.yml index 1d26f32d..f5d63683 100644 --- a/.github/workflows/toolkit.yml +++ b/.github/workflows/toolkit.yml @@ -27,7 +27,7 @@ jobs: - name: Build the Docker image run: echo "FROM oraclelinux:9-slim" > Dockerfile; echo "RUN microdnf -y update" >> Dockerfile; echo "COPY bin/* /usr/bin/" >> Dockerfile; docker build . --file Dockerfile --tag percona-toolkit:${{ github.sha }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.33.1 + uses: aquasecurity/trivy-action@0.34.0 with: image-ref: 'percona-toolkit:${{ github.sha }}' format: 'table' From 8d72051d35d72d3a1e22f7a6eee25374fcc36f90 Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Thu, 19 Feb 2026 16:13:37 +0200 Subject: [PATCH 07/13] add test --- src/go/pt-mongodb-summary/main_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/go/pt-mongodb-summary/main_test.go b/src/go/pt-mongodb-summary/main_test.go index 0f1a9e69..1e4b485f 100644 --- a/src/go/pt-mongodb-summary/main_test.go +++ b/src/go/pt-mongodb-summary/main_test.go @@ -151,3 +151,23 @@ func TestParseArgs(t *testing.T) { os.Stdout = old } + +func TestGetMongosInfo(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + client, err := tu.TestClient(ctx, tu.MongoDBMongosPort) + require.NoError(t, err) + + info, err := getMongosInfo(ctx, client) + require.NoError(t, err) + require.NotNil(t, info) + require.NotEmpty(t, info.Instances) + + for _, m := range info.Instances { + require.NotEmpty(t, m.Name) + require.NotEmpty(t, m.Version) + require.NotEqual(t, 0, m.UpTime) + require.False(t, m.LastPing.IsZero()) + } +} From 834e6cc824458418fc848318928736501309d81b Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Thu, 19 Feb 2026 16:48:39 +0200 Subject: [PATCH 08/13] Update README.rst --- src/go/pt-mongodb-summary/README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/go/pt-mongodb-summary/README.rst b/src/go/pt-mongodb-summary/README.rst index 1bfc4041..7c74ec1b 100644 --- a/src/go/pt-mongodb-summary/README.rst +++ b/src/go/pt-mongodb-summary/README.rst @@ -59,6 +59,14 @@ Output example .. code-block:: none + # Mongos ################################################################################################# + Host LastPing Version Uptime (sec) + my-cluster-name-mongos-0:27017 2026-02-16T13:01:22Z 8.0.17-6 3553 + my-cluster-name-mongos-1:27017 2026-02-16T13:01:26Z 8.0.17-6 3543 + my-cluster-name-mongos-2:27017 2026-02-16T13:01:28Z 8.0.17-6 3533 + + + # Instances #################################################################################### ID Host Type ReplSet 0 localhost:17001 PRIMARY r1 From 0d1cf6d1d741a30afe2c08e8497c8d8014bcdceb Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Thu, 19 Feb 2026 16:49:15 +0200 Subject: [PATCH 09/13] Update README.rst --- src/go/pt-mongodb-summary/README.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/go/pt-mongodb-summary/README.rst b/src/go/pt-mongodb-summary/README.rst index 7c74ec1b..15112728 100644 --- a/src/go/pt-mongodb-summary/README.rst +++ b/src/go/pt-mongodb-summary/README.rst @@ -64,8 +64,6 @@ Output example my-cluster-name-mongos-0:27017 2026-02-16T13:01:22Z 8.0.17-6 3553 my-cluster-name-mongos-1:27017 2026-02-16T13:01:26Z 8.0.17-6 3543 my-cluster-name-mongos-2:27017 2026-02-16T13:01:28Z 8.0.17-6 3533 - - # Instances #################################################################################### ID Host Type ReplSet From 8286b1c9d9df5d9c96135fe12ccc729328b7cb9e Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Thu, 26 Feb 2026 15:53:02 +0300 Subject: [PATCH 10/13] Updated .typos.toml --- .typos.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.typos.toml b/.typos.toml index fc64158d..70ee36bb 100644 --- a/.typos.toml +++ b/.typos.toml @@ -62,6 +62,7 @@ extend-ignore-re = [ "RegexISTReceiver" = "RegexISTReceiver" "RegexISTSender" = "RegexISTSender" "RegexXtrabackupISTReceived" = "RegexXtrabackupISTReceived" +"SELECTs" = "SELECTs" "START_ND_SUMMARY" = "START_ND_SUMMARY" "START_ND_TOOLTIPS" = "START_ND_TOOLTIPS" "thr" = "thr" # common abbreviation From d7b444ada054b1002b9db913d9082fb5d597a421 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 09:06:47 +0000 Subject: [PATCH 11/13] build(deps): bump k8s.io/api from 0.35.1 to 0.35.2 Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.35.1 to 0.35.2. - [Commits](https://github.com/kubernetes/api/compare/v0.35.1...v0.35.2) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.35.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index f66e7d3d..695c6288 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.35.1 + k8s.io/api v0.35.2 k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 ) @@ -66,7 +66,7 @@ require ( golang.org/x/text v0.34.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apimachinery v0.35.1 // indirect + k8s.io/apimachinery v0.35.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect diff --git a/go.sum b/go.sum index 5d31b6b9..94694843 100644 --- a/go.sum +++ b/go.sum @@ -195,10 +195,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q= -k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM= -k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU= -k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/api v0.35.2 h1:tW7mWc2RpxW7HS4CoRXhtYHSzme1PN1UjGHJ1bdrtdw= +k8s.io/api v0.35.2/go.mod h1:7AJfqGoAZcwSFhOjcGM7WV05QxMMgUaChNfLTXDRE60= +k8s.io/apimachinery v0.35.2 h1:NqsM/mmZA7sHW02JZ9RTtk3wInRgbVxL8MPfzSANAK8= +k8s.io/apimachinery v0.35.2/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= From c1fb4985a522d31cc4f2af022110ab1ccadbd6a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 09:09:21 +0000 Subject: [PATCH 12/13] build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6.0.0...v7.0.0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/toolkit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/toolkit.yml b/.github/workflows/toolkit.yml index 1d26f32d..00be8572 100644 --- a/.github/workflows/toolkit.yml +++ b/.github/workflows/toolkit.yml @@ -36,7 +36,7 @@ jobs: vuln-type: 'os,library' severity: 'CRITICAL,HIGH' - name: Upload a Build Artifact - uses: actions/upload-artifact@v6.0.0 + uses: actions/upload-artifact@v7.0.0 with: name: binaries path: bin/* From 449520256545dbbc245bcc6488cb693eee4b7654 Mon Sep 17 00:00:00 2001 From: Vladyslav Yurchenko Date: Tue, 3 Mar 2026 13:20:09 +0200 Subject: [PATCH 13/13] Refactor logs --- src/go/pt-mongodb-summary/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/go/pt-mongodb-summary/main.go b/src/go/pt-mongodb-summary/main.go index 5a109250..9c7a1345 100644 --- a/src/go/pt-mongodb-summary/main.go +++ b/src/go/pt-mongodb-summary/main.go @@ -285,7 +285,7 @@ func main() { ci.MongosInfo, err = getMongosInfo(ctx, client) if err != nil { - log.Warnf("[Error] cannot get mongos info: %v\n", err) + log.Warnf("[Warning] cannot get mongos info: %v\n", err) } ci.HostInfo, err = getHostInfo(ctx, client) @@ -295,7 +295,7 @@ func main() { } if ci.ReplicaMembers, err = util.GetReplicasetMembers(ctx, clientOptions); err != nil { - log.Warnf("[Error] cannot get replicaset members: %v\n", err) + log.Warnf("[Warning] cannot get replicaset members: %v\n", err) } log.Debugf("replicaMembers:\n%+v\n", ci.ReplicaMembers)