Skip to content

kubectl cp command supports coping remote file into local directory#46762

Merged
k8s-github-robot merged 1 commit intokubernetes:masterfrom
bruceauyeung:k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir
Oct 7, 2017
Merged

kubectl cp command supports coping remote file into local directory#46762
k8s-github-robot merged 1 commit intokubernetes:masterfrom
bruceauyeung:k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir

Conversation

@bruceauyeung
Copy link
Copy Markdown
Contributor

@bruceauyeung bruceauyeung commented Jun 1, 2017

What this PR does / why we need it:
before this PR, kubectl cp testpod:/tmp/testfile /home will fail with error:

error: open /home: is a directory

with this PR, kubectl cp testpod:/tmp/testfile /home will successfully copy remote testfile into directory /home

other minor improvements to make codes follow Go code conventions and more robust

Release note:

kubectl cp subcommand supports coping remote file into local directory now.

Signed-off-by: bruceauyeung [email protected]

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 1, 2017
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @bruceauyeung. 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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Details

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 1, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Jun 1, 2017
@soltysh soltysh added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jun 2, 2017
@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Jun 2, 2017

@bruceauyeung the change looks ok, do you think it's possible to have a test case for this?

@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Jun 2, 2017

@k8s-bot ok to test

@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from a57ae91 to 6b17b07 Compare June 5, 2017 01:52
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 5, 2017
@bruceauyeung
Copy link
Copy Markdown
Contributor Author

@soltysh test cases added, PTAL

@bruceauyeung
Copy link
Copy Markdown
Contributor Author

@soltysh some tests failed , is there anything i can do ?

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2017
@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from 6b17b07 to c8de5c6 Compare June 27, 2017 10:25
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2017
@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Aug 8, 2017

/test pull-kubernetes-verify
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2017
@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Aug 8, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 8, 2017
@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented Aug 8, 2017

@fabianofranz mind approving this one?

@fabianofranz
Copy link
Copy Markdown
Contributor

/sig cli
/area kubectl
/retest

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. area/kubectl labels Aug 8, 2017
@fabianofranz
Copy link
Copy Markdown
Contributor

@bruceauyeung need to go vet.

@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from c8de5c6 to 4529b26 Compare September 18, 2017 07:33
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2017
@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from 4529b26 to 8d3a816 Compare September 18, 2017 07:45
@bruceauyeung
Copy link
Copy Markdown
Contributor Author

sorry for the delay ! I just am busy looking after my newborn boy recently.
rebased and vet error is fixed.
@fabianofranz @soltysh

@bruceauyeung
Copy link
Copy Markdown
Contributor Author

hi @fabianofranz @soltysh, the vet error is already fixed. would you mind take a look at this?

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 24, 2017
@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from 8d3a816 to 5bc6963 Compare September 25, 2017 08:10
@bruceauyeung
Copy link
Copy Markdown
Contributor Author

rebased and fixd a bug in untarAll function: if io.Copy fails, outFile will be left unclosed.

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2017
@bruceauyeung bruceauyeung force-pushed the k8s-branch-kubectl-cp-support-coping-local-file-into-remote-dir branch from 5bc6963 to 19b5724 Compare September 28, 2017 02:09
@fabianofranz
Copy link
Copy Markdown
Contributor

/lgtm
/approve no-issue
@bruceauyeung thanks, sorry about the delay and congrats about your newborn! ;)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 6, 2017
@k8s-github-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bruceauyeung, fabianofranz, soltysh

Associated issue requirement bypassed by: fabianofranz

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 6, 2017
@fejta-bot
Copy link
Copy Markdown

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants