Repository navigation
start: exit with usage error on unparsable --registry-mirror URL - #23986
Sahil-coder-30 wants to merge 2 commits into
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Sahil-coder-30 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Sahil-coder-30! |
|
Hi @Sahil-coder-30. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
Can one of the admins verify this patch? |
3087aa5 to
340d51d
Compare
340d51d to
228bc14
Compare
|
@nirs updated the PR based on your review, PTAL |
|
@Sahil-coder-30 Looks good now. To complete please squash the commit to single commit. The easiest way to update the translations and docs is to revent the translations changes, commit your fix, and run |
validateRegistryMirror logged the url.Parse error and kept going. url.Parse returns a nil *URL on error, so the next line dereferenced nil and minikube start panicked on a value like 'http://[::1'. Make validateRegistryMirror take the mirror list and return an error, including when the URL can't be parsed. validateFlags exits with reason.Usage, the same way it handles validateRuntime, validateGPUs and the other validators. Add a table test covering valid mirrors, a bad scheme, a path and an unparsable URL. Signed-off-by: Sahil <sahilsharma3043@gmail.com>
Generated with make generate-docs. Signed-off-by: Sahil <sahilsharma3043@gmail.com>
d551105 to
17b6020
Compare
|
@nirs Squashed the fix into one commit and put the make generate-docs output in a separate commit, rebased on current master. Thanks for the review! |
|
@nirs gentle ping, the commits are squashed as you suggested. Could you take another look when you get a chance? Thanks! |
fixes #23985
If
url.Parsefails invalidateRegistryMirror, we only log the error and then readURL.Schemeon a nil pointer, sominikube startpanics.validateRegistryMirrornow takes the mirror list and returns the bad url as an error (still logging theurl.Parseerror), andvalidateFlagsexits withreason.Usage. The user message stays invalidateFlagsso it is still translated. Added a test for valid and invalid mirrors, and ranmake generate-docsfor the translation changes.before:
after: