Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: Change deprecated vm Running API #453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RamLavi
Copy link
Member

@RamLavi RamLavi commented Jan 14, 2025

What this PR does / why we need it:
This PR fixed e2e infra that uses old kubevirt VM Running API.

Special notes for your reviewer:

Release note:

NONE

@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 ask for approval from ramlavi. For more information see the Kubernetes Code Review Process.

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

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

@orelmisan orelmisan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @RamLavi.

vm1, err = testClient.VirtClient.VirtualMachine(vm1.Namespace).Create(context.TODO(), vm1)
Expect(err).ToNot(HaveOccurred())
Expect(err).ToNot(HaveOccurred(), "1")

Choose a reason for hiding this comment

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

What is the meaning of "1"?
Is it a leftover?

Copy link
Member Author

Choose a reason for hiding this comment

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

leftover :) thanks!

conflictingVM, err = testClient.VirtClient.VirtualMachine(conflictingVM.Namespace).Create(context.TODO(), conflictingVM)
Expect(err).ToNot(HaveOccurred())
Expect(err).ToNot(HaveOccurred(), "2")

Choose a reason for hiding this comment

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

Same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed

tests/tests.go Outdated
@@ -91,11 +91,11 @@ func removeTestNamespaces() {
Should(BeTrue(), "Namespace %s haven't been deleted within the given timeout", TestNamespace)
}

func CreateVmObject(namespace string, running bool, interfaces []kubevirtv1.Interface, networks []kubevirtv1.Network) *kubevirtv1.VirtualMachine {
func CreateVmObject(namespace string, strategy kubevirtv1.VirtualMachineRunStrategy, interfaces []kubevirtv1.Interface, networks []kubevirtv1.Network) *kubevirtv1.VirtualMachine {

Choose a reason for hiding this comment

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

I haven't noticed a call to this function with a strategy value different from RunStrategyHalted.
Please consider dropping the parameter.

Copy link
Member Author

Choose a reason for hiding this comment

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

DONE

@kubevirt-bot
Copy link
Collaborator

@orelmisan: changing LGTM is restricted to collaborators

In response to this:

Thank you for the PR @RamLavi.

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.

Moreover, the parameter is always the same to pin it on CreateVmObject
itself.

Signed-off-by: Ram Lavi <[email protected]>
@RamLavi RamLavi force-pushed the running_to_run_strategy1 branch from 5e724b8 to 64fd6c3 Compare January 14, 2025 10:41
@RamLavi
Copy link
Member Author

RamLavi commented Jan 14, 2025

Change: Address @orelmisan 's review

@orelmisan
Copy link

@RamLavi it seems like unrelated changes had leaked into the PR.

@kubevirt-bot
Copy link
Collaborator

@RamLavi: 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-kubemacpool-e2e-k8s 64fd6c3 link true /test pull-kubemacpool-e2e-k8s

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants