From b1a8d84150b78c8cdfe35dea12da1b8a20f3653f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 12:00:31 +0200 Subject: [PATCH 1/4] Bump google.golang.org/grpc from 1.46.2 to 1.47.0 (#1145) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.2 to 1.47.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.46.2...v1.47.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc 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 | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fdc9c836d2..ce5be181e1 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 - google.golang.org/grpc v1.46.2 + google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/reform.v1 v1.5.1 diff --git a/go.sum b/go.sum index e216c9560b..21e97da743 100644 --- a/go.sum +++ b/go.sum @@ -914,8 +914,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 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= From 8392f40855497c96288538b6a43dd9c8f3742873 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 10:18:09 +0000 Subject: [PATCH 2/4] Bump github.com/daixiang0/gci from 0.3.3 to 0.3.4 in /tools (#1147) Bumps [github.com/daixiang0/gci](https://github.com/daixiang0/gci) from 0.3.3 to 0.3.4. - [Release notes](https://github.com/daixiang0/gci/releases) - [Commits](https://github.com/daixiang0/gci/compare/v0.3.3...v0.3.4) --- updated-dependencies: - dependency-name: github.com/daixiang0/gci 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> --- tools/go.mod | 5 ++++- tools/go.sum | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index b94f4dda21..37ba5aa647 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/BurntSushi/go-sumtype v0.0.0-20190304192233-fcb4a6205bdc - github.com/daixiang0/gci v0.3.3 + github.com/daixiang0/gci v0.3.4 github.com/go-delve/delve v1.8.3 github.com/golangci/golangci-lint v1.46.2 github.com/quasilyte/go-consistent v0.0.0-20200404105227-766526bf1e96 @@ -199,6 +199,9 @@ require ( gitlab.com/bosi/decorder v0.2.1 // indirect go.opencensus.io v0.23.0 // indirect go.starlark.net v0.0.0-20211203141949-70c0e40ae128 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.17.0 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect golang.org/x/build v0.0.0-20220125175651-da4f1d2313e4 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect diff --git a/tools/go.sum b/tools/go.sum index 77834024d0..f05ea83a31 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -197,8 +197,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.15 h1:cKRCLMj3Ddm54bKSpemfQ8AtYFBhAI2MPmdys22fBdc= -github.com/daixiang0/gci v0.3.3 h1:55xJKH7Gl9Vk6oQ1cMkwrDWjAkT1D+D1G9kNmRcAIY4= -github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= +github.com/daixiang0/gci v0.3.4 h1:+EZ83znNs73C9ZBTM7xhNagMP6gJs5wlptiFiuce5BM= +github.com/daixiang0/gci v0.3.4/go.mod h1:pB1j339Q+2sv/EyKd4dgvGXcaBGIErim+dlhLDtqeW4= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -996,14 +996,17 @@ go.starlark.net v0.0.0-20211203141949-70c0e40ae128/go.mod h1:t3mmBBPzAVvK0L0n1dr go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= From 5ded40c0d9c48455674a6c8c4edb65a868265534 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 10:37:33 +0000 Subject: [PATCH 3/4] Bump github.com/aws/aws-sdk-go from 1.44.25 to 1.44.27 (#1146) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.25 to 1.44.27. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.25...v1.44.27) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go 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 | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ce5be181e1..eda6fe9dee 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/Azure/go-autorest/autorest/azure/auth v0.5.11 github.com/ClickHouse/clickhouse-go/v2 v2.0.14 github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d - github.com/aws/aws-sdk-go v1.44.25 + github.com/aws/aws-sdk-go v1.44.27 github.com/brianvoe/gofakeit/v6 v6.16.0 github.com/davecgh/go-spew v1.1.1 github.com/go-co-op/gocron v1.13.0 diff --git a/go.sum b/go.sum index 21e97da743..3b9f6e86f1 100644 --- a/go.sum +++ b/go.sum @@ -87,8 +87,8 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.25 h1:cJZ4gtEpWAD/StO9GGOAyv6AaAoZ9OJUhu96gF9qaio= -github.com/aws/aws-sdk-go v1.44.25/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.27 h1:8CMspeZSrewnbvAwgl8qo5R7orDLwQnTGBf/OKPiHxI= +github.com/aws/aws-sdk-go v1.44.27/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= From c1c142e3479efc185c21e5428df45d751fec1030 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Mon, 6 Jun 2022 16:47:49 +0300 Subject: [PATCH 4/4] PMM-10110 Don't ignore 'status' field. (#1144) * PMM-10110 Don't ignore 'status' field. * PMM-10110 Fix tests --- services/management/dbaas/components_service_test.go | 5 +++-- services/management/dbaas/version_service_client.go | 12 ++++++------ .../management/dbaas/version_service_client_test.go | 5 +++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/services/management/dbaas/components_service_test.go b/services/management/dbaas/components_service_test.go index 4f03257cf9..76f03d312b 100644 --- a/services/management/dbaas/components_service_test.go +++ b/services/management/dbaas/components_service_test.go @@ -496,6 +496,7 @@ func TestFilteringOutOfUnsupportedVersions(t *testing.T) { } const ( + onePointTen = "1.10.0" onePointNine = "1.9.0" onePointEight = "1.8.0" onePointSeven = "1.7.0" @@ -688,11 +689,11 @@ func TestCheckForOperatorUpdate(t *testing.T) { Product: "pmm-server", Matrix: matrix{ PSMDBOperator: map[string]componentVersion{ - onePointEight: {}, + onePointEight: {Status: "recommended"}, onePointSeven: {}, }, PXCOperator: map[string]componentVersion{ - onePointEight: {}, + onePointEight: {Status: "recommended"}, onePointSeven: {}, }, }, diff --git a/services/management/dbaas/version_service_client.go b/services/management/dbaas/version_service_client.go index 11d21e1529..83d7b60526 100644 --- a/services/management/dbaas/version_service_client.go +++ b/services/management/dbaas/version_service_client.go @@ -208,24 +208,24 @@ func (c *VersionServiceClient) IsOperatorVersionSupported(ctx context.Context, o return false, nil } -func latest(m map[string]componentVersion) (*goversion.Version, error) { +func latestRecommended(m map[string]componentVersion) (*goversion.Version, error) { if len(m) == 0 { return nil, errNoVersionsFound } latest := goversion.Must(goversion.NewVersion("0.0.0")) - for version := range m { + for version, component := range m { parsedVersion, err := goversion.NewVersion(version) if err != nil { return nil, err } - if parsedVersion.GreaterThan(latest) { + if parsedVersion.GreaterThan(latest) && component.Status == "recommended" { latest = parsedVersion } } return latest, nil } -// LatestOperatorVersion return latest PXC and PSMDB operators for given PMM version. +// LatestOperatorVersion return latest recommended PXC and PSMDB operators for given PMM version. func (c *VersionServiceClient) LatestOperatorVersion(ctx context.Context, pmmVersion string) (*goversion.Version, *goversion.Version, error) { if pmmVersion == "" { return nil, nil, errors.New("given PMM version is empty") @@ -242,11 +242,11 @@ func (c *VersionServiceClient) LatestOperatorVersion(ctx context.Context, pmmVer return nil, nil, nil // no deps for the PMM version passed to c.Matrix } pmmVersionDeps := resp.Versions[0] - latestPSMDBOperator, err := latest(pmmVersionDeps.Matrix.PSMDBOperator) + latestPSMDBOperator, err := latestRecommended(pmmVersionDeps.Matrix.PSMDBOperator) if err != nil { return nil, nil, err } - latestPXCOperator, err := latest(pmmVersionDeps.Matrix.PXCOperator) + latestPXCOperator, err := latestRecommended(pmmVersionDeps.Matrix.PXCOperator) return latestPXCOperator, latestPSMDBOperator, err } diff --git a/services/management/dbaas/version_service_client_test.go b/services/management/dbaas/version_service_client_test.go index 8f9d73bdc0..75a57e496a 100644 --- a/services/management/dbaas/version_service_client_test.go +++ b/services/management/dbaas/version_service_client_test.go @@ -202,11 +202,12 @@ func TestOperatorVersionGetting(t *testing.T) { Product: "pmm-server", Matrix: matrix{ PXCOperator: map[string]componentVersion{ - onePointEight: {}, + onePointEight: {Status: "recommended"}, onePointSeven: {}, }, PSMDBOperator: map[string]componentVersion{ - onePointNine: {}, + onePointTen: {Status: "available"}, + onePointNine: {Status: "recommended"}, onePointEight: {}, onePointSeven: {}, },