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

Bug 2182938: clone revisions alongside vm #1224

Merged

Conversation

upalatucci
Copy link
Member

@upalatucci upalatucci commented Mar 30, 2023

📝 Description

Clone ControllerRevision for instancetype and preference in the new namespace as suggested by @lyarwood

The flow
(Only In case of cloning vm created through instance type)

  • if in the destination namespace there is no ControllerRevision with the same name, we'll create it. (for instance type and prefernece)

  • clone the vm

  • in case the controller revision was not created, the cloned vm will be added as owner. In case the controlelr revision was created, does not have owner and we'll add the cloned vm as only owner

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 30, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is invalid:

  • expected the bug to target the "4.14.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2182938: remove revisionName for cloning vms with instancetype

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/test-infra repository.

@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Mar 30, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 30, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is invalid:

  • expected the bug to target the "4.14.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2182938: remove revisionName for cloning vms with instancetype

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/test-infra repository.

@upalatucci upalatucci force-pushed the clone-vm-instancetype branch 2 times, most recently from 510ff06 to 0a51d16 Compare March 30, 2023 12:36
@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Mar 30, 2023
@avivtur
Copy link
Member

avivtur commented Mar 30, 2023

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 30, 2023

@avivtur: This pull request references Bugzilla bug 2182938, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

/bugzilla 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 kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested a review from gouyang March 30, 2023 12:38
Copy link

@lyarwood lyarwood left a comment

Choose a reason for hiding this comment

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

This will pull down the latest revision of the instance type or preference and stash that in a fresh controller revision. This could easily cause the VirtualMachine to change as a result so I'd highly recommend cloning the referenced controller revisions into the new namespace instead.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 30, 2023

@lyarwood: changing LGTM is restricted to collaborators

In response to this:

This will pull down the latest revision of the instance type or preference and stash that in a fresh controller revision. This could easily cause the VirtualMachine to change as a result so I'd highly recommend cloning the referenced controller revisions into the new namespace instead.

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/test-infra repository.

@avivtur
Copy link
Member

avivtur commented Mar 30, 2023

/hold as per Lee's comment

@lyarwood
Copy link

This will pull down the latest revision of the instance type or preference and stash that in a fresh controller revision. This could easily cause the VirtualMachine to change as a result so I'd highly recommend cloning the referenced controller revisions into the new namespace instead.

I should add that the OwnerReference will need to be updated to point to the new VirtualMachine in the new namespace.

@openshift-ci openshift-ci bot removed the lgtm Passed code review, ready for merge label Apr 11, 2023
@upalatucci
Copy link
Member Author

/unhold

@upalatucci upalatucci changed the title Bug 2182938: remove revisionName for cloning vms with instancetype Bug 2182938: clone revisions alongside vm Apr 11, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is valid.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is valid.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is valid.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

2 similar comments
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is valid.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 11, 2023

@upalatucci: This pull request references Bugzilla bug 2182938, which is valid.

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

Requesting review from QA contact:
/cc @gouyang

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

});
} catch (error) {
if (error.code !== 404) {
throw error;
Copy link
Member

Choose a reason for hiding this comment

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

You are throwing exceptions but not handling them on the other files when you use it...
I would have handled it here and reduced the possibility someone won't add a try-catch block or concating a .catch

Copy link
Member Author

Choose a reason for hiding this comment

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

The error would be caught by TabModal and it would display the error with the nice UI.

Copy link
Member

Choose a reason for hiding this comment

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

Then why limit the error only to not found? why add a try a catch at all if tabmodal handles it?

Copy link
Member Author

Choose a reason for hiding this comment

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

here I'm trying to fetch a ControllerVersion in another namespace using the referenceName.
I'll create it only if it's not there.

The fact that k8sGet throws a 404 error, its not actually an error. It just means that does not exist in that namespace.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably in the next version, the backend will handle cloning in different namespaces and we'll remove all the logic. But for now we need that

Copy link
Member

Choose a reason for hiding this comment

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

im sorry, but it isn't making sense to me. Please clarify in slack, thank you :)

@metalice
Copy link
Member

metalice commented May 2, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label May 2, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avivtur, metalice, upalatucci

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [avivtur,metalice,upalatucci]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 95e61c5 into kubevirt-ui:main May 2, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

@upalatucci: All pull requests linked via external trackers have merged:

Bugzilla bug 2182938 has been moved to the MODIFIED state.

In response to this:

Bug 2182938: clone revisions alongside vm

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/test-infra repository.

@gouyang
Copy link
Member

gouyang commented May 10, 2023

/cherry-pick release-4.13

@openshift-cherrypick-robot
Copy link
Collaborator

@gouyang: new pull request created: #1294

In response to this:

/cherry-pick release-4.13

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/test-infra repository.

@upalatucci
Copy link
Member Author

/cherry-pick release-4.13

@openshift-cherrypick-robot
Copy link
Collaborator

@upalatucci: new pull request could not be created: failed to create pull request against kubevirt-ui/kubevirt-plugin#release-4.13 from head openshift-cherrypick-robot:cherry-pick-1224-to-release-4.13: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for openshift-cherrypick-robot:cherry-pick-1224-to-release-4.13."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-4.13

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue is something we want to fix bugzilla/severity-medium bugzilla/valid-bug lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants