From bffc09167af69ebd108a64dd62ae5b59667631e6 Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Thu, 20 Jan 2022 17:47:21 +0300 Subject: [PATCH] [#316] Remove minio mentions in commits Signed-off-by: Angira Kekteeva --- api/errors/errors.go | 12 ------------ api/metrics/api.go | 6 +++--- api/metrics/collector.go | 2 +- api/reqinfo.go | 2 +- cmd/s3-gw/app_router.go | 4 +--- 5 files changed, 6 insertions(+), 20 deletions(-) diff --git a/api/errors/errors.go b/api/errors/errors.go index 1bac34e..b990a20 100644 --- a/api/errors/errors.go +++ b/api/errors/errors.go @@ -651,18 +651,12 @@ var errorCodes = errorCodeMap{ Description: "X-Amz-Date must be in the ISO8601 Long Format \"yyyyMMdd'T'HHmmss'Z'\"", HTTPStatusCode: http.StatusBadRequest, }, - // FIXME: Should contain the invalid param set as seen in https://github.com/minio/minio/issues/2385. - // right Description: "Error parsing the X-Amz-Credential parameter; incorrect date format \"%s\". This date in the credential must be in the format \"yyyyMMdd\".", - // Need changes to make sure variable messages can be constructed. ErrMalformedCredentialDate: { ErrCode: ErrMalformedCredentialDate, Code: "AuthorizationQueryParametersError", Description: "Error parsing the X-Amz-Credential parameter; incorrect date format \"%s\". This date in the credential must be in the format \"yyyyMMdd\".", HTTPStatusCode: http.StatusBadRequest, }, - // FIXME: Should contain the invalid param set as seen in https://github.com/minio/minio/issues/2385. - // right Description: "Error parsing the X-Amz-Credential parameter; the region 'us-east-' is wrong; expecting 'us-east-1'". - // Need changes to make sure variable messages can be constructed. ErrMalformedCredentialRegion: { ErrCode: ErrMalformedCredentialRegion, Code: "AuthorizationQueryParametersError", @@ -675,9 +669,6 @@ var errorCodes = errorCodeMap{ Description: "Region does not match.", HTTPStatusCode: http.StatusBadRequest, }, - // FIXME: Should contain the invalid param set as seen in https://github.com/minio/minio/issues/2385. - // right Description: "Error parsing the X-Amz-Credential parameter; incorrect service \"s4\". This endpoint belongs to \"s3\".". - // Need changes to make sure variable messages can be constructed. ErrInvalidServiceS3: { ErrCode: ErrInvalidServiceS3, Code: "AuthorizationParametersError", @@ -690,9 +681,6 @@ var errorCodes = errorCodeMap{ Description: "Error parsing the Credential parameter; incorrect service. This endpoint belongs to \"sts\".", HTTPStatusCode: http.StatusBadRequest, }, - // FIXME: Should contain the invalid param set as seen in https://github.com/minio/minio/issues/2385. - // Description: "Error parsing the X-Amz-Credential parameter; incorrect terminal "aws4_reque". This endpoint uses "aws4_request". - // Need changes to make sure variable messages can be constructed. ErrInvalidRequestVersion: { ErrCode: ErrInvalidRequestVersion, Code: "AuthorizationQueryParametersError", diff --git a/api/metrics/api.go b/api/metrics/api.go index 503cb17..e97a0af 100644 --- a/api/metrics/api.go +++ b/api/metrics/api.go @@ -70,7 +70,7 @@ func collectHTTPMetrics(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric( prometheus.NewDesc( prometheus.BuildFQName("neofs_s3", "requests", "current"), - "Total number of running s3 requests in current MinIO server instance", + "Total number of running s3 requests in current NeoFS S3 Gate instance", []string{"api"}, nil), prometheus.CounterValue, float64(value), @@ -82,7 +82,7 @@ func collectHTTPMetrics(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric( prometheus.NewDesc( prometheus.BuildFQName("neofs_s3", "requests", "total"), - "Total number of s3 requests in current MinIO server instance", + "Total number of s3 requests in current NeoFS S3 Gate instance", []string{"api"}, nil), prometheus.CounterValue, float64(value), @@ -94,7 +94,7 @@ func collectHTTPMetrics(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric( prometheus.NewDesc( prometheus.BuildFQName("neofs_s3", "errors", "total"), - "Total number of s3 errors in current MinIO server instance", + "Total number of s3 errors in current NeoFS S3 Gate instance", []string{"api"}, nil), prometheus.CounterValue, float64(value), diff --git a/api/metrics/collector.go b/api/metrics/collector.go index f8dfe00..f298841 100644 --- a/api/metrics/collector.go +++ b/api/metrics/collector.go @@ -23,7 +23,7 @@ var ( ) statsMetrics = &stats{ - desc: prometheus.NewDesc("neofs_s3_stats", "Statistics exposed by MinIO server", nil, nil), + desc: prometheus.NewDesc("neofs_s3_stats", "Statistics exposed by NeoFS S3 Gate instance", nil, nil), } ) diff --git a/api/reqinfo.go b/api/reqinfo.go index 100a12d..57e55d0 100644 --- a/api/reqinfo.go +++ b/api/reqinfo.go @@ -25,7 +25,7 @@ type ( RemoteHost string // Client Host/IP Host string // Node Host/IP UserAgent string // User Agent - DeploymentID string // x-minio-deployment-id + DeploymentID string // random generated s3-deployment-id RequestID string // x-amz-request-id API string // API name - GetObject PutObject NewMultipartUpload etc. BucketName string // Bucket name diff --git a/cmd/s3-gw/app_router.go b/cmd/s3-gw/app_router.go index 0f8efc0..3890e3c 100644 --- a/cmd/s3-gw/app_router.go +++ b/cmd/s3-gw/app_router.go @@ -5,8 +5,6 @@ import "github.com/gorilla/mux" const systemPath = "/system" func newS3Router() *mux.Router { - // Initialize router. `SkipClean(true)` stops gorilla/mux from - // normalizing URL path minio/minio#3256 - // avoid URL path encoding minio/minio#8950 + // Initialize router return mux.NewRouter().SkipClean(true).UseEncodedPath() }