Skip to content

OCPBUGS-84846: Fix NetworkNotReady pathological event regex case mismatch#31088

Open
tsorya wants to merge 1 commit intoopenshift:mainfrom
tsorya:fix-network-not-ready-regex
Open

OCPBUGS-84846: Fix NetworkNotReady pathological event regex case mismatch#31088
tsorya wants to merge 1 commit intoopenshift:mainfrom
tsorya:fix-network-not-ready-regex

Conversation

@tsorya
Copy link
Copy Markdown

@tsorya tsorya commented Apr 29, 2026

The NetworkNotReady allowlist regex used "No CNI configuration file" (capital N) but ocicni produces "no CNI configuration file" (lowercase n) probably it was changed one day. This case mismatch meant the allowlist never actually matched any event during upgrade jobs, causing intermittent test failures when the event count exceeded the threshold of 20.

Change the regex to match both cases with [Nn]o and add unit tests that verify both the lowercase (real ocicni error) and uppercase variants are correctly allowed.

Made-with: Cursor

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced error message pattern matching to handle case variations more robustly, improving detection reliability for network readiness conditions.
  • Tests

    • Added comprehensive test coverage to validate error detection functionality works correctly across different message capitalization formats.

The NetworkNotReady allowlist regex used "No CNI configuration file"
(capital N) but ocicni produces "no CNI configuration file" (lowercase
n). This case mismatch meant the allowlist never actually matched any
event during upgrade jobs, causing intermittent test failures when the
event count exceeded the threshold of 20.

Change the regex to match both cases with [Nn]o and add unit tests
that verify both the lowercase (real ocicni error) and uppercase
variants are correctly allowed.

Signed-off-by: Igal Tsoiref <itsoiref@redhat.com>
Made-with: Cursor
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci openshift-ci Bot requested review from p0lyn0mial and sjenning April 29, 2026 00:07
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Walkthrough

A regex pattern in a pathological event matcher is modified to support case-insensitive matching of "No" in a CNI configuration error message, with corresponding unit test fixtures added to validate both uppercase and lowercase variations.

Changes

Cohort / File(s) Summary
Event Pattern Matcher Updates
pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_event_patterns.go, pkg/monitortestlibrary/pathologicaleventlibrary/duplicated_events_test.go
Modified NetworkNotReady event matcher regex from No to [Nn]o to allow case variations in CNI configuration error messages. Added two new test fixtures validating that the matcher correctly handles both "No" and "no" casing in the human message segment.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
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 Test names are static descriptive strings; all dynamic values (pod names, node names, namespaces, IPs) are in test data structures, not test titles.
Test Structure And Quality ✅ Passed Pull request adds standard Go unit tests with table-driven patterns and meaningful assertions, demonstrating excellent quality without timeout or cluster interaction issues.
Microshift Test Compatibility ✅ Passed The pull request does not add any Ginkgo e2e tests; changes are limited to modifying a regex pattern and adding unit test fixtures.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds test data to an existing Go unit test using the testing package, not Ginkgo e2e tests. SNO compatibility check applies only to new Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only test/monitoring library code within pathologicaleventlibrary to fix a case-insensitive regex pattern. No deployment manifests, operator code, controllers, or scheduling constraints are present.
Ote Binary Stdout Contract ✅ Passed Changes modify regex pattern for event matching and add test fixtures only; no stdout writes introduced in process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This pull request does not add any Ginkgo e2e tests; it only modifies standard Go unit tests using the testing package.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: updating the NetworkNotReady pathological event regex to handle case variations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@tsorya
Copy link
Copy Markdown
Author

tsorya commented Apr 29, 2026

/test ?

@tsorya
Copy link
Copy Markdown
Author

tsorya commented Apr 29, 2026

/test e2e-aws-ovn-upgrade
/test e2e-azure-ovn-upgrade

@openshift-merge-bot openshift-merge-bot Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Apr 29, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

@tsorya: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-upgrade be4d8f1 link false /test e2e-aws-ovn-upgrade
ci/prow/e2e-azure-ovn-upgrade be4d8f1 link false /test e2e-azure-ovn-upgrade

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.

@mkowalski
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2026
@dgoodwin
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coderabbitai[bot], dgoodwin, mkowalski, tsorya

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2026
@mkowalski
Copy link
Copy Markdown
Contributor

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@mkowalski: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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.

@mkowalski
Copy link
Copy Markdown
Contributor

/retitle OCPBUGS-84666: Fix NetworkNotReady pathological event regex case mismatch

@openshift-ci openshift-ci Bot changed the title Fix NetworkNotReady pathological event regex case mismatch OCPBUGS-84666: Fix NetworkNotReady pathological event regex case mismatch Apr 30, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@tsorya: This pull request references Jira Issue OCPBUGS-84666, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The NetworkNotReady allowlist regex used "No CNI configuration file" (capital N) but ocicni produces "no CNI configuration file" (lowercase n) probably it was changed one day. This case mismatch meant the allowlist never actually matched any event during upgrade jobs, causing intermittent test failures when the event count exceeded the threshold of 20.

Change the regex to match both cases with [Nn]o and add unit tests that verify both the lowercase (real ocicni error) and uppercase variants are correctly allowed.

Made-with: Cursor

Summary by CodeRabbit

  • Bug Fixes

  • Enhanced error message pattern matching to handle case variations more robustly, improving detection reliability for network readiness conditions.

  • Tests

  • Added comprehensive test coverage to validate error detection functionality works correctly across different message capitalization formats.

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.

@mkowalski
Copy link
Copy Markdown
Contributor

/retitle OCPBUGS-84846: Fix NetworkNotReady pathological event regex case mismatch

@openshift-ci openshift-ci Bot changed the title OCPBUGS-84666: Fix NetworkNotReady pathological event regex case mismatch OCPBUGS-84846: Fix NetworkNotReady pathological event regex case mismatch Apr 30, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@tsorya: This pull request references Jira Issue OCPBUGS-84846, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The NetworkNotReady allowlist regex used "No CNI configuration file" (capital N) but ocicni produces "no CNI configuration file" (lowercase n) probably it was changed one day. This case mismatch meant the allowlist never actually matched any event during upgrade jobs, causing intermittent test failures when the event count exceeded the threshold of 20.

Change the regex to match both cases with [Nn]o and add unit tests that verify both the lowercase (real ocicni error) and uppercase variants are correctly allowed.

Made-with: Cursor

Summary by CodeRabbit

  • Bug Fixes

  • Enhanced error message pattern matching to handle case variations more robustly, improving detection reliability for network readiness conditions.

  • Tests

  • Added comprehensive test coverage to validate error detection functionality works correctly across different message capitalization formats.

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.

@mkowalski
Copy link
Copy Markdown
Contributor

/jira backport release-4.22

@mkowalski
Copy link
Copy Markdown
Contributor

/jira-backport release-4.22

@openshift-ci-robot
Copy link
Copy Markdown

@mkowalski: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22

Details

In response to this:

/jira backport release-4.22

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-cherrypick-robot
Copy link
Copy Markdown

@openshift-ci-robot: once the present PR merges, I will cherry-pick it on top of release-4.22 in a new PR and assign it to you.

Details

In response to this:

@mkowalski: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.22

In response to this:

/jira backport release-4.22

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.

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.

@mkowalski
Copy link
Copy Markdown
Contributor

/retest-required

@mkowalski
Copy link
Copy Markdown
Contributor

/refresh

@mkowalski
Copy link
Copy Markdown
Contributor

/retest-required

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants