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
virtctl: Allow size to be optional when creating VMs #11144
virtctl: Allow size to be optional when creating VMs #11144
Conversation
92285a4
to
f35edd7
Compare
@0xFelix a super nit, if you can split the ErrorNotFound type in a separate commit |
The code looks good to me! Thanks for the work |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alicefr 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 |
This allows to test whether this error occured. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Allow to omit size when creating a VM and using --volume-import to clone a PVC or a VolumeSnapshot. Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
f35edd7
to
cee2b54
Compare
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.
Thanks @0xFelix!
One super nit that you can ignore.
Feel free to unhold
/hold
var volumeImportSizeOptional = map[string]bool{ | ||
pvc: true, | ||
snapshot: true, | ||
} |
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.
nit: I'd prefer
var volumeImportSizeOptional = map[string]bool{ | |
pvc: true, | |
snapshot: true, | |
} | |
var volumeImportSizeMandatory = map[string]bool{ | |
pvc: false, | |
snapshot: false, | |
} |
and save a not operation below.
But maybe it is my brain that starts burning when it see more than one negation :)
Required labels detected, running phase 2 presubmits: |
/hold cancel Discussed this offline, will keep as is. |
/retest |
What this PR does
Allow to omit size when creating a VM and using --volume-import to clone a PVC or a VolumeSnapshot.
Before this PR:
Specifying size when creating a VM and using --volume-import to clone a PVC or a VolumeSnapshot was always required.
After this PR:
Specifying size when creating a VM and using --volume-import to clone a PVC or a VolumeSnapshot is optional now.
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note