Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package minio-client for openSUSE:Factory 
checked in at 2024-07-15 19:47:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/minio-client (Old)
 and      /work/SRC/openSUSE:Factory/.minio-client.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "minio-client"

Mon Jul 15 19:47:02 2024 rev:88 rq:1187293 version:20240711T180128Z

Changes:
--------
--- /work/SRC/openSUSE:Factory/minio-client/minio-client.changes        
2024-07-11 20:32:37.731659858 +0200
+++ /work/SRC/openSUSE:Factory/.minio-client.new.17339/minio-client.changes     
2024-07-15 19:47:34.823930809 +0200
@@ -1,0 +2,8 @@
+Sat Jul 13 10:08:01 UTC 2024 - opensuse_buildserv...@ojkastl.de
+
+- Update to version 20240711T180128Z:
+  * Fix non-recursive compares against alias+key on Windows (#4983)
+  * Support metrics-v3 api in `admin prometheus generate` (#4985)
+  * Support metrics-v3 api in `admin prometheus metrics` (#4982)
+
+-------------------------------------------------------------------

Old:
----
  mc-20240708T205924Z.obscpio

New:
----
  mc-20240711T180128Z.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ minio-client.spec ++++++
--- /var/tmp/diff_new_pack.nxEUMi/_old  2024-07-15 19:47:35.707963216 +0200
+++ /var/tmp/diff_new_pack.nxEUMi/_new  2024-07-15 19:47:35.711963362 +0200
@@ -22,7 +22,7 @@
 %define binary_name minio-client
 
 Name:           minio-client
-Version:        20240708T205924Z
+Version:        20240711T180128Z
 Release:        0
 Summary:        Client for MinIO
 License:        AGPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.nxEUMi/_old  2024-07-15 19:47:35.739964389 +0200
+++ /var/tmp/diff_new_pack.nxEUMi/_new  2024-07-15 19:47:35.743964535 +0200
@@ -5,7 +5,7 @@
     <param name="exclude">.git</param>
     <param name="changesgenerate">enable</param>
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="revision">RELEASE.2024-07-08T20-59-24Z</param>
+    <param name="revision">RELEASE.2024-07-11T18-01-28Z</param>
     <param name="match-tag">RELEASE.*</param>
     <param 
name="versionrewrite-pattern">RELEASE\.(.*)-(.*)-(.*)-(.*)-(.*)</param>
     <param name="versionrewrite-replacement">\1\2\3\4\5</param>
@@ -19,7 +19,7 @@
     <param name="compression">gz</param>
   </service>
   <service name="go_modules" mode="manual">
-    <param name="archive">mc-20240708T205924Z.obscpio</param>
+    <param name="archive">mc-20240711T180128Z.obscpio</param>
   </service>
 </services>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.nxEUMi/_old  2024-07-15 19:47:35.763965269 +0200
+++ /var/tmp/diff_new_pack.nxEUMi/_new  2024-07-15 19:47:35.767965415 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/minio/mc</param>
-              <param 
name="changesrevision">21d3ec0089a1fa297cbdc23db413012535e2ff9e</param></service></servicedata>
+              <param 
name="changesrevision">4d498deb35e878efd601dae056f52c6134ddf37f</param></service></servicedata>
 (No newline at EOF)
 

++++++ mc-20240708T205924Z.obscpio -> mc-20240711T180128Z.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/admin-prometheus-generate.go 
new/mc-20240711T180128Z/cmd/admin-prometheus-generate.go
--- old/mc-20240708T205924Z/cmd/admin-prometheus-generate.go    2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/admin-prometheus-generate.go    2024-07-11 
20:01:28.000000000 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2015-2022 MinIO, Inc.
+// Copyright (c) 2015-2024 MinIO, Inc.
 //
 // This file is part of MinIO Object Storage stack
 //
@@ -31,22 +31,15 @@
 )
 
 const (
-       defaultJobName      = "minio-job"
-       nodeJobName         = "minio-job-node"
-       bucketJobName       = "minio-job-bucket"
-       defaultMetricsPath  = "/minio/v2/metrics/cluster"
-       nodeMetricsPath     = "/minio/v2/metrics/node"
-       bucketMetricsPath   = "/minio/v2/metrics/bucket"
-       resourceJobName     = "minio-job-resource"
-       resourceMetricsPath = "/minio/v2/metrics/resource"
+       defaultJobName    = "minio-job"
+       metricsV2BasePath = "/minio/v2/metrics"
 )
 
-var prometheusFlags = []cli.Flag{
+var prometheusFlags = append(metricsFlags,
        cli.BoolFlag{
                Name:  "public",
                Usage: "disable bearer token generation for scrape_configs",
-       },
-}
+       })
 
 var adminPrometheusGenerateCmd = cli.Command{
        Name:            "generate",
@@ -63,14 +56,56 @@
   {{.HelpName}} TARGET [METRIC-TYPE]
 
 METRIC-TYPE:
-  valid values are ['cluster', 'node', 'bucket']. Defaults to 'cluster' if not 
specified.
+  valid values are
+    api-version v2 ['cluster', 'node', 'bucket', 'resource']. defaults to 
'cluster' if not specified.
+    api-version v3 ["api", "system", "debug", "cluster", "ilm", "audit", 
"logger", "replication", "notification", "scanner"]. defaults to all if not 
specified.
 
 FLAGS:
   {{range .VisibleFlags}}{{.}}
   {{end}}
-EXAMPLES:
+EXAMPLES (v3):
+  1. Generate a default prometheus config.
+     {{.Prompt}} {{.HelpName}} play --api-version v3
+
+  2. Generate prometheus config for api metrics.
+     {{.Prompt}} {{.HelpName}} play api --api-version v3
+
+  3. Generate prometheus config for api metrics of bucket 'mybucket'.
+     {{.Prompt}} {{.HelpName}} play api --bucket mybucket --api-version v3
+
+  4. Generate prometheus config for system metrics.
+     {{.Prompt}} {{.HelpName}} play system --api-version v3
+
+  5. Generate prometheus config for debug metrics.
+     {{.Prompt}} {{.HelpName}} play debug --api-version v3
+
+  6. Generate prometheus config for cluster metrics.
+     {{.Prompt}} {{.HelpName}} play cluster --api-version v3
+
+  7. Generate prometheus config for ilm metrics.
+     {{.Prompt}} {{.HelpName}} play ilm --api-version v3
+
+  8. Generate prometheus config for audit metrics.
+     {{.Prompt}} {{.HelpName}} play audit --api-version v3
+
+  9. Generate prometheus config for logger metrics.
+     {{.Prompt}} {{.HelpName}} play logger --api-version v3
+
+  10. Generate prometheus config for replication metrics.
+     {{.Prompt}} {{.HelpName}} play replication --api-version v3
+
+  11. Generate prometheus config for replication metrics of bucket 'mybucket'.
+     {{.Prompt}} {{.HelpName}} play replication --bucket mybucket 
--api-version v3
+
+  12. Generate prometheus config for notification metrics.
+     {{.Prompt}} {{.HelpName}} play notification --api-version v3
+
+  13. Generate prometheus config for scanner metrics.
+     {{.Prompt}} {{.HelpName}} play scanner --api-version v3
+
+EXAMPLES (v2):
   1. Generate a default prometheus config.
-     {{.Prompt}} {{.HelpName}} myminio
+     {{.Prompt}} {{.HelpName}} play
 
   2. Generate prometheus config for node metrics.
      {{.Prompt}} {{.HelpName}} play node
@@ -80,6 +115,9 @@
 
   4. Generate prometheus config for resource metrics.
      {{.Prompt}} {{.HelpName}} play resource
+
+  5. Generate prometheus config for cluster metrics.
+     {{.Prompt}} {{.HelpName}} play cluster
 `,
 }
 
@@ -164,66 +202,43 @@
        }
 
        metricsSubSystem := args.Get(1)
-       var config PrometheusConfig
-       switch metricsSubSystem {
-       case "node":
-               config = PrometheusConfig{
-                       ScrapeConfigs: []ScrapeConfig{
-                               {
-                                       JobName:     nodeJobName,
-                                       MetricsPath: nodeMetricsPath,
-                                       StaticConfigs: []StatConfig{
-                                               {
-                                                       Targets: []string{""},
-                                               },
-                                       },
-                               },
-                       },
+       apiVer := ctx.String("api-version")
+       jobName := defaultJobName
+       metricsPath := ""
+
+       switch apiVer {
+       case "v2":
+               if metricsSubSystem == "" {
+                       metricsSubSystem = "cluster"
                }
-       case "bucket":
-               config = PrometheusConfig{
-                       ScrapeConfigs: []ScrapeConfig{
-                               {
-                                       JobName:     bucketJobName,
-                                       MetricsPath: bucketMetricsPath,
-                                       StaticConfigs: []StatConfig{
-                                               {
-                                                       Targets: []string{""},
-                                               },
-                                       },
-                               },
-                       },
+               validateV2Args(ctx, metricsSubSystem)
+               if metricsSubSystem != "cluster" {
+                       jobName = defaultJobName + "-" + metricsSubSystem
                }
-       case "resource":
-               config = PrometheusConfig{
-                       ScrapeConfigs: []ScrapeConfig{
-                               {
-                                       JobName:     resourceJobName,
-                                       MetricsPath: resourceMetricsPath,
-                                       StaticConfigs: []StatConfig{
-                                               {
-                                                       Targets: []string{""},
-                                               },
-                                       },
-                               },
-                       },
+               metricsPath = metricsV2BasePath + "/" + metricsSubSystem
+       case "v3":
+               bucket := ctx.String("bucket")
+               validateV3Args(metricsSubSystem, bucket)
+               metricsPath = getMetricsV3Path(metricsSubSystem, bucket)
+               if metricsSubSystem != "" {
+                       jobName = defaultJobName + "-" + metricsSubSystem
                }
-       case "", "cluster":
-               config = PrometheusConfig{
-                       ScrapeConfigs: []ScrapeConfig{
-                               {
-                                       JobName:     defaultJobName,
-                                       MetricsPath: defaultMetricsPath,
-                                       StaticConfigs: []StatConfig{
-                                               {
-                                                       Targets: []string{""},
-                                               },
+       default:
+               fatalIf(errInvalidArgument().Trace(), "Invalid api version 
`"+apiVer+"`")
+       }
+
+       config := PrometheusConfig{
+               ScrapeConfigs: []ScrapeConfig{
+                       {
+                               JobName:     jobName,
+                               MetricsPath: metricsPath,
+                               StaticConfigs: []StatConfig{
+                                       {
+                                               Targets: []string{""},
                                        },
                                },
                        },
-               }
-       default:
-               fatalIf(errInvalidArgument().Trace(), "invalid metric type 
'%v'", metricsSubSystem)
+               },
        }
 
        if !ctx.Bool("public") {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mc-20240708T205924Z/cmd/admin-prometheus-metrics-v3.go 
new/mc-20240711T180128Z/cmd/admin-prometheus-metrics-v3.go
--- old/mc-20240708T205924Z/cmd/admin-prometheus-metrics-v3.go  1970-01-01 
01:00:00.000000000 +0100
+++ new/mc-20240711T180128Z/cmd/admin-prometheus-metrics-v3.go  2024-07-11 
20:01:28.000000000 +0200
@@ -0,0 +1,110 @@
+// Copyright (c) 2015-2024 MinIO, Inc.
+//
+// This file is part of MinIO Object Storage stack
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+package cmd
+
+import (
+       "errors"
+       "fmt"
+       "net/http"
+       "net/url"
+       "strings"
+
+       "github.com/minio/cli"
+       "github.com/minio/minio-go/v7/pkg/set"
+)
+
+var (
+       metricsV3Flags = []cli.Flag{
+               cli.StringFlag{
+                       Name:  "bucket",
+                       Usage: "bucket name to list metrics for. only 
applicable with api version v3 for metric type 'bucket'",
+               },
+       }
+
+       metricsV3SubSystems = set.CreateStringSet("api", "system", "debug", 
"cluster",
+               "ilm", "audit", "logger", "replication", "notification", 
"scanner")
+
+       bucketMetricsSubSystems = set.CreateStringSet("api", "replication")
+)
+
+const metricsV3EndPointRoot = "/minio/metrics/v3"
+
+func getMetricsV3Path(subsys string, bucket string) string {
+       params := url.Values{}
+
+       metricsPath := metricsV3EndPointRoot
+       if len(bucket) > 0 {
+               metricsPath += "/bucket"
+       }
+
+       if len(subsys) > 0 {
+               metricsPath += "/" + subsys
+       }
+
+       if len(bucket) > 0 {
+               // bucket specific metrics endpoints have '/bucket' prefix and 
bucket name as suffix.
+               // e.g. bucket api metrics: /bucket/api/mybucket
+               metricsPath += "/" + bucket
+       }
+
+       qparams := params.Encode()
+       if len(qparams) > 0 {
+               metricsPath += "?" + qparams
+       }
+       return metricsPath
+}
+
+func validateV3Args(subsys string, bucket string) {
+       if subsys != "" && !metricsV3SubSystems.Contains(subsys) {
+               fatalIf(errInvalidArgument().Trace(),
+                       "invalid metric type `"+subsys+"`. valid values are `"+
+                               strings.Join(metricsV3SubSystems.ToSlice(), ", 
")+"`")
+       }
+
+       if len(bucket) > 0 {
+               bms := strings.Join(bucketMetricsSubSystems.ToSlice(), ", ")
+               if len(subsys) == 0 {
+                       fatalIf(errInvalidArgument().Trace(), 
fmt.Sprintf("metric type must be passed with --bucket. valid values are 
`"+bms+"`"))
+               }
+
+               if !bucketMetricsSubSystems.Contains(subsys) {
+                       fatalIf(errInvalidArgument().Trace(), 
fmt.Sprintf("--bucket is applicable only for metric types `"+bms+"`"))
+               }
+       }
+}
+
+func printPrometheusMetricsV3(ctx *cli.Context, req prometheusMetricsReq) 
error {
+       bucket := ctx.String("bucket")
+       validateV3Args(req.subsystem, bucket)
+
+       metricsURL := req.aliasURL + getMetricsV3Path(req.subsystem, bucket)
+
+       resp, e := fetchMetrics(metricsURL, req.token)
+       if e != nil {
+               return e
+       }
+
+       defer resp.Body.Close()
+
+       if resp.StatusCode == http.StatusOK {
+               printMsg(prometheusMetricsReader{Reader: resp.Body})
+               return nil
+       }
+
+       return errors.New(resp.Status)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/admin-prometheus-metrics.go 
new/mc-20240711T180128Z/cmd/admin-prometheus-metrics.go
--- old/mc-20240708T205924Z/cmd/admin-prometheus-metrics.go     2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/admin-prometheus-metrics.go     2024-07-11 
20:01:28.000000000 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2015-2022 MinIO, Inc.
+// Copyright (c) 2015-2024 MinIO, Inc.
 //
 // This file is part of MinIO Object Storage stack
 //
@@ -22,49 +22,105 @@
        "io"
        "net/http"
        "os"
+       "strings"
        "time"
 
        "github.com/minio/cli"
        json "github.com/minio/colorjson"
        "github.com/minio/madmin-go/v3"
        "github.com/minio/mc/pkg/probe"
+       "github.com/minio/minio-go/v7/pkg/set"
 )
 
+var metricsFlags = append(metricsV3Flags,
+       cli.StringFlag{
+               Name:  "api-version",
+               Usage: "version of metrics api to use. valid values are ['v2', 
'v3']. defaults to 'v2' if not specified.",
+               Value: "v2",
+       })
+
+var metricsV2SubSystems = set.CreateStringSet("node", "bucket", "cluster", 
"resource")
+
 var adminPrometheusMetricsCmd = cli.Command{
        Name:         "metrics",
-       Usage:        "print cluster wide prometheus metrics",
+       Usage:        "print prometheus metrics",
        OnUsageError: onUsageError,
        Action:       mainSupportMetrics,
        Before:       setGlobalsFromContext,
-       Flags:        globalFlags,
+       Flags:        append(globalFlags, metricsFlags...),
        CustomHelpTemplate: `NAME:
   {{.HelpName}} - {{.Usage}}
 USAGE:
   {{.HelpName}} TARGET [METRIC-TYPE]
 
 METRIC-TYPE:
-  valid values are ['cluster', 'node', 'bucket', 'resource']. Defaults to 
'cluster' if not specified.
+  valid values are
+    api-version v2 ['cluster', 'node', 'bucket', 'resource']. defaults to 
'cluster' if not specified.
+    api-version v3 ["api", "system", "debug", "cluster", "ilm", "audit", 
"logger", "replication", "notification", "scanner"]. defaults to all if not 
specified.
 
 FLAGS:
   {{range .VisibleFlags}}{{.}}
   {{end}}
-EXAMPLES:
-  1. List of metrics reported cluster wide.
+EXAMPLES (v3):
+  1. API metrics
+     {{.Prompt}} {{.HelpName}} play api --api-version v3
+
+  2. API metrics for the bucket 'mybucket'
+     {{.Prompt}} {{.HelpName}} play api --bucket mybucket --api-version v3
+
+  3. System metrics
+     {{.Prompt}} {{.HelpName}} play system --api-version v3
+
+  4. Debug metrics
+     {{.Prompt}} {{.HelpName}} play debug --api-version v3
+
+  5. Cluster metrics
+     {{.Prompt}} {{.HelpName}} play cluster --api-version v3
+
+  6. ILM metrics
+     {{.Prompt}} {{.HelpName}} play ilm --api-version v3
+
+  7. Audit metrics
+     {{.Prompt}} {{.HelpName}} play audit --api-version v3
+
+  8. Logger metrics
+     {{.Prompt}} {{.HelpName}} play logger --api-version v3
+
+  9. Replication metrics
+     {{.Prompt}} {{.HelpName}} play replication --api-version v3
+
+  10. Replication metrics for the bucket 'mybucket'
+      {{.Prompt}} {{.HelpName}} play replication --bucket mybucket 
--api-version v3
+
+  11. Notification metrics
+      {{.Prompt}} {{.HelpName}} play notification --api-version v3
+
+  12. Scanner metrics
+      {{.Prompt}} {{.HelpName}} play scanner --api-version v3
+
+EXAMPLES (v2):
+  1. Metrics reported cluster wide.
      {{.Prompt}} {{.HelpName}} play
 
-  2. List of metrics reported at node level.
+  2. Metrics reported at node level.
      {{.Prompt}} {{.HelpName}} play node
 
-  3. List of metrics reported at bucket level.
+  3. Metrics reported at bucket level.
      {{.Prompt}} {{.HelpName}} play bucket
 
-  4. List of resource metrics.
+  4. Resource metrics.
      {{.Prompt}} {{.HelpName}} play resource
 `,
 }
 
 const metricsEndPointRoot = "/minio/v2/metrics/"
 
+type prometheusMetricsReq struct {
+       aliasURL  string
+       token     string
+       subsystem string
+}
+
 // checkSupportMetricsSyntax - validate arguments passed by a user
 func checkSupportMetricsSyntax(ctx *cli.Context) {
        if len(ctx.Args()) == 0 || len(ctx.Args()) > 2 {
@@ -72,44 +128,42 @@
        }
 }
 
-func printPrometheusMetrics(ctx *cli.Context) error {
-       // Get the alias parameter from cli
-       args := ctx.Args()
-       alias := cleanAlias(args.Get(0))
-
-       if !isValidAlias(alias) {
-               fatalIf(errInvalidAlias(alias), "Invalid alias.")
+func fetchMetrics(metricsURL string, token string) (*http.Response, error) {
+       req, e := http.NewRequest(http.MethodGet, metricsURL, nil)
+       if e != nil {
+               return nil, e
        }
-       hostConfig := mustGetHostConfig(alias)
-       if hostConfig == nil {
-               fatalIf(errInvalidAliasedURL(alias), "No such alias `"+alias+"` 
found.")
-               return nil
+       if token != "" {
+               req.Header.Add("Authorization", "Bearer "+token)
        }
 
-       token, e := getPrometheusToken(hostConfig)
-       if e != nil {
-               return e
-       }
-       metricsSubSystem := args.Get(1)
-       switch metricsSubSystem {
-       case "node", "bucket", "cluster", "resource":
-       case "":
-               metricsSubSystem = "cluster"
-       default:
-               fatalIf(errInvalidArgument().Trace(), "invalid metric type 
'%v'", metricsSubSystem)
+       client := httpClient(60 * time.Second)
+       return client.Do(req)
+}
+
+func validateV2Args(ctx *cli.Context, subsys string) {
+       for _, flag := range metricsV3Flags {
+               flagName := flag.GetName()
+               if ctx.IsSet(flagName) {
+                       fatalIf(errInvalidArgument().Trace(), "Flag 
`"+flagName+"` is not supported with v2 metrics")
+               }
        }
 
-       req, e := http.NewRequest(http.MethodGet, 
hostConfig.URL+metricsEndPointRoot+metricsSubSystem, nil)
-       if e != nil {
-               return e
+       if !metricsV2SubSystems.Contains(subsys) {
+               fatalIf(errInvalidArgument().Trace(),
+                       "invalid metric type `"+subsys+"`. valid values are `"+
+                               strings.Join(metricsV2SubSystems.ToSlice(), ", 
")+"`")
        }
+}
 
-       if token != "" {
-               req.Header.Add("Authorization", "Bearer "+token)
+func printPrometheusMetricsV2(ctx *cli.Context, req prometheusMetricsReq) 
error {
+       subsys := req.subsystem
+       if subsys == "" {
+               subsys = "cluster"
        }
+       validateV2Args(ctx, subsys)
 
-       client := httpClient(60 * time.Second)
-       resp, e := client.Do(req)
+       resp, e := fetchMetrics(req.aliasURL+metricsEndPointRoot+subsys, 
req.token)
        if e != nil {
                return e
        }
@@ -151,7 +205,44 @@
 func mainSupportMetrics(ctx *cli.Context) error {
        checkSupportMetricsSyntax(ctx)
 
-       fatalIf(probe.NewError(printPrometheusMetrics(ctx)), "Unable to list 
prometheus metrics.")
+       // Get the alias parameter from cli
+       args := ctx.Args()
+       alias := cleanAlias(args.Get(0))
+
+       if !isValidAlias(alias) {
+               fatalIf(errInvalidAlias(alias), "Invalid alias.")
+       }
+
+       hostConfig := mustGetHostConfig(alias)
+       if hostConfig == nil {
+               fatalIf(errInvalidAliasedURL(alias), "No such alias `"+alias+"` 
found.")
+               return nil
+       }
+
+       token, e := getPrometheusToken(hostConfig)
+       if e != nil {
+               return e
+       }
+
+       metricsSubSystem := args.Get(1)
+       apiVer := ctx.String("api-version")
+
+       metricsReq := prometheusMetricsReq{
+               aliasURL:  hostConfig.URL,
+               token:     token,
+               subsystem: metricsSubSystem,
+       }
+
+       switch apiVer {
+       case "v2":
+               err := printPrometheusMetricsV2(ctx, metricsReq)
+               fatalIf(probe.NewError(err), "Unable to list prometheus metrics 
with api-version v2.")
+       case "v3":
+               err := printPrometheusMetricsV3(ctx, metricsReq)
+               fatalIf(probe.NewError(err), "Unable to list prometheus metrics 
with api-version v3.")
+       default:
+               fatalIf(errInvalidArgument().Trace(), "Invalid api version 
`"+apiVer+"`")
+       }
 
        return nil
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/legalhold-info.go 
new/mc-20240711T180128Z/cmd/legalhold-info.go
--- old/mc-20240708T205924Z/cmd/legalhold-info.go       2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/legalhold-info.go       2024-07-11 
20:01:28.000000000 +0200
@@ -177,7 +177,7 @@
                        continue
                }
 
-               if !recursive && alias+getKey(content) != 
getStandardizedURL(urlStr) {
+               if !recursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(urlStr) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/legalhold-set.go 
new/mc-20240711T180128Z/cmd/legalhold-set.go
--- old/mc-20240708T205924Z/cmd/legalhold-set.go        2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/legalhold-set.go        2024-07-11 
20:01:28.000000000 +0200
@@ -129,7 +129,7 @@
                        continue
                }
 
-               if !recursive && alias+getKey(content) != 
getStandardizedURL(urlStr) {
+               if !recursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(urlStr) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/retention-common.go 
new/mc-20240711T180128Z/cmd/retention-common.go
--- old/mc-20240708T205924Z/cmd/retention-common.go     2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/retention-common.go     2024-07-11 
20:01:28.000000000 +0200
@@ -235,7 +235,7 @@
                        continue
                }
 
-               if !isRecursive && alias+getKey(content) != 
getStandardizedURL(target) {
+               if !isRecursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(target) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/retention-info.go 
new/mc-20240711T180128Z/cmd/retention-info.go
--- old/mc-20240708T205924Z/cmd/retention-info.go       2024-07-08 
22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/retention-info.go       2024-07-11 
20:01:28.000000000 +0200
@@ -346,7 +346,7 @@
                        continue
                }
 
-               if !isRecursive && alias+getKey(content) != 
getStandardizedURL(target) {
+               if !isRecursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(target) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/rm-main.go 
new/mc-20240711T180128Z/cmd/rm-main.go
--- old/mc-20240708T205924Z/cmd/rm-main.go      2024-07-08 22:59:24.000000000 
+0200
+++ new/mc-20240711T180128Z/cmd/rm-main.go      2024-07-11 20:01:28.000000000 
+0200
@@ -469,7 +469,7 @@
                }
 
                if !opts.isRecursive {
-                       currentObjectURL := targetAlias + getKey(content)
+                       currentObjectURL := getStandardizedURL(targetAlias + 
getKey(content))
                        standardizedURL := getStandardizedURL(currentObjectURL)
                        if !strings.HasPrefix(url, standardizedURL) {
                                break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/stat.go 
new/mc-20240711T180128Z/cmd/stat.go
--- old/mc-20240708T205924Z/cmd/stat.go 2024-07-08 22:59:24.000000000 +0200
+++ new/mc-20240711T180128Z/cmd/stat.go 2024-07-11 20:01:28.000000000 +0200
@@ -295,7 +295,7 @@
                        continue
                }
 
-               url := targetAlias + getKey(content)
+               url := getStandardizedURL(targetAlias + getKey(content))
                standardizedURL := getStandardizedURL(targetURL)
 
                if !isRecursive && !strings.HasPrefix(filepath.FromSlash(url), 
standardizedURL) && !filepath.IsAbs(url) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/tag-list.go 
new/mc-20240711T180128Z/cmd/tag-list.go
--- old/mc-20240708T205924Z/cmd/tag-list.go     2024-07-08 22:59:24.000000000 
+0200
+++ new/mc-20240711T180128Z/cmd/tag-list.go     2024-07-11 20:01:28.000000000 
+0200
@@ -235,7 +235,7 @@
                        continue
                }
 
-               if !recursive && alias+getKey(content) != 
getStandardizedURL(targetURL) {
+               if !recursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(targetURL) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/tag-remove.go 
new/mc-20240711T180128Z/cmd/tag-remove.go
--- old/mc-20240708T205924Z/cmd/tag-remove.go   2024-07-08 22:59:24.000000000 
+0200
+++ new/mc-20240711T180128Z/cmd/tag-remove.go   2024-07-11 20:01:28.000000000 
+0200
@@ -192,7 +192,7 @@
                        continue
                }
 
-               if !recursive && alias+getKey(content) != 
getStandardizedURL(targetURL) {
+               if !recursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(targetURL) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/tag-set.go 
new/mc-20240711T180128Z/cmd/tag-set.go
--- old/mc-20240708T205924Z/cmd/tag-set.go      2024-07-08 22:59:24.000000000 
+0200
+++ new/mc-20240711T180128Z/cmd/tag-set.go      2024-07-11 20:01:28.000000000 
+0200
@@ -210,7 +210,7 @@
                        continue
                }
 
-               if !recursive && alias+getKey(content) != 
getStandardizedURL(targetURL) {
+               if !recursive && getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(targetURL) {
                        break
                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mc-20240708T205924Z/cmd/undo-main.go 
new/mc-20240711T180128Z/cmd/undo-main.go
--- old/mc-20240708T205924Z/cmd/undo-main.go    2024-07-08 22:59:24.000000000 
+0200
+++ new/mc-20240711T180128Z/cmd/undo-main.go    2024-07-11 20:01:28.000000000 
+0200
@@ -227,7 +227,7 @@
                }
 
                if !recursive {
-                       if alias+getKey(content) != 
getStandardizedURL(aliasedURL) {
+                       if getStandardizedURL(alias+getKey(content)) != 
getStandardizedURL(aliasedURL) {
                                break
                        }
                }

++++++ mc.obsinfo ++++++
--- /var/tmp/diff_new_pack.nxEUMi/_old  2024-07-15 19:47:36.043975533 +0200
+++ /var/tmp/diff_new_pack.nxEUMi/_new  2024-07-15 19:47:36.047975679 +0200
@@ -1,5 +1,5 @@
 name: mc
-version: 20240708T205924Z
-mtime: 1720472364
-commit: 21d3ec0089a1fa297cbdc23db413012535e2ff9e
+version: 20240711T180128Z
+mtime: 1720720888
+commit: 4d498deb35e878efd601dae056f52c6134ddf37f
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/minio-client/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.minio-client.new.17339/vendor.tar.gz differ: char 
5, line 1

Reply via email to