Reject WatchList requests for Project resources - #673
Conversation
The Project Watch handler cannot properly serve the WatchList protocol (sendInitialEvents). When the WatchList feature gate is enabled, SetListOptionsDefaults auto-upgrades Watch requests with RV="" to set sendInitialEvents=true. Since ConvertNamespaceList does not propagate ResourceVersion, Project LIST always returns RV="", causing all Project watches to be upgraded. The Project watcher uses RV=="0" to decide whether to include all existing projects, not sendInitialEvents. When sendInitialEvents=true with RV="", zero ADDED events are sent followed by a bookmark claiming initial events are complete, making clients believe there are zero projects. Return MethodNotSupported when sendInitialEvents is set, which causes client-go's reflector to fall back to standard LIST+WATCH semantics.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesProject watch-list validation
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change rejects unsupported Project WatchList requests so clients can use standard LIST+WATCH behavior; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sanchezl: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Reject WatchList requests for Project resources because the Project watch handler does not support the sendInitialEvents protocol.
Summary by CodeRabbit
Bug Fixes
Tests