Skip to content

Commit 0aeffa3

Browse files
OPECO-2646: exclude bundles with olm.deprecated property when rendering (#1063)
* exclude bundles with `olm.deprecated` property when rendering Signed-off-by: Rashmi Gottipati <[email protected]> * Exclude bundles based on the property type and not value Signed-off-by: Rashmi Gottipati <[email protected]> --------- Signed-off-by: Rashmi Gottipati <[email protected]>
1 parent 67e6777 commit 0aeffa3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/sqlite/conversion.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,16 @@ func populateModelChannels(ctx context.Context, pkgs model.Model, q *SQLQuerier)
7676
if err != nil {
7777
return err
7878
}
79+
80+
ConvertBundles:
7981
for _, bundle := range bundles {
82+
for _, prop := range bundle.Properties {
83+
if prop.Type == registry.DeprecatedType {
84+
// bundle contains `olm.Deprecated` property
85+
// exclude this bundle from being rendered
86+
continue ConvertBundles
87+
}
88+
}
8089
pkg, ok := pkgs[bundle.PackageName]
8190
if !ok {
8291
return fmt.Errorf("unknown package %q for bundle %q", bundle.PackageName, bundle.CsvName)

0 commit comments

Comments
 (0)