Skip to content

Commit

Permalink
OPECO-2646: exclude bundles with olm.deprecated property when rende…
Browse files Browse the repository at this point in the history
…ring (operator-framework#1063)

* exclude bundles with `olm.deprecated` property when rendering

Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>

* Exclude bundles based on the property type and not value

Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>

---------

Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>
  • Loading branch information
rashmigottipati committed Feb 21, 2023
1 parent 67e6777 commit 0aeffa3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 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

0 comments on commit 0aeffa3

Please sign in to comment.