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

Add constructor for pre-existing DynamicWatcher #111

Merged

Conversation

JustinKuli
Copy link
Contributor

This allows users that already have a DynamicWatcher and are using Query Batches to supply their instance to the template resolver. Most details of managing the watcher and the batch are delegated to the user: this package will not automatically stop the query batch after the template is resolved, for instance.

@JustinKuli
Copy link
Contributor Author

JustinKuli commented Apr 26, 2024

/hold

I believe this is ready for review, but I want to run and end-to-end kind of thing with it before it potentially merges.

@@ -269,6 +271,32 @@ func NewResolverWithCaching(
return resolver, channel, err
}

// NewResolverWithDynamicWatcher creates a new caching TemplateResolver instance, using the provided dependency-watcher.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please document that batch management is disabled?

This allows users that already have a DynamicWatcher and are using Query
Batches to supply their instance to the template resolver. Most details
of managing the watcher and the batch are delegated to the user: this
package will not automatically stop the query batch after the template
is resolved, for instance.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
@JustinKuli JustinKuli force-pushed the pre-existing-dynamic-client branch 2 times, most recently from f7526fe to ed92bd3 Compare April 26, 2024 16:33
Copy link

sonarcloud bot commented Apr 26, 2024

@JustinKuli
Copy link
Contributor Author

open-cluster-management-io/config-policy-controller#235 is an example use of this (also using another change to this package which I think would be a good separate PR).

Copy link

openshift-ci bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, mprahl

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JustinKuli
Copy link
Contributor Author

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit e954700 into stolostron:main Apr 26, 2024
7 checks passed
@JustinKuli JustinKuli deleted the pre-existing-dynamic-client branch April 26, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants