Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot Fix for Deprecation Info #3149

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controller/operators/catalog/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func NewOperator(ctx context.Context, kubeconfigPath string, clock utilclock.Clo
subscription.WithAppendedReconcilers(subscription.ReconcilerFromLegacySyncHandler(op.syncSubscriptions, nil)),
subscription.WithRegistryReconcilerFactory(op.reconciler),
subscription.WithGlobalCatalogNamespace(op.namespace),
subscription.WithSourceProvider(resolverSourceProvider),
subscription.WithSourceProvider(op.sourceInvalidator),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to clarify, we needed the list of catalogSources in b9638dc and we just used the wrong source provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's right, the OperatorGroupToggleSourceProvider (from what I understand) is essentially a filter which allows users to exclude global catalogs from resolution. But I don't believe that this sourceProvider was intended to be used when taking cache snapshots of the CatalogSource namespace, instead it's used to allow for instance a user to ignore a Catalog update by adding an annotation to the OperatorGroup of a separate namespace in which their operator is installed.

In OCP deployments, the openshift-marketplace namespace doesn't have an OperatorGroup, so if you use this source provider it will error out when taking snapshots and give you nothing back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah got it, thanks Daniel!

)
if err != nil {
return nil, err
Expand Down