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

CNV-41205: Add checkboxes for each disk to delete #1963

Merged

Conversation

upalatucci
Copy link
Member

@upalatucci upalatucci commented May 21, 2024

📝 Description

Show a checkbox list for each volume that we can delete.
This modal removes the VM owner reference to all volumes and removes the dataVolumes from the dataVolumeTemplates array from the VM.

Nit: fix the grace period question mark space

🎥 Demo

Screenshot from 2024-05-21 14-18-13

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented May 21, 2024

@upalatucci: This pull request references CNV-41205 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

📝 Description

Show a checkbox list for each volume that we can delete.
This modal removes the VM owner reference to all volumes and removes the dataVolumes from the dataVolumeTemplates array from the VM.

🎥 Demo

Screenshot from 2024-05-21 11-13-06

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.

@openshift-ci openshift-ci bot requested review from metalice and pcbailey May 21, 2024 11:22
@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label May 21, 2024
@upalatucci upalatucci force-pushed the delete-vm-modal-checkboxes branch 2 times, most recently from 6a750da to d1ccc5f Compare May 21, 2024 12:19
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented May 21, 2024

@upalatucci: This pull request references CNV-41205 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

📝 Description

Show a checkbox list for each volume that we can delete.
This modal removes the VM owner reference to all volumes and removes the dataVolumes from the dataVolumeTemplates array from the VM.

🎥 Demo

Screenshot from 2024-05-21 14-18-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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented May 21, 2024

@upalatucci: This pull request references CNV-41205 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

📝 Description

Show a checkbox list for each volume that we can delete.
This modal removes the VM owner reference to all volumes and removes the dataVolumes from the dataVolumeTemplates array from the VM.

Nit: fix the grace period question mark space

🎥 Demo

Screenshot from 2024-05-21 14-18-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 openshift-eng/jira-lifecycle-plugin repository.


await Promise.allSettled([...pvcPromises, ...dvPromises]);
}
await Promise.allSettled(updateVolumeResources(volumesToSave, vmOwnerRef));
Copy link
Member

Choose a reason for hiding this comment

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

i dont thinks allSettled is needed anymore. no array here

Copy link
Member Author

Choose a reason for hiding this comment

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

updateVolumeResources creates an array of promises

@@ -36,7 +41,7 @@ const DeleteOwnedResourcesMessage: FC<DeleteOwnedResourcesMessageProps> = ({
);
}

const pvcsWithNoDataVolumes = pvcs?.filter((pvc) => !findPVCOwner(pvc, dataVolumes));
const pvcsWithNoDataVolumes = pvcs?.filter((pvc) => !findPVCOwner(pvc, dataVolumes)) || [];
Copy link
Member

Choose a reason for hiding this comment

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

why filtering disk with datavolume? we have a GC for datavolumes once PVC is bound and ready, what happen if disks in error stage and we want to delete the VM and disks? the PVC still has DV and should be deleted as well

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just to show the right amount of disks. It would be confusing to show two disks with the same name one for the DV and another for the PVC.

The real logic behind the delete disks logic is to delete the VM owner reference for the resources that the user doesn't want to delete. THe other resources will be deleted because of owner reference deletion policy

@upalatucci upalatucci force-pushed the delete-vm-modal-checkboxes branch from d1ccc5f to 2897ce3 Compare May 22, 2024 16:09
@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label May 23, 2024
Copy link
Contributor

openshift-ci bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 [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-bot openshift-merge-bot bot merged commit 6b66c15 into kubevirt-ui:main May 23, 2024
10 checks passed
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 jira/valid-reference lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants