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

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

Closed
brianpursley opened this issue Jun 25, 2024 · 6 comments
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@brianpursley
Copy link
Member

brianpursley commented Jun 25, 2024

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:

  • 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
@brianpursley brianpursley added the kind/bug Categorizes issue or PR as related to a bug. label Jun 25, 2024
@k8s-ci-robot
Copy link
Contributor

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

Guidelines

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

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

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:

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 25, 2024
@ardaguclu
Copy link
Member

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 25, 2024
@harpreet9ja
Copy link

/assign @harpreet9ja

@harpreet9ja
Copy link

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

@soltysh
Copy link
Contributor

soltysh commented Nov 5, 2024

Fixed in kubernetes/kubernetes#128081
/close

@k8s-ci-robot
Copy link
Contributor

@soltysh: Closing this issue.

In response to this:

Fixed in kubernetes/kubernetes#128081
/close

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
5 participants