Skip to content

fix(e2e): set maxUnavailable to 2 to preserve parallel test coverage#1466

Open
qinqon wants to merge 1 commit intonmstate:mainfrom
qinqon:e2e-max-unavailable
Open

fix(e2e): set maxUnavailable to 2 to preserve parallel test coverage#1466
qinqon wants to merge 1 commit intonmstate:mainfrom
qinqon:e2e-max-unavailable

Conversation

@qinqon
Copy link
Member

@qinqon qinqon commented Mar 24, 2026

/kind enhancement

What this PR does / why we need it:

Sets NMSTATE_MAX_UNAVAILABLE=2 in the e2e handler CI script to preserve parallel processing test coverage after the node reduction in #1464.

With 3 workers and the default maxUnavailable of 50%, only 1 node can progress at a time (floor(3 * 0.5) = 1). This means the should be progressing on multiple nodes test no longer validates that multiple nodes process in parallel — it effectively tests serial execution.

Setting maxUnavailable=2 ensures 2 out of 3 workers progress simultaneously while 1 is aborted, keeping meaningful coverage of the maxUnavailable capping and abort logic.

Special notes for your reviewer:

The NMSTATE_MAX_UNAVAILABLE env var is already supported by the test framework (test/e2e/handler/utils.go:60) and feeds into every NNCP's maxUnavailable field. No test code changes needed.

Release note:

NONE

@kubevirt-bot kubevirt-bot added kind/enhancement release-note-none Denotes a PR that doesn't merit a release note. labels Mar 24, 2026
@kubevirt-bot
Copy link
Collaborator

[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 qinqon 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

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Mar 24, 2026
@kubevirt-bot kubevirt-bot requested review from emy and mkowalski March 24, 2026 08:29
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the end-to-end testing environment to maintain the integrity of parallel execution tests and enhance debugging capabilities. It adjusts a critical environment variable to ensure that tests designed to validate concurrent operations continue to provide accurate coverage, while also improving log persistence for better troubleshooting during cluster setup.

Highlights

  • E2E Test Configuration: Set NMSTATE_MAX_UNAVAILABLE=2 in the e2e handler CI script to preserve parallel processing test coverage, which was affected by a recent node reduction. This ensures that tests validating multiple node progression continue to function as intended.
  • Cluster Setup Improvement: Enabled persistent journal logging on cluster nodes during setup to ensure logs survive node reboots, aiding in debugging and troubleshooting.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces changes to enhance the e2e testing environment. The automation/check-patch.e2e-k8s.sh script now explicitly sets NMSTATE_MAX_UNAVAILABLE. The review suggests deriving this value programmatically from KUBEVIRT_NUM_NODES to improve robustness and consistency, adhering to repository coding style guidelines. The cluster/up.sh script has been updated to enable persistent journal logs, improving debugging capabilities by ensuring logs survive node reboots.

After reducing the cluster to 4 nodes (1 control-plane + 3 workers)
in nmstate#1464, the default maxUnavailable of 50% results in only 1 node
(floor(3 * 0.5) = 1), which means the "should be progressing on
multiple nodes" test no longer validates parallel processing.

Set NMSTATE_MAX_UNAVAILABLE=2 so that 2 out of 3 workers can progress
in parallel and 1 is aborted, preserving meaningful coverage of the
maxUnavailable logic.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qinqon qinqon force-pushed the e2e-max-unavailable branch from 7aa96fc to ad784fd Compare March 24, 2026 08:35
@emy
Copy link
Collaborator

emy commented Mar 24, 2026

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2026
@kubevirt-bot
Copy link
Collaborator

@qinqon: 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
pull-kubernetes-nmstate-e2e-handler-k8s ad784fd link true /test pull-kubernetes-nmstate-e2e-handler-k8s
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

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/enhancement lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants