Skip to content

Commit

Permalink
Merge pull request openshift#463 from perdasilva/exclude_deprecated
Browse files Browse the repository at this point in the history
OPECO-2646: exclude bundles with `olm.deprecated` property when rendering
  • Loading branch information
openshift-merge-robot authored Mar 7, 2023
2 parents d421904 + b11dff0 commit 2e352e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions staging/operator-registry/pkg/sqlite/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2e352e7

Please sign in to comment.