-
Notifications
You must be signed in to change notification settings - Fork 34
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
CNV-41205: Add checkboxes for each disk to delete #1963
Conversation
@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:
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. |
6a750da
to
d1ccc5f
Compare
@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:
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. |
@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:
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)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)) || []; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
src/views/virtualmachines/actions/components/DeleteVMModal/utils/helpers.ts
Outdated
Show resolved
Hide resolved
src/views/virtualmachines/actions/components/DeleteVMModal/components/DeleteVolumeCheckbox.tsx
Outdated
Show resolved
Hide resolved
src/views/virtualmachines/actions/components/DeleteVMModal/components/DeleteVolumeCheckbox.tsx
Outdated
Show resolved
Hide resolved
d1ccc5f
to
2897ce3
Compare
[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:
Approvers can indicate their approval by writing |
📝 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