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

🐛 CLI Help issues and Marker Registration Regression #274

Merged
merged 5 commits into from
Jul 23, 2019

Conversation

DirectXMan12
Copy link
Contributor

This fixes a number of minor CLI help issues, including #261, as well as other minor nits.

It also fixes a regression around dual field/type CRD validation marker registration introduced by #248, which happens to directly manifest in help output, but will actually show up in generation as well.

The example helptext in controller-gen referenced the `deepcopy`
generator, which is actually spelled `object` (since it generates
`runtime.Object` implementations).
This makes sure it's obvious that you can pass -w or -h multiple times
for more detail, and explains what the limits are.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 22, 2019
It turns out that showing usage on generator errors obscures the actual
errors, so avoid doing that.  We still show usage in generator
initialization errors, though, since those could be a syntax or missing
argument issue.
This ensures that dual type/field markers are registered for both types
and fields, which got broken when help was added to due a type that was
previously shallow-copiable being non-shallow-copiable.

It also adds a section to the crd integration test to prevent this from
happening again.
The helptext was incorrectly using `:` to separate all args.  It should
use `:` on the first, and comma on the rest.
@droot droot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 23, 2019
@k8s-ci-robot k8s-ci-robot merged commit 513618f into kubernetes-sigs:master Jul 23, 2019
@DirectXMan12 DirectXMan12 deleted the help/cli-help-bugs branch August 6, 2019 01:53
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. 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.

3 participants