From 67cc87097383d6a18cae02c2ae8ad7937effe735 Mon Sep 17 00:00:00 2001 From: Rashmi Gottipati Date: Tue, 21 Feb 2023 10:00:40 -0500 Subject: [PATCH 1/2] OPECO-2646: exclude bundles with `olm.deprecated` property when rendering (#1063) * exclude bundles with `olm.deprecated` property when rendering Signed-off-by: Rashmi Gottipati * Exclude bundles based on the property type and not value Signed-off-by: Rashmi Gottipati --------- Signed-off-by: Rashmi Gottipati Upstream-repository: operator-registry Upstream-commit: 0aeffa3f44f5e36bd2c0bcc63a94eda000a5f257 --- staging/operator-registry/pkg/sqlite/conversion.go | 9 +++++++++ .../pkg/lib/indexer/index.Dockerfile294678580 | 0 .../pkg/lib/indexer/index.Dockerfile3566856741 | 0 .../operator-registry/pkg/sqlite/conversion.go | 9 +++++++++ 4 files changed, 18 insertions(+) create mode 100644 vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 create mode 100644 vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 diff --git a/staging/operator-registry/pkg/sqlite/conversion.go b/staging/operator-registry/pkg/sqlite/conversion.go index e94d052cf0..ff1da4c48e 100644 --- a/staging/operator-registry/pkg/sqlite/conversion.go +++ b/staging/operator-registry/pkg/sqlite/conversion.go @@ -76,7 +76,16 @@ func populateModelChannels(ctx context.Context, pkgs model.Model, q *SQLQuerier) if err != nil { return err } + +ConvertBundles: for _, bundle := range bundles { + for _, prop := range bundle.Properties { + if prop.Type == registry.DeprecatedType { + // bundle contains `olm.Deprecated` property + // exclude this bundle from being rendered + continue ConvertBundles + } + } pkg, ok := pkgs[bundle.PackageName] if !ok { return fmt.Errorf("unknown package %q for bundle %q", bundle.PackageName, bundle.CsvName) diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 b/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 b/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/sqlite/conversion.go b/vendor/github.com/operator-framework/operator-registry/pkg/sqlite/conversion.go index e94d052cf0..ff1da4c48e 100644 --- a/vendor/github.com/operator-framework/operator-registry/pkg/sqlite/conversion.go +++ b/vendor/github.com/operator-framework/operator-registry/pkg/sqlite/conversion.go @@ -76,7 +76,16 @@ func populateModelChannels(ctx context.Context, pkgs model.Model, q *SQLQuerier) if err != nil { return err } + +ConvertBundles: for _, bundle := range bundles { + for _, prop := range bundle.Properties { + if prop.Type == registry.DeprecatedType { + // bundle contains `olm.Deprecated` property + // exclude this bundle from being rendered + continue ConvertBundles + } + } pkg, ok := pkgs[bundle.PackageName] if !ok { return fmt.Errorf("unknown package %q for bundle %q", bundle.PackageName, bundle.CsvName) From b11dff05bf156cf7b5c84bf96f5e41430412d3b2 Mon Sep 17 00:00:00 2001 From: perdasilva Date: Tue, 7 Mar 2023 15:21:05 +0100 Subject: [PATCH 2/2] fix vendor Signed-off-by: perdasilva --- .../operator-registry/pkg/lib/indexer/index.Dockerfile294678580 | 0 .../operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 delete mode 100644 vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 b/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile294678580 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 b/vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile3566856741 deleted file mode 100644 index e69de29bb2..0000000000