Skip to content

Add support for allowWatchBookmarks to the dynamic client #2317

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

Merged

Conversation

anvilpete
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • There's currently no way to pass allow_watch_bookmark to the dynamic client's watch method. This PR adds this parameter.

  • the allowWatchBookmarks query parameter is currently never set. This PR sets it based on the allow_watch_bookmarks keyword arg.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Added support for allowWatchBookmarks to the dynamic client

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 8, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 8, 2025
@anvilpete
Copy link
Contributor Author

There's some evidence in the commit/issue/PR history that people have been managing to enable watch bookmarks. But I'm not sure how this is possible without setting the allowWatchBookmarks query parameter.

But in any case, this PR makes it possible.

@yliaog
Copy link
Contributor

yliaog commented Jan 8, 2025

/assign @fabianvf

@anvilpete
Copy link
Contributor Author

@fabianvf any comments on this? It's a pretty trivial addition, and I can't see how bookmarks could work without it.

@anvilpete
Copy link
Contributor Author

@fabianvf, @yliaog is there any reason we can't merge this? The check failures seem unrelated to my changes.

@yliaog
Copy link
Contributor

yliaog commented Apr 23, 2025

do you mind to add an example on how it is used?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 24, 2025
@anvilpete
Copy link
Contributor Author

The allow_watch_bookmarks parameter doesn't really affect the client behaviour, apart from allowing the server to send a BOOKMARK event. But I've added an example of using resource_version to recover from connection issues.

Is this what you had in mind?

@yliaog
Copy link
Contributor

yliaog commented Apr 24, 2025

thanks for the PR

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anvilpete, yliaog

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit d010f2e into kubernetes-client:master Apr 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants