Skip to content

OCPBUGS-83598: Add missing generateIPAMLifecycle in ClusterUDN manifest#31018

Open
mkowalski wants to merge 1 commit intoopenshift:mainfrom
mkowalski:OCPBUGS-83598
Open

OCPBUGS-83598: Add missing generateIPAMLifecycle in ClusterUDN manifest#31018
mkowalski wants to merge 1 commit intoopenshift:mainfrom
mkowalski:OCPBUGS-83598

Conversation

@mkowalski
Copy link
Copy Markdown
Contributor

@mkowalski mkowalski commented Apr 16, 2026

Summary

  • Added missing generateIPAMLifecycle(params) call in generateClusterUserDefinedNetworkManifest, matching the existing pattern in generateUserDefinedNetworkManifest
  • Without this fix, ClusterUserDefinedNetwork manifests were generated without IPAM lifecycle configuration

Test plan

  • Verify ClusterUserDefinedNetwork manifests now include IPAM lifecycle configuration when specified
  • Verify existing UserDefinedNetwork manifest generation is unaffected
  • Run network segmentation e2e tests

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Cluster-level user-defined networks now correctly include IP address lifecycle configuration when persistent IPs are enabled, matching behavior of other network types and ensuring consistent manifest output.

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

@mkowalski: This pull request references Jira Issue OCPBUGS-83598, which is invalid:

  • expected the bug to target the "5.0.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:

Summary

  • Added missing generateIPAMLifecycle(params) call in generateClusterUserDefinedNetworkManifest, matching the existing pattern in generateUserDefinedNetworkManifest
  • Without this fix, ClusterUserDefinedNetwork manifests were generated without IPAM lifecycle configuration

Test plan

  • Verify ClusterUserDefinedNetwork manifests now include IPAM lifecycle configuration when specified
  • Verify existing UserDefinedNetwork manifest generation is unaffected
  • Run network segmentation e2e tests

🤖 Generated with Claude Code

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 Author

/payload-job periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

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

  • periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/78eb1530-39a7-11f1-9c7b-9526bc13e938-0

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

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: Pro Plus

Run ID: ea2c98c3-146a-499b-bae4-fca1addda77a

📥 Commits

Reviewing files that changed from the base of the PR and between 14f585b and 7fc5d5a.

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

Walkthrough

generateIPAMLifecycle was changed to accept a lifecycleIndent argument and produce an indented ipam.lifecycle: Persistent YAML block. Calls were added/updated so the UserDefinedNetwork and ClusterUserDefinedNetwork manifest generation include the lifecycle block when params.allowPersistentIPs is enabled.

Changes

Cohort / File(s) Summary
IPAM lifecycle & manifest updates
test/extended/networking/network_segmentation.go
generateIPAMLifecycle signature now accepts lifecycleIndent and returns the lifecycle YAML using that indentation. generateUserDefinedNetworkManifest now calls generateIPAMLifecycle(params, " "). generateClusterUserDefinedNetworkManifest now injects an ipam.lifecycle block via generateIPAMLifecycle(params, " ") (conditional on params.allowPersistentIPs).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a missing generateIPAMLifecycle call to the ClusterUDN manifest generation, which is the primary focus of the changeset.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test names in the modified file are stable and deterministic, using only static descriptive strings without dynamic content.
Test Structure And Quality ✅ Passed PR modifies only helper utility functions generating YAML manifests, not Ginkgo test code structures or patterns, making the custom check not applicable to these changes.
Microshift Test Compatibility ✅ Passed This PR modifies only internal helper functions that generate YAML manifests for existing tests. No new Ginkgo test declarations (It(), Describe(), Context(), When()) were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies only helper functions for YAML manifest generation; no new Ginkgo e2e tests (It/Describe/Context) are being added.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request modifies only test infrastructure code to add missing IPAM lifecycle configuration to ClusterUserDefinedNetwork manifests without introducing scheduling constraints or topology assumptions.
Ote Binary Stdout Contract ✅ Passed PR modifies utility functions for YAML manifest generation in Ginkgo test suite without direct stdout writes or process-level code violations.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The file network_segmentation.go does not contain new Ginkgo e2e test declarations (It, Describe, Context, When).

✏️ 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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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`:
- Line 1336: The generated YAML puts `ipam:` and `lifecycle:` at the same indent
because generateIPAMLifecycle(...) returns a string with hardcoded leading
spaces; update generateIPAMLifecycle to either accept an indent/prefix parameter
or to return an unindented block so the caller (the template concatenating ` +
generateIPAMLifecycle(params) + `) can indent it under the existing `ipam:`
line; ensure the final output nests `lifecycle:` under `ipam:` (i.e., `ipam:`
line followed by the properly indented lifecycle block) and adjust any callers
of generateIPAMLifecycle accordingly (the function name generateIPAMLifecycle is
the unique symbol to change).
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 68838cf7-6fd7-491f-80e5-00a9d33ab908

📥 Commits

Reviewing files that changed from the base of the PR and between 53cc9e6 and 14f585b.

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

Comment thread test/extended/networking/network_segmentation.go Outdated
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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

…efinedNetwork manifest

The generateClusterUserDefinedNetworkManifest function was missing the
generateIPAMLifecycle call, unlike its counterpart
generateUserDefinedNetworkManifest. This caused ClusterUserDefinedNetwork
manifests to be generated without IPAM lifecycle configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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

@mkowalski
Copy link
Copy Markdown
Contributor Author

/payload-job e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

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

  • e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/6eec3270-39d0-11f1-9cb3-bb972e4fa1f4-0

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 16, 2026

@mkowalski: The following test 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-vsphere-ovn-upi 7fc5d5a link true /test e2e-vsphere-ovn-upi

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/invalid-bug Indicates that a referenced Jira bug is invalid 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