-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 pkg to cmds #6399
move pkg to cmds #6399
Conversation
Hi @rajatjindal. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rajatjindal If they are not already assigned, you can assign the PR to them by writing 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 |
/ok-to-test |
/test pull-kops-bazel-test |
I'm wondering what your goal with publishing the commands as a library is? That's quite a huge change... |
Hi @chrisz100 thanks for looking at the PR. I want to be able to use the commands from the wrapper i've on top of kops. today we exec kops command from it and if we could make use of commands directly, it will simplify a few things for us. this is just like how kubectl exposes its commands as library and kops make use of them in its implementation. does that make sense? and do u think its reasonable (i am hoping we don't consider it breaking change as these commands were never exposed to user anyways). Thanks |
Hi @chrisz100 do you think this change can be merged. If not we can close the PR and I will look for other ways to do what I am trying to do. If you think it can be merged, I will rebase it against master. Many thanks for considering this PR. Rajat Jindal |
@rajatjindal makes sense - by the way no need to be so formal. It's all just people eager to move this project forward here :-) It's quite a huge PR, do you have some information on how you tested everything kops does still works? |
README.md
Outdated
@@ -1,4 +1,4 @@ | |||
<img src="/docs/img/logo.jpg" width="500px" alt="kops logo"> | |||
<img src="/docs/img/logo.jpg" width="500px" alt="kops logo"> |
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.
Don't really see this as a change that should be in this PR
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 was to trigger ci again as it flaked on a test. i will remove it.
@@ -1,131 +1,11 @@ | |||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") | |||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_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.
I'm not an expert in bazel. @justinsb is this good to remove?
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 this is generated. i didn't explicitly removed it.
This kind of steps away from a traditional folder structure that you see in most go projects. When I am looking at a project I expect most libraries to be under Consider: Also maybe refer to how its done here, which I find a little cleaner: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubectl/kubectl.go#L29 I don't think the PR is that ambitious really. Just in the wrong place. |
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
*/ | |||
|
|||
package main | |||
package cmds |
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.
Consider mimicking the following layout instead.
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubectl/kubectl.go#L29
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.
Generally agree but the kops project is so spread I doubt starting with this would help to clean this up. @mikesplain @justinsb what do you say?
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.
requesting feedback from @mikesplain @justinsb
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.
As this line refers to the package name and does not import anything this looks perfectly fine to me.
All projects do it as proposed here, see:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubectl/kubectl.go#L17
from my perspective this PR is really interesting and I would like to see progress in this. How we could get this forward? I know its big change, but this allows use kops as library. Now the situation is that if we want use kops as library we need copy paste quite much stuff. |
@justinsb @mikesplain could you please give your opinion here? At least for me this PR looks very interesting because I would like to use kops as library from another code. |
Can you please rebase and fix the tests @rajatjindal ? Also, is this WIP still? When do you plan to have this ready? |
I wanted to make sure this PR is acceptable to other core members of the project. I will rebase shortly and look into the test failure as well. thanks. |
98ce6a0
to
4227c3f
Compare
@rajatjindal at least I want this PR. I am planning use kops as part of webservice |
64df6bf
to
aac02a7
Compare
8b7bf75
to
2e297ab
Compare
I've rebased the PR and fixed the tests. can you please sponsor this PR with other core members of the project and help it move forward. Many thanks |
This seems fine in general, though it's going to be hard to get it to a point where there are no conflicts, and we do have to prioritize bug fixes and the like. I would like to see this though - I'm really pushing to get 1.12.0-alpha.1 done, and then hopefully things will settle down a little bit and then it won't be a constant rebase battle. |
@rajatjindal: PR needs rebase. 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. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Hi @justinsb do you think this PR stand a chance to get merged now if I rebase it against master now? |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. In response to this:
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. |
an ambitious try to move commands to a different package then 'main' to be able to use them as library.