Skip to content

Comments

e2e: Consolidate opt-in/opt-out handling to prevent flakes#576

Merged
kubevirt-bot merged 1 commit intok8snetworkplumbingwg:mainfrom
RamLavi:fix_opt_in_out_flake
Nov 11, 2025
Merged

e2e: Consolidate opt-in/opt-out handling to prevent flakes#576
kubevirt-bot merged 1 commit intok8snetworkplumbingwg:mainfrom
RamLavi:fix_opt_in_out_flake

Conversation

@RamLavi
Copy link
Member

@RamLavi RamLavi commented Nov 10, 2025

What this PR does / why we need it:
tests sometimes fail when switching from opt-in to opt-out because it takes time for the k8s API to eventually consist the new labels behavior.
In some places there is an ugly sleep wait.
Instead, add optInNamespaceForVMs() and optOutNamespaceForVMs() wrappers that perform the opt-mode change, wait for webhook configuration propagation using Eventually().
Replace sleep() calls throughout tests.

Special notes for your reviewer:

Release note:

NONE

tests sometimes fail when switching from opt-in to opt-out because it
takes time for the k8s API to eventually consist the new labels
behavior.
In some places there is a sleep wait.
Instead, add optInNamespaceForVMs() and optOutNamespaceForVMs() wrappers
that perform the opt-mode change, wait for webhook configuration
propagation using Eventually().
Replace sleep() calls throughout tests.

Signed-off-by: Ram Lavi <ralavi@redhat.com>
Copy link
Member

@qinqon qinqon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

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

@kubevirt-bot kubevirt-bot merged commit d6411fd into k8snetworkplumbingwg:main Nov 11, 2025
5 checks passed
@RamLavi
Copy link
Member Author

RamLavi commented Nov 11, 2025

/cherry-pick release-0.49
/cherry-pick release-0.47

@kubevirt-bot
Copy link
Collaborator

@RamLavi: #576 failed to apply on top of branch "release-0.47":

Applying: Consolidate opt-in/opt-out handling to prevent flakes
Using index info to reconstruct a base tree...
M	tests/tests.go
M	tests/virtual_machines_test.go
Falling back to patching base and 3-way merge...
Auto-merging tests/virtual_machines_test.go
CONFLICT (content): Merge conflict in tests/virtual_machines_test.go
Auto-merging tests/tests.go
CONFLICT (content): Merge conflict in tests/tests.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Consolidate opt-in/opt-out handling to prevent flakes

Details

In response to this:

/cherry-pick release-0.49
/cherry-pick release-0.47

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.

@RamLavi
Copy link
Member Author

RamLavi commented Nov 11, 2025

/cherry-pick release-0.49

@kubevirt-bot
Copy link
Collaborator

@RamLavi: #576 failed to apply on top of branch "release-0.49":

Applying: Consolidate opt-in/opt-out handling to prevent flakes
Using index info to reconstruct a base tree...
M	tests/tests.go
M	tests/virtual_machines_test.go
Falling back to patching base and 3-way merge...
Auto-merging tests/virtual_machines_test.go
CONFLICT (content): Merge conflict in tests/virtual_machines_test.go
Auto-merging tests/tests.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Consolidate opt-in/opt-out handling to prevent flakes

Details

In response to this:

/cherry-pick release-0.49

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants