-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
FIX: Update watch resource_version on BOOKMARK events. #1796
Conversation
|
Welcome @snjypl! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: snjypl The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9bf511b
to
f379bba
Compare
since the resoureVersion is the only thing that matters in an BOOKMARK event. when we treat it as a ERROR, we skip updating the watcher.resource_version to the one in bookmark event, which defeats the purpose of having the BOOKMARK feature. and as far as de-serializing the bookmark event is concerned, the client should be fine with a dict object. the client is expected to check the event['TYPE'] and deal with the bookmark event as a dict |
The current behaviour when |
no, it won't. it is the expected behavior. |
/assign @ecerulm |
It looks like you've been commenting on this PR already. Would you mind doing a first round of review? @ecerulm |
@roycaihw I'm not familiar with the setup of this project and how contributions are made, this PR is based on master which seems 23.0.1 , but the latest release is 23.3.0 (tag v23.3.0) , are PR supposed to be based on the master, on the tag v23.3.0 or on the tag 23.6.0? |
If I understand right , before with `allow_watch_bookmarks=True' you could have a loop like this
after the introduction of this PR the following will raise an That can potentially break the code of people already using I'm not sure about the rules about backwards compatibility that this projects follows, it may be ok. I think somebody else should review this, @roycaihw , I'm not that familiar with the code base. |
1 similar comment
If I understand right , before with `allow_watch_bookmarks=True' you could have a loop like this
after the introduction of this PR the following will raise an That can potentially break the code of people already using I'm not sure about the rules about backwards compatibility that this projects follows, it may be ok. I think somebody else should review this, @roycaihw , I'm not that familiar with the code base. |
No, even with the latest release you will get the same error. even now bookmark event is returned as dict. this PR does not change that. so it is not backward incompatible. |
if the user has opted for the bookmark feature by passing Note: this is the existing behavior. this PR does not change it.
|
@roycaihw ping ! :D |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The BOOKMARK feature was not getting used properly.
it is expected that on the BOOKMARK event, the watch should update it's resource_version to the one in the BOOKMARK event.
Currently the BOOKMARK event was considered same as ERROR, because of which the watch resource_version was not updated.
we are now decoding BOOKMARK event as a object/dict, and also updating the watch.resource_version
/kind bug
Fixes #1729
Related:
#23578
#21087