Skip to content
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

When copying assets from .minikube/files on windows, directories get squashed during transfer. ie /etc/ssl/certs/test.pem becomes ~minikube/etcsslcerts/test.pem. This pull request ensures any window style directories are converted into unix style. #3258

Merged
merged 2 commits into from
Feb 8, 2019

Conversation

darkedges
Copy link

review #2768 by converting \ in directory string to / and using path.Join instead of filepath.Join which uses Unix format instead of using he current OS directory delimeter.

May not be BP but it works for me.

kubernetes#2768
for Windows, by converting \ in directory string to / and using
`path.Join` instead of `filepath.Join` which uses Unix format
instead of using he current OS directory delimeter.
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 16, 2018
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: darkedges
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: balopat

If they are not already assigned, you can assign the PR to them by writing /assign @balopat in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 16, 2018
@darkedges
Copy link
Author

darkedges commented Oct 16, 2018

I have now signed the agreement.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 16, 2018
@tstromberg
Copy link
Contributor

Can you name the PR in such a way that specifically describes what this PR is doing? I'm not sure what
squashed means in this context.

I'm not yet familiar with Go on Windows, but the PR looks strange: filepath.Join works on Windows, but I'm really not sure why minikube was joining it with "/" in the first place. It seems like vmpath should instead be:

vmpath  := filepath.Abs(rPath) 

Does that achieve the expected result for you?

@darkedges darkedges changed the title this attempts to resolve directories being squashed onWindows platform When copying assets from .minikube/files on windows, directories get squashed during transfer. ie /etc/ssl/certs/test.pem becomes ~minikube/etcsslcerts/test.pem. This pull request ensures any window style directories are converted into unix style. Oct 20, 2018
@darkedges
Copy link
Author

darkedges commented Oct 20, 2018

Does that achieve the expected result for you?

The problem is that filepath is OS specific, so a directory in windows etc\ssl\certs becomes etcsslcerts instead of etc/ssl/certs when transferred to the minkube host. All this PR does is ensure any windows style directory string is converted into unix style before being transported to the minikube host. Without this files are not transferred to the correct location on the minikube host.

image
behavior without PR
image
behavior with PR
image

@balopat
Copy link
Contributor

balopat commented Nov 27, 2018

@minikube-bot OK to test

@sharamall
Copy link

any update from maintainers or PR owner?

@darkedges
Copy link
Author

Just waiting for approval.

@darkedges
Copy link
Author

/assign @balopat

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg tstromberg merged commit 91be19c into kubernetes:master Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants