Skip to content

Commit b7f4660

Browse files
committed
look in all catalogs when no catalog specified
1 parent 4bac15e commit b7f4660

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pkg/controller/registry/resolver/cache.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ func ensurePackageProperty(o *Operator, name, version string) {
233233
}
234234

235235
func (c *NamespacedOperatorCache) Catalog(k registry.CatalogKey) OperatorFinder {
236+
// all catalogs match the empty catalog
237+
if k.Empty() {
238+
return c
239+
}
236240
if snapshot, ok := c.snapshots[k]; ok {
237241
return snapshot
238242
}

pkg/controller/registry/resolver/step_resolver.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,14 @@ func (r *OperatorStepResolver) ResolveSteps(namespace string, _ SourceQuerier) (
103103
updatedSubs := []*v1alpha1.Subscription{}
104104
bundleLookups := []v1alpha1.BundleLookup{}
105105
for name, op := range operators {
106-
// todo: added "is default channel" to sourceinfo out
106+
// TODO: added "is default channel" to sourceinfo out
107107
// of convenience, which breaks map key equality here
108108
// because it requires information that can't be
109109
// gleaned from subscriptions alone. need to revisit
110+
// TODO: this check also doesn't properly account for
111+
// subscriptions made without a catalog specified,
112+
// which means the sourceinfo won't match for the
113+
// realized operator
110114
sourceInfo := *op.SourceInfo()
111115
sourceInfo.DefaultChannel = false
112116
_, isAdded := add[sourceInfo]

0 commit comments

Comments
 (0)