-
Notifications
You must be signed in to change notification settings - Fork 546
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
Snapshot Fix for Deprecation Info #3149
Conversation
…ratorGroup. Signed-off-by: Daniel Franz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtfranz, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -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), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Any idea what's going on with tide? I haven't seen this before: |
It's disabled for the master branch. It's fine to merge. |
8eb16f7
When initially implemented, in order to retrieve deprecation metadata the subscription resolver was modified to add an optional sourceProvider and we incorrectly used the aggregate
OperatorGroupToggleSourceProvider
. This resulted in errors when taking snapshots from namespaces in which noOperatorGroups
were present.To fix, we just use the
RegistrySourceProvider
directly instead of the aggregate which is what we actually needed in the first place. This results in silencing the errors mentioned above and also resolves an issue where the deprecation info will not be added toSubscription
status when theCatalogSource
's namespace does not contain anOperatorGroup
.