OCPBUGS-78480: handle bookmark events in project watch tests#31095
OCPBUGS-78480: handle bookmark events in project watch tests#31095ricardomaraschini wants to merge 1 commit intoopenshift:mainfrom
Conversation
The Kubernetes apiserver watch implementation sends bookmark events to signal completion of the initial list when SendInitialEvents=true (KEP-3157). This change updates tests to handle these bookmark events in preparation for enabling watch-list support for the project resource type.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@ricardomaraschini: This pull request references Jira Issue OCPBUGS-78480, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughChanges to the watch-event handling in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/extended/project/project.go`:
- Around line 144-154: The loop reads from fromNowWatch.ResultChan() without
checking the channel close, which can panic when event is nil; update the select
case that receives "event := <-fromNowWatch.ResultChan()" to use the comma-ok
form (event, ok := <-fromNowWatch.ResultChan()), treat ok==false as a closed
watch and break/return (or continue as appropriate), and only access event.Type
and event.Object when ok is true (preserving the existing watch.Bookmark check
and g.Fail call otherwise).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 43553b6e-60d0-4644-a283-f54560dc7bb4
📒 Files selected for processing (1)
test/extended/project/project.go
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: coderabbitai[bot], ricardomaraschini 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 |
|
@ricardomaraschini: The following tests failed, say
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. |
The Kubernetes apiserver watch implementation sends bookmark events to signal completion of the initial list when SendInitialEvents=true (KEP-3157). This change updates tests to handle these bookmark events in preparation for enabling watch-list support for the project resource type.
Summary by CodeRabbit