Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement locRootPath #4909
Implement locRootPath #4909
Changes from all commits
c58a41b
b235147
8ab3914
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm not that familiar with URL parsing, so I have some questions that may help me understand the goals of this code:
ssh
you're adding show up in the output of localize?ssh
a placeholder just to avoidurl.Parse
errors, or are we intentionally adding thessh
because we expect by default schemes to bessh://
? If it's the first, I wonder if there is some other placeholder we can use that isn't actually a real scheme to make it extra clear.default
case? Seems like we would hit it for both empty schemes and for other schemes that we don't know about. For the latter (other schemes we don't know about), it seems weird to prependssh://
. Was that your intention?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.
url.Hostname
: https://github.com/kubernetes-sigs/kustomize/pull/4909/files/b235147079b094ea1dd8c4ebbb1863c2a2c7dfe6#diff-f52a1bf07c678854203647b33ccaa09d945af03c9233b3dec3a947ba27d531deR212url.Parse
errors. However, the correct scheme to add here is technicallyssh
. See my response to 3.git.NewRepoSpecFromURL
must have been called successfully. Given this, the only url that hits thedefault
case is the relative ssh case that begins withgit@
. Relative ssh urls have a different delimiter than full ssh urls (ones withssh://
header), but we remove this distinction here: https://github.com/kubernetes-sigs/kustomize/pull/4909/files/b235147079b094ea1dd8c4ebbb1863c2a2c7dfe6#diff-f52a1bf07c678854203647b33ccaa09d945af03c9233b3dec3a947ba27d531deR206. Thus, we can safely add thessh://
scheme header to urls under thedefault
case.