Skip to content

NO-JIRA: fix flaky test TestNodeTopologyCR_DeleteNode#124

Open
mdbooth wants to merge 1 commit into
openshift:mainfrom
mdbooth:unit-flakes-upstream-1153
Open

NO-JIRA: fix flaky test TestNodeTopologyCR_DeleteNode#124
mdbooth wants to merge 1 commit into
openshift:mainfrom
mdbooth:unit-flakes-upstream-1153

Conversation

@mdbooth

@mdbooth mdbooth commented Jul 2, 2026

Copy link
Copy Markdown

Backports an exiting upstream fix for a flake we're seeing frequently in unit runs.

Summary by CodeRabbit

  • Tests
    • Improved test reliability for node topology handling by waiting for reconciliation to finish before proceeding.
    • Added a check to ensure the expected default subnet is present before node add/delete scenarios run, reducing flaky test behavior.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mdbooth: This pull request explicitly references no jira issue.

Details

In response to this:

Backports an exiting upstream fix for a flake we're seeing frequently in unit runs.

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.

@openshift-ci
openshift-ci Bot requested review from damdo and theobarberbany July 2, 2026 16:05
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nrb for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3b6f345e-ccf1-438a-a9b3-124e9104cd42

📥 Commits

Reviewing files that changed from the base of the PR and between 1a542ec and c45b018.

📒 Files selected for processing (1)
  • pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go

Walkthrough

A test in the node IPAM allocator suite was updated to wait for the default node/topology reconciliation before proceeding, adding a poll-based check that the NodeTopology CR contains the default subnet prior to test node creation.

Changes

Test synchronization fix

Layer / File(s) Summary
Add wait for default subnet before node deletion test
pkg/controller/nodeipam/ipam/cloud_cidr_allocator_test.go
Adds a wait.PollImmediate block to TestNodeTopologyCR_DeleteNode that waits for verifySubnetsInCR to confirm subnet-def presence before adding the test node, to avoid a race condition.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the flaky TestNodeTopologyCR_DeleteNode test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR only adds synchronization logic; it introduces no Ginkgo titles or dynamic test names, and the existing test function name is static.
Test Structure And Quality ✅ Passed PASS: The test stays single-purpose, uses defer close(stopCh), and every poll has wait.ForeverTestTimeout with clear t.Fatalf messages.
Microshift Test Compatibility ✅ Passed PASS: This is a Go unit test, not a Ginkgo e2e test, and it uses only fake Kubernetes clients with no MicroShift-unsupported OpenShift APIs/features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This change only modifies a Go unit test; it contains no Ginkgo e2e test or cluster-topology assumptions that would affect SNO.
Topology-Aware Scheduling Compatibility ✅ Passed Only a unit test changed, adding a wait for NodeTopology sync; no manifests, controllers, or scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed Only a test file changed, and it contains no main/init/TestMain/suite-level stdout writes or stdout logging setup.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Changed test only waits on internal fake NodeTopology CR; no new Ginkgo/e2e test, IPv4 literals, or external network calls were added.
No-Weak-Crypto ✅ Passed The PR only adds a test wait/assertion flow; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear in the touched code.
Container-Privileges ✅ Passed The PR only updates a Go test, and the touched file contains no privileged/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation/securityContext settings.
No-Sensitive-Data-In-Logs ✅ Passed The diff only adds a wait/poll in a test; no new logging calls or sensitive data fields were introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@mdbooth

mdbooth commented Jul 2, 2026

Copy link
Copy Markdown
Author

/test e2e-gcp-ovn

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

@mdbooth: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants