OCPBUGS-109657: Assert errors in TestGetPrimaryPoolForNode - #6482
openshift-merge-bot[bot] merged 1 commit into
Conversation
Cases with err: true could pass when getPrimaryPoolForNode returned (nil, nil). Assert the error path and fix the duplicate-selector fixture so the node matches both custom pools. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@amogh27-web: This pull request references Jira Issue OCPBUGS-109657, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe node primary pool test now applies the correct master label format and validates both expected error and no-error outcomes. ChangesNode primary pool test
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized test-only change strengthens coverage for ambiguous pool errors without changing production behavior; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
Full details: Stable And Deterministic Test NamesExplanation No failure condition is introduced. The PR changes Full details: Test Structure And QualityExplanation The PR introduces Resolution Add contextual messages to both new assertions, for example: Full details: Microshift Test CompatibilityExplanation PASS: The pull request changes only the Go unit test Full details: Single Node Openshift (Sno) Test CompatibilityExplanation PASS: The pull request changes an existing Go unit test, Full details: Topology-Aware Scheduling CompatibilityExplanation PASS: The PR changes only Full details: Ote Binary Stdout ContractExplanation PASS. The pull request changes only Full details: Ipv6 And Disconnected Network Test CompatibilityExplanation PASS: The pull request changes only Full details: No-Weak-CryptoExplanation The pull request changes only Full details: Container-PrivilegesExplanation PASS. The pull request changes only Full details: No-Sensitive-Data-In-LogsExplanation The PR changes only
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Hi @amogh27-web. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
@amogh27-web: This pull request references Jira Issue OCPBUGS-109657, which is valid. 3 validation(s) were run on this bug
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. |
|
/ok-to-test |
|
/lgtm |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amogh27-web, isabella-janssen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
1 similar comment
|
/retest-required |
|
/verified by CI Since this is a test fix, there is not further verification needed. |
|
@isabella-janssen: This PR has been marked as verified by 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. |
|
/retest-required |
|
@amogh27-web: The following test 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. |
25c2546
into
openshift:main
|
@amogh27-web: Jira Issue Verification Checks: Jira Issue OCPBUGS-109657 Jira Issue OCPBUGS-109657 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
|
Fix included in release 5.1.0-0.nightly-2026-09-04-193828 |
Fixes: https://redhat.atlassian.net/browse/OCPBUGS-109657
- What I did
TestGetPrimaryPoolForNodeonly failed on unexpected errors. Cases witherr: truecould still pass whengetPrimaryPoolForNodereturned(nil, nil), so they did not protect the ambiguous-pool error path.The test loop now asserts an error when
test.erris true and no error otherwise. The duplicate-selector fixture usednode-role: master, which does not matchnode-role/master, so it never hit that error path. The node labels now match the shared selector so both custom pools apply.- How to verify it
- Description for the changelog
Assert errors in TestGetPrimaryPoolForNode so ambiguous-pool cases cannot pass on a nil error.
Made with Cursor
Summary by CodeRabbit