Skip to content

OCPBUGS-82046: Revert "remove some duplicate ovnk test cases" #30975

Open
arkadeepsen wants to merge 2 commits intoopenshift:mainfrom
arkadeepsen:revert-test-removal
Open

OCPBUGS-82046: Revert "remove some duplicate ovnk test cases" #30975
arkadeepsen wants to merge 2 commits intoopenshift:mainfrom
arkadeepsen:revert-test-removal

Conversation

@arkadeepsen
Copy link
Copy Markdown
Member

@arkadeepsen arkadeepsen commented Apr 7, 2026

This PR reverts #30820 (2692e1d) which removed UDN tests from origin repo. The reason the tests were removed was because the same tests will be run via OTE. However, since the OTE PR is still not merged, we are currently not running these tests at all.

Along with the revert the CNI version is also bumped to 1.1.0 so that the tests don’t fail.

@openshift-ci-robot
Copy link
Copy Markdown

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-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 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@arkadeepsen: This pull request references Jira Issue OCPBUGS-82046, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

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:

This PR reverts #30820 which removed UDN tests from origin repo. The reason the tests were removed was because the same tests will be run via OTE. However, since the OTE PR is still not merged, we are currently not running these tests at all.

Along with the revert the CNI version is also bumped to 1.1.0 so that the tests don’t fail.

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 kyrtapz and tssurya April 7, 2026 14:11
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Walkthrough

Adds new test cases validating NetworkAttachmentDefinition (NAD) object creation from UserDefinedNetwork (UDN) and ClusterUserDefinedNetwork (CUDN) objects, including helper functions for NAD manifest validation and updated imports.

Changes

Cohort / File(s) Summary
Network Segmentation Tests
test/extended/networking/network_segmentation.go
Added test cases for UDN and CUDN NAD validation, including owner reference checks, config JSON validation with legacy/updated format variants, and namespace selector mutation tests. Introduced helper functions assertNetAttachDefManifest() and assertClusterNADManifest() for manifest assertions. Updated imports to include k8s.io/apimachinery/pkg/types and k8s.io/utils/pointer.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arkadeepsen
Once this PR has been reviewed and has the lgtm label, please assign danwinship 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

@arkadeepsen
Copy link
Copy Markdown
Member Author

/jira refresh

@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 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@arkadeepsen: This pull request references Jira Issue OCPBUGS-82046, 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 (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/networking/network_segmentation.go`:
- Around line 1533-1540: The OwnerReference Name field is hardcoded to
"test-net" inside the ExpectWithOffset assertion; change it to use the udnName
parameter so the OwnerReference is constructed with Name: udnName (consistent
with the earlier usage of udnName and with assertClusterNADManifest). Locate the
ExpectWithOffset(1, nad.OwnerReferences) block and replace the literal
"test-net" with udnName, ensuring other fields (UID: types.UID(udnUID),
BlockOwnerDeletion, Controller, APIVersion, Kind) remain unchanged.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5640bb55-188a-4008-8825-d8a30202beb0

📥 Commits

Reviewing files that changed from the base of the PR and between c2c4593 and 3fc02a8.

📒 Files selected for processing (1)
  • test/extended/networking/network_segmentation.go

Comment on lines +1533 to +1540
ExpectWithOffset(1, nad.OwnerReferences).To(Equal([]metav1.OwnerReference{{
APIVersion: "k8s.ovn.org/v1",
Kind: "UserDefinedNetwork",
Name: "test-net",
UID: types.UID(udnUID),
BlockOwnerDeletion: pointer.Bool(true),
Controller: pointer.Bool(true),
}}))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Hardcoded "test-net" should use udnName parameter.

Line 1536 hardcodes Name: "test-net" in the OwnerReference, but the function accepts udnName as a parameter. This is inconsistent with:

  • Line 1531 which correctly uses udnName
  • assertClusterNADManifest (line 1615) which correctly uses Name: udnName

While currently the function is only called with testUdnName="test-net", this will silently break if reused with a different name.

🔧 Proposed fix
 	ExpectWithOffset(1, nad.OwnerReferences).To(Equal([]metav1.OwnerReference{{
 		APIVersion:         "k8s.ovn.org/v1",
 		Kind:               "UserDefinedNetwork",
-		Name:               "test-net",
+		Name:               udnName,
 		UID:                types.UID(udnUID),
 		BlockOwnerDeletion: pointer.Bool(true),
 		Controller:         pointer.Bool(true),
 	}}))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ExpectWithOffset(1, nad.OwnerReferences).To(Equal([]metav1.OwnerReference{{
APIVersion: "k8s.ovn.org/v1",
Kind: "UserDefinedNetwork",
Name: "test-net",
UID: types.UID(udnUID),
BlockOwnerDeletion: pointer.Bool(true),
Controller: pointer.Bool(true),
}}))
ExpectWithOffset(1, nad.OwnerReferences).To(Equal([]metav1.OwnerReference{{
APIVersion: "k8s.ovn.org/v1",
Kind: "UserDefinedNetwork",
Name: udnName,
UID: types.UID(udnUID),
BlockOwnerDeletion: pointer.Bool(true),
Controller: pointer.Bool(true),
}}))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/networking/network_segmentation.go` around lines 1533 - 1540,
The OwnerReference Name field is hardcoded to "test-net" inside the
ExpectWithOffset assertion; change it to use the udnName parameter so the
OwnerReference is constructed with Name: udnName (consistent with the earlier
usage of udnName and with assertClusterNADManifest). Locate the
ExpectWithOffset(1, nad.OwnerReferences) block and replace the literal
"test-net" with udnName, ensuring other fields (UID: types.UID(udnUID),
BlockOwnerDeletion, Controller, APIVersion, Kind) remain unchanged.

@arkadeepsen
Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 7, 2026

@arkadeepsen: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-aws-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/1fcd6cd0-328d-11f1-8977-164157712a22-0

@openshift-ci-robot
Copy link
Copy Markdown

@arkadeepsen: This pull request references Jira Issue OCPBUGS-82046, which is valid.

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

In response to this:

This PR reverts #30820 (2692e1d) which removed UDN tests from origin repo. The reason the tests were removed was because the same tests will be run via OTE. However, since the OTE PR is still not merged, we are currently not running these tests at all.

Along with the revert the CNI version is also bumped to 1.1.0 so that the tests don’t fail.

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

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@arkadeepsen
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@arkadeepsen
Copy link
Copy Markdown
Member Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

@arkadeepsen: 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.

@openshift-trt
Copy link
Copy Markdown

openshift-trt bot commented Apr 8, 2026

Job Failure Risk Analysis for sha: 3fc02a8

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-gcp-ovn Low
[Jira:Node][sig-node] Node non-cnv swap configuration should reject user override of swap settings via KubeletConfig API [OCP-86395] [Suite:openshift/conformance/parallel]
This test has passed 0.00% of 21 runs on release 5.0 [Architecture:amd64 FeatureSet:default Installer:ipi JobTier:standard Network:ovn NetworkStack:ipv4 OS:rhcos9 Owner:eng Platform:gcp Procedure:none SecurityMode:default Topology:ha Upgrade:major] in the last week.
pull-ci-openshift-origin-main-e2e-vsphere-ovn-upi Low
[Jira:Node][sig-node] Node non-cnv swap configuration should reject user override of swap settings via KubeletConfig API [OCP-86395] [Suite:openshift/conformance/parallel]
This test has passed 19.64% of 448 runs on release 5.0 [Overall] in the last week.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants