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

move term to kubectl/util #48299

Merged
merged 1 commit into from
Jul 1, 2017
Merged

Conversation

mengqiy
Copy link
Member

@mengqiy mengqiy commented Jun 29, 2017

move term from pkg/util/term to pkg/kubectl/util/term

remove dependency of k8s.io/kubernetes/pkg/util/term for pkg/kubelet/dockershim/exec.go and pkg/kubelet/dockershim/exec.go

Ref: #48209

NONE

/assign @apelisse @monopole

cc: @pwittrock

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

@apelisse apelisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks mengqi!

@@ -218,7 +218,6 @@ go_test(
"//pkg/printers/internalversion:go_default_library",
"//pkg/util/i18n:go_default_library",
"//pkg/util/strings:go_default_library",
"//pkg/util/term:go_default_library",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the test didn't need that? weird.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

srcs = [":package-srcs"],
srcs = [
":package-srcs",
"//pkg/kubectl/util/term:all-srcs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will conflict with your other pull-requests in flight, but I guess that's ok

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reminding me :)

"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library",
"//vendor/github.com/docker/docker/pkg/term:go_default_library",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: why can we use the external reference in kubelet and not in kubectl?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to vendor 3rd party code, but not ok for kubectl to depend on main k8s repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess my question is, is //vendor/github.com/docker/docker/pkg/term very different from //pkg/util/term ? Can we replace //pkg/util/term entirely with //vendor/github.com/docker/docker/pkg/term?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubelet (not kubectl) already depend on docker. I think it should be fine.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jun 29, 2017
@mengqiy mengqiy force-pushed the kubectl_term branch 2 times, most recently from 2adaae1 to bcbda81 Compare June 29, 2017 23:21
@apelisse
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2017
@thockin
Copy link
Member

thockin commented Jun 30, 2017

/approve

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 30, 2017
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 30, 2017
@mengqiy
Copy link
Member Author

mengqiy commented Jun 30, 2017

Rebased to fix BUILD file conflicts.

@mengqiy
Copy link
Member Author

mengqiy commented Jun 30, 2017

@apelisse PTAL

@apelisse
Copy link
Member

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, mengqiy, thockin

Associated issue: 48209

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

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
Copy link

Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299)

@k8s-github-robot k8s-github-robot merged commit 73a94ea into kubernetes:master Jul 1, 2017
@mengqiy mengqiy deleted the kubectl_term branch July 1, 2017 05:56
@luxas
Copy link
Member

luxas commented Jul 4, 2017

@mengqiy This broke the cross-build, ref: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-cross-build/2251

Should I revert or will you fix-forward?

@mengqiy
Copy link
Member Author

mengqiy commented Jul 4, 2017

I'd like to know why this could break cross build first. This is no functionality change in this PR.

@luxas
Copy link
Member

luxas commented Jul 4, 2017

@mengqiy Yes, there is. You're changing the dep from a k8s one (pkg/util/term) to a docker one.
The k8s term package includes compile support for windows, the docker one doesn't.
See https://github.com/moby/moby/blob/master/pkg/term/winsize.go where SetWinSize() is defined; no build support for windows and no winsize_windows.go or winsize_unsupported.go files either.

cc @kubernetes/sig-node-pr-reviews
I think we should be much more careful when actually changing the deps of something.
This PR is indeed changing behavior. If you had only moved packages it wouldn't have a problem.

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jul 4, 2017
@luxas
Copy link
Member

luxas commented Jul 4, 2017

Please answer on revert vs forward-fix. The cross-build must stay healthy.

@mengqiy
Copy link
Member Author

mengqiy commented Jul 5, 2017

Thanks for your explaination.
I will try to give a forward-fix tomorrow morning.

@luxas
Copy link
Member

luxas commented Jul 5, 2017

Thanks @mengqiy!
Please cc me on the PR

@mkumatag
Copy link
Member

mkumatag commented Jul 5, 2017

Because of this PRs with pull-kubernetes-cross are failing. @mengqiy Can you fix the issue on priority basis?

@mengqiy
Copy link
Member Author

mengqiy commented Jul 5, 2017

Potential fix in #48508.

k8s-github-robot pushed a commit that referenced this pull request Jul 6, 2017
Automatic merge from submit-queue

fix cross build

Fix the issue introduced in #48299 which breaks cross-build (#48299 (comment)).
move setsize.go and setsize_unsupported.go back to util/term for kubelet.
move unmark_windows.go as well.

```release-note
NONE
```
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. 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-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants