kubernetes / kubectl

Issue tracker and mirror of kubectl code
Apache License 2.0
2.83k stars 913 forks source link

kubectl create --validate flag help has excessive spacing between sentences. #1613

Open brianpursley opened 3 months ago

brianpursley commented 3 months ago

What happened: kubectl create --help

Notice excessive spacing before some sentences.

    --validate='strict':
    Must be one of: strict (or true), warn, ignore (or false).      "true" or "strict" will use a schema to validate
    the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation
    is enabled on the api-server, but will fall back to less reliable client-side validation if not.        "warn" will
    warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled
    on the API server, and behave as "ignore" otherwise.        "false" or "ignore" will not perform any schema
    validation, silently dropping any unknown or duplicate fields.

What you expected to happen: There should be regular spacing between sentences.

How to reproduce it (as minimally and precisely as possible):

kubectl create --help

Anything else we need to know?: Looks like the problem is here. I don't think the flag usage argument can handle newlines, so it should probably just format it as a single paragraph with no newlines. https://github.com/kubernetes/kubernetes/blob/5300466a5c8988b479a151ceb77f49dd00065c83/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go#L451-L458

/good-first-issue

Environment:

k8s-ci-robot commented 3 months ago

@brianpursley: This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/kubernetes/kubectl/issues/1613): > > >**What happened**: >`kubectl create --help` > >Notice excessive spacing before some sentences. >``` > --validate='strict': > Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate > the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation > is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will > warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled > on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema > validation, silently dropping any unknown or duplicate fields. >``` > >**What you expected to happen**: >There should be regular spacing between sentences. > >**How to reproduce it (as minimally and precisely as possible)**: > >`kubectl create --help` > >**Anything else we need to know?**: >Looks like the problem is here. I don't think the flag usage argument can handle newlines, so it should problem just format it as a single paragraph with no newlines. >https://github.com/kubernetes/kubernetes/blob/5300466a5c8988b479a151ceb77f49dd00065c83/staging/src/k8s.io/kubectl/pkg/cmd/util/helpers.go#L451-L458 > >/good-first-issue > >**Environment**: >- Kubernetes client and server versions (use `kubectl version`): `Client Version: v1.31.0-alpha.0.496+a9eded097d0923-dirty` >- Cloud provider or hardware configuration: n/a >- OS (e.g: `cat /etc/os-release`): `Ubuntu 22.04.4 LTS` > > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ardaguclu commented 3 months ago

/triage accepted /priority backlog

harpreet9ja commented 3 months ago

/assign @harpreet9ja

harpreet9ja commented 3 months ago

cc @brianpursley cc @seans3 @mengqiy I would like to take this