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

Expose api-versions and api-resources in oc #19884

Merged
merged 6 commits into from
May 30, 2018

Conversation

soltysh
Copy link
Member

@soltysh soltysh commented May 30, 2018

/assign @deads2k

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 30, 2018

func NewCmdApiVersions(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
cmd := kcmd.NewCmdApiVersions(f, out)
cmd.Example = fmt.Sprintf(apiresourcesExample, fullName)
Copy link
Contributor

Choose a reason for hiding this comment

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

why bother replacing the example?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the kube version uses kubectl in examples.


func NewCmdApiVersions(fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command {
cmd := kcmd.NewCmdApiVersions(f, out)
cmd.Example = fmt.Sprintf(apiresourcesExample, fullName)
Copy link
Contributor

Choose a reason for hiding this comment

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

why does apiversions have an apiresources example?

Copy link
Member Author

Choose a reason for hiding this comment

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

My bad.

@deads2k
Copy link
Contributor

deads2k commented May 30, 2018

is this api-resources in it's current state or the state after the first pull? I suspect we'll want the current state. You could do it as two drops on top of this: one drop for copy/paste of current state. a second drop for fitting to the old factory if any.

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 30, 2018
@soltysh
Copy link
Member Author

soltysh commented May 30, 2018

@deads2k the picks were very easy so I just went with UPSTREAM commits.

@deads2k
Copy link
Contributor

deads2k commented May 30, 2018

@soltysh @mfojtik we should have a card to make a better way to handle the binary name substitution in kubectl help. Perhaps we can simply write a dumb find/replace on the command tree.

You should have a test-cmd test that demonstrates this working on openshift resources.

lgtm otherwise. feel free to tag after test.

@soltysh
Copy link
Member Author

soltysh commented May 30, 2018

@soltysh @mfojtik we should have a card to make a better way to handle the binary name substitution in kubectl help. Perhaps we can simply write a dumb find/replace on the command tree.

In majority of commands we pass parent as one of the parameters, worth pursuing, but honestly it's quite bad approach. I've created https://trello.com/c/GAkowJlk/1208-replace-kubectl-in-commands-help for that.

@soltysh
Copy link
Member Author

soltysh commented May 30, 2018

Test added, tagging.

@soltysh soltysh added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. labels May 30, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: soltysh

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit bc87ffb into openshift:master May 30, 2018
@soltysh soltysh deleted the api_resources branch June 5, 2018 08:59
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. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants