-
Notifications
You must be signed in to change notification settings - Fork 545
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
Reduce resolver dependencies on operator-registry and operator-lifecycle-manager. #2337
Reduce resolver dependencies on operator-registry and operator-lifecycle-manager. #2337
Conversation
Signed-off-by: Ben Luddy <bluddy@redhat.com>
Skipping CI for Draft Pull Request. |
486f2d7
to
2f6b3f2
Compare
The most significant change is the introduction of a new Source interface, which represents a single source of cache entries. In the existing implementation, the cache was hardcoded to fetch content from the operator-registry gRPC API on misses. This was a barrier to off-cluster tools and other applications that should be able to perform resolution without running a registry server. A number of test fixtures were affected (for the better) because it's now possible to directly configure the real Cache implementation to retrieve test content without using of test doubles. Signed-off-by: Ben Luddy <bluddy@redhat.com>
2f6b3f2
to
be57abb
Compare
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.
One tiny nit but it doesn't really matter.
/lgtm
s.snapshots[i], s.snapshots[j] = s.snapshots[j], s.snapshots[i] | ||
} | ||
|
||
func (s *CatalogSnapshot) Find(p ...OperatorPredicate) []*Operator { | ||
func (s *snapshotHeader) Find(p ...OperatorPredicate) []*Operator { |
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.
Nit: Can we move all of types to the head of the file? It is difficult to review and understand the code when you use a type at the top of the file and the type itself is declared somewhere at the bottom of the file.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: benluddy, dinhxuanvu 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 |
This is a continuation of the ongoing work to allow the runtime dependency resolution features of catalog-operator to be reusable outside of OLM.