-
Notifications
You must be signed in to change notification settings - Fork 243
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
Validation: Don't fail if the bundle path is same as default path #3826
Conversation
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.
Overall looks good, a few questions though.
/retest |
87ea34a
to
b541736
Compare
@praveenkumar: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
ValidateBundle function try to get the bundle info if the bundle is already extracted or run ValidateBundlePath which in case check if the bundle exist for provided path and for default bundle it give error in case not persent in the default location. Ideally ValidateBundle should just return nil in case default bundle path is provided. With this change, same function can consme as part of `cmd/setup` which right now have addition logic to ignore default bundle path.
In previous commit 5fbcac2 , ValidateBundle now handle the default bundlepath also so we shouldn't have a different logic here.
This logic we have in `fixBundleExtract` function is kind of unnecessary because ValidationBundle already part of setup,start and config set command so having same logic doesn't make sense.
invalidPath type only used in the validation so no point to make it public.
With this PR now end user will observe more meaningful message to run `crc setup` in case want to use the default bundle. ``` $ ./crc config set bundle /foo/bar Value '/foo/bar' for configuration property 'bundle' is invalid, reason: /foo/bar is invalid or missing, run 'crc setup' to download the default bundle $ ./crc start -b /foo/bar /foo/bar is invalid or missing, run 'crc setup' to download the default bundle ```
b541736
to
5aa9365
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau 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 |
ValidateBundle function try to get the bundle info if the bundle is
already extracted or run ValidateBundlePath which in case check if the
bundle exist for provided path and for default bundle it give error in
case not persent in the default location. Ideally ValidateBundle should
just return nil in case default bundle path is provided.
With this change, same function can consme as part of
cmd/setup
whichright now have addition logic to ignore default bundle path.