-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
move term to kubectl/util #48299
Conversation
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.
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", |
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.
the test didn't need that? weird.
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.
Updated.
pkg/kubectl/util/BUILD
Outdated
srcs = [":package-srcs"], | ||
srcs = [ | ||
":package-srcs", | ||
"//pkg/kubectl/util/term:all-srcs", |
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.
This will conflict with your other pull-requests in flight, but I guess that's ok
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.
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", |
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.
Question: why can we use the external reference in kubelet and not in kubectl?
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 think it's ok to vendor 3rd party code, but not ok for kubectl to depend on main k8s repo.
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 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
?
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.
kubelet
(not kubectl) already depend on docker
. I think it should be fine.
2adaae1
to
bcbda81
Compare
/lgtm |
/approve |
Rebased to fix |
@apelisse PTAL |
/lgtm |
[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 |
Automatic merge from submit-queue (batch tested with PRs 47918, 47964, 48151, 47881, 48299) |
@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? |
I'd like to know why this could break cross build first. This is no functionality change in this PR. |
@mengqiy Yes, there is. You're changing the dep from a k8s one (pkg/util/term) to a docker one. cc @kubernetes/sig-node-pr-reviews |
Please answer on revert vs forward-fix. The cross-build must stay healthy. |
Thanks for your explaination. |
Thanks @mengqiy! |
Because of this PRs with |
Potential fix in #48508. |
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 ```
move term from pkg/util/term to pkg/kubectl/util/term
remove dependency of
k8s.io/kubernetes/pkg/util/term
forpkg/kubelet/dockershim/exec.go
andpkg/kubelet/dockershim/exec.go
Ref: #48209
/assign @apelisse @monopole
cc: @pwittrock