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

Beautify kubectl help flag commands #104736

Merged
merged 1 commit into from Mar 25, 2022

Conversation

lauchokyip
Copy link
Member

@lauchokyip lauchokyip commented Sep 2, 2021

What type of PR is this?

/kind design

What this PR does / why we need it:

Make the help flags of kubectl more readable / user friendly

Which issue(s) this PR fixes:

Fixes kubernetes/kubectl#1069

Special notes for your reviewer:

Before,

Apply a configuration to a resource by file name or stdin. The resource name must be specified. This
resource will be created if it doesn't exist yet. To use 'apply', always create the resource
initially with either 'apply' or 'create --save-config'.

 JSON and YAML formats are accepted.

 Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of
what the current state is. See https://issues.k8s.io/34274.

Examples:
  # Apply the configuration in pod.json to a pod
  kubectl apply -f ./pod.json
  
  # Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml
  kubectl apply -k dir/
  
  # Apply the JSON passed into stdin to a pod
  cat pod.json | kubectl apply -f -
  
  # Note: --prune is still in Alpha
  # Apply the configuration in manifest.yaml that matches label app=nginx and delete all other
resources that are not in the file and match label app=nginx
  kubectl apply --prune -f manifest.yaml -l app=nginx
  
  # Apply the configuration in manifest.yaml and delete all the other config maps that are not in
the file
  kubectl apply --prune -f manifest.yaml --all --prune-whitelist=core/v1/ConfigMap

Available Commands:
  edit-last-applied Edit latest last-applied-configuration annotations of a resource/object
  set-last-applied  Set the last-applied-configuration annotation on a live object to match the
contents of a file
  view-last-applied View the latest last-applied-configuration annotations of a resource/object

Options:
      --all=false: Select all resources in the namespace of the specified resource types.
      --allow-missing-template-keys=true: If true, ignore any errors in templates when a field or
map key is missing in the template. Only applies to golang and jsonpath output formats.
      --cascade='background': Must be "background", "orphan", or "foreground". Selects the deletion
cascading strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to
background.
      --dry-run='none': Must be "none", "server", or "client". If client strategy, only print the
object that would be sent, without sending it. If server strategy, submit server-side request
without persisting the resource.
      --field-manager='kubectl-client-side-apply': Name of the manager used to track field
ownership.
  -f, --filename=[]: that contains the configuration to apply
      --force=false: If true, immediately remove resources from API and bypass graceful deletion.
Note that immediate deletion of some resources may result in inconsistency or data loss and requires
confirmation.
      --force-conflicts=false: If true, server-side apply will force the changes against conflicts.
      --grace-period=-1: Period of time in seconds given to the resource to terminate gracefully.
Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true
(force deletion).
  -k, --kustomize='': Process a kustomization directory. This flag can't be used together with -f or
-R.
      --openapi-patch=true: If true, use openapi to calculate diff when the openapi presents and the
resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.
  -o, --output='': Output format. One of:
json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
      --overwrite=true: Automatically resolve conflicts between the modified and live configuration
by using values from the modified configuration
      --prune=false: Automatically delete resource objects, including the uninitialized ones, that
do not appear in the configs and are created by either apply or create --save-config. Should be used
with either -l or --all.
      --prune-whitelist=[]: Overwrite the default whitelist with <group/version/kind> for --prune
  -R, --recursive=false: Process the directory used in -f, --filename recursively. Useful when you
want to manage related manifests organized within the same directory.
  -l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l
key1=value1,key2=value2)
      --server-side=false: If true, apply runs in the server instead of the client.
      --show-managed-fields=false: If true, keep the managedFields when printing objects in JSON or
YAML format.
      --template='': Template string or path to template file to use when -o=go-template,
-o=go-template-file. The template format is golang templates
[http://golang.org/pkg/text/template/#pkg-overview].
      --timeout=0s: The length of time to wait before giving up on a delete, zero means determine a
timeout from the size of the object
      --validate=true: If true, use a schema to validate the input before sending it
      --wait=false: If true, wait for resources to be gone before returning. This waits for
finalizers.

Usage:
  kubectl apply (-f FILENAME | -k DIRECTORY) [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).

After,

Apply a configuration to a resource by file name or stdin. The resource name must be specified. This resource will be
created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create
--save-config'.

 JSON and YAML formats are accepted.

 Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current
state is. See https://issues.k8s.io/34274.

Examples:
  # Apply the configuration in pod.json to a pod
  kubectl apply -f ./pod.json
  
  # Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml
  kubectl apply -k dir/
  
  # Apply the JSON passed into stdin to a pod
  cat pod.json | kubectl apply -f -
  
  # Note: --prune is still in Alpha
  # Apply the configuration in manifest.yaml that matches label app=nginx and delete all other resources that are not in
the file and match label app=nginx
  kubectl apply --prune -f manifest.yaml -l app=nginx
  
  # Apply the configuration in manifest.yaml and delete all the other config maps that are not in the file
  kubectl apply --prune -f manifest.yaml --all --prune-whitelist=core/v1/ConfigMap

Available Commands:
  edit-last-applied   Edit latest last-applied-configuration annotations of a resource/object
  set-last-applied    Set the last-applied-configuration annotation on a live object to match the contents of a file
  view-last-applied   View the latest last-applied-configuration annotations of a resource/object

Options:
    --all=false:
	Select all resources in the namespace of the specified resource types.

    --allow-missing-template-keys=true:
	If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to
	golang and jsonpath output formats.

    --cascade='background':
	Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents
	(e.g. Pods created by a ReplicationController). Defaults to background.

    --dry-run='none':
	Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without
	sending it. If server strategy, submit server-side request without persisting the resource.

    --field-manager='kubectl-client-side-apply':
	Name of the manager used to track field ownership.

    -f, --filename=[]:
	that contains the configuration to apply

    --force=false:
	If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of
	some resources may result in inconsistency or data loss and requires confirmation.

    --force-conflicts=false:
	If true, server-side apply will force the changes against conflicts.

    --grace-period=-1:
	Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for
	immediate shutdown. Can only be set to 0 when --force is true (force deletion).

    -k, --kustomize='':
	Process a kustomization directory. This flag can't be used together with -f or -R.

    --openapi-patch=true:
	If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi
	spec. Otherwise, fall back to use baked-in types.

    -o, --output='':
	Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath,
	jsonpath-as-json, jsonpath-file).

    --overwrite=true:
	Automatically resolve conflicts between the modified and live configuration by using values from the modified
	configuration

    --prune=false:
	Automatically delete resource objects, that do not appear in the configs and are created by either apply or
	create --save-config. Should be used with either -l or --all.

    --prune-whitelist=[]:
	Overwrite the default whitelist with <group/version/kind> for --prune

    -R, --recursive=false:
	Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests
	organized within the same directory.

    -l, --selector='':
	Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching
	objects must satisfy all of the specified label constraints.

    --server-side=false:
	If true, apply runs in the server instead of the client.

    --show-managed-fields=false:
	If true, keep the managedFields when printing objects in JSON or YAML format.

    --template='':
	Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format
	is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

    --timeout=0s:
	The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the
	object

    --validate=true:
	If true, use a schema to validate the input before sending it

    --wait=false:
	If true, wait for resources to be gone before returning. This waits for finalizers.

Usage:
  kubectl apply (-f FILENAME | -k DIRECTORY) [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).


Does this PR introduce a user-facing change?

Improve kubectl's user help commands readability 

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/design Categorizes issue or PR as related to design. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 2, 2021
@@ -90,7 +91,7 @@ func (templater *templater) HelpFunc() func(*cobra.Command, []string) {
t := template.New("help")
t.Funcs(templater.templateFuncs())
template.Must(t.Parse(templater.HelpTemplate))
out := term.NewResponsiveWriter(c.OutOrStdout())
out := c.OutOrStderr()
Copy link
Member Author

Choose a reason for hiding this comment

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

Have to remove this and wrap each template string separately, or else for the help command -o output, ResponsiveWriter will move it to next line (as shown in the picture)

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed with @eddiezane , we agreed it's fine

@lauchokyip
Copy link
Member Author

/sig cli
/cc @eddiezane

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 2, 2021
@lauchokyip
Copy link
Member Author

/cc @soltysh

@lauchokyip
Copy link
Member Author

/retest

Copy link
Member

@dixudx dixudx left a comment

Choose a reason for hiding this comment

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

Nice!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 6, 2021
Copy link
Member

@eddiezane eddiezane left a comment

Choose a reason for hiding this comment

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

How much of this is because of the kubectl get output types?

We can change that output if it simplifies this.

Example:
2021-09-14_16-10

diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go b/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
index 4bfd306975c..c32e688c110 100644
--- a/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
+++ b/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
@@ -161,7 +161,7 @@ func (f *PrintFlags) AddFlags(cmd *cobra.Command) {
 	f.CustomColumnsFlags.AddFlags(cmd)
 
 	if f.OutputFormat != nil {
-		cmd.Flags().StringVarP(f.OutputFormat, "output", "o", *f.OutputFormat, fmt.Sprintf("Output format. One of: %s See custom columns [https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [https://kubernetes.io/docs/reference/kubectl/jsonpath/].", strings.Join(f.AllowedFormats(), "|")))
+		cmd.Flags().StringVarP(f.OutputFormat, "output", "o", *f.OutputFormat, fmt.Sprintf("Output format. One of: \"%s\" See custom columns [https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [https://kubernetes.io/docs/reference/kubectl/jsonpath/].", strings.Join(f.AllowedFormats(), " ")))
 	}
 	if f.NoHeaders != nil {
 		cmd.Flags().BoolVar(f.NoHeaders, "no-headers", *f.NoHeaders, "When using the default or custom-column output format, don't print headers (default print headers).")

stdout := os.Stdout
fd := stdout.Fd()
if !term.IsTerminal(fd) {
panic("file descriptor is not a terminal")
Copy link
Member

Choose a reason for hiding this comment

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

We should be able to return an error from the calling function.

https://pkg.go.dev/text/template@go1.17.1#FuncMap

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we can but in the flagUsages, it's returning a string to the template so I wasn't sure returning an error is a good idea

func flagsUsages(f *flag.FlagSet) string {
	flagBuf := new(bytes.Buffer)
	printer := NewHelpFlagPrinter(flagBuf)

	wrapLimit := term.GetWordWrapperLimit()
	minFlagLen := uint(getMinFlagLen(f))
	maxFlagLen := uint(getMaxFlagLen(f))
	tabWidth := maxFlagLen - minFlagLen // the maximum width that will be padded by tabWriter

	f.VisitAll(func(flag *flag.Flag) {
		if flag.Hidden {
			return
		}
		printer.PrintHelpFlags(flag, wrapLimit, tabWidth, minFlagLen, maxFlagLen)
	})
	printer.FlushTabWriter()
	return flagBuf.String()
}

flagUsages will be parsed as one of the templates function over here

func (templater *templater) templateFuncs(exposedFlags ...string) template.FuncMap {
	return template.FuncMap{
		"trim":                strings.TrimSpace,
		"trimRight":           func(s string) string { return strings.TrimRightFunc(s, unicode.IsSpace) },
		"trimLeft":            func(s string) string { return strings.TrimLeftFunc(s, unicode.IsSpace) },
		"gt":                  cobra.Gt,
		"eq":                  cobra.Eq,
		"rpad":                rpad,
		"appendIfNotPresent":  appendIfNotPresent,
		"flagsNotIntersected": flagsNotIntersected,
		"visibleFlags":        visibleFlags,
		"flagsUsages":         flagsUsages,
		"cmdGroups":           templater.cmdGroups,
		"cmdGroupsString":     templater.cmdGroupsString,
		"rootCmd":             templater.rootCmdName,
		"isRootCmd":           templater.isRootCmd,
		"optionsCmdFor":       templater.optionsCmdFor,
		"usageLine":           templater.usageLine,
		"exposed": func(c *cobra.Command) *flag.FlagSet {
			exposed := flag.NewFlagSet("exposed", flag.ContinueOnError)
			if len(exposedFlags) > 0 {
				for _, name := range exposedFlags {
					if flag := c.Flags().Lookup(name); flag != nil {
						exposed.AddFlag(flag)
					}
				}
			}
			return exposed
		},
	}
}

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking since template.FuncMap functions can return an error that you could pass it from flagsUsages as well. Not sure what the behavior is though for errors there.

Copy link
Member Author

Choose a reason for hiding this comment

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

template.FuncMap is intended to replace the input and output a string for the template

Copy link
Member

Choose a reason for hiding this comment

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

I took a quick look at this and returning an error from those can be handled gracefully here.

_output/bin/kubectl get --help 1>/dev/null
Error: template: usage:12:43: executing "usage" at <flagsUsages $visibleFlags>: error calling flagsUsages: file descriptor is not a terminal
diff --git a/staging/src/k8s.io/kubectl/pkg/util/templates/templater.go b/staging/src/k8s.io/kubectl/pkg/util/templates/templater.go
index d2d5e6d87ed..6914d0cda4f 100644
--- a/staging/src/k8s.io/kubectl/pkg/util/templates/templater.go
+++ b/staging/src/k8s.io/kubectl/pkg/util/templates/templater.go
@@ -218,11 +218,14 @@ func (t *templater) usageLine(c *cobra.Command) string {
 	return usage
 }
 
-func flagsUsages(f *flag.FlagSet) string {
+func flagsUsages(f *flag.FlagSet) (string, error) {
 	flagBuf := new(bytes.Buffer)
 	printer := NewHelpFlagPrinter(flagBuf)
 
-	wrapLimit := term.GetWordWrapperLimit()
+	wrapLimit, err := term.GetWordWrapperLimit()
+	if err != nil {
+		return "", err
+	}
 	minFlagLen := uint(getMinFlagLen(f))
 	maxFlagLen := uint(getMaxFlagLen(f))
 	tabWidth := maxFlagLen - minFlagLen // the maximum width that will be padded by tabWriter
@@ -234,7 +237,7 @@ func flagsUsages(f *flag.FlagSet) string {
 		printer.PrintHelpFlags(flag, wrapLimit, tabWidth, minFlagLen, maxFlagLen)
 	})
 	printer.FlushTabWriter()
-	return flagBuf.String()
+	return flagBuf.String(), nil
 }
 
 func getFlagFormatWithTab(f *flag.Flag) string {
diff --git a/staging/src/k8s.io/kubectl/pkg/util/term/term_writer.go b/staging/src/k8s.io/kubectl/pkg/util/term/term_writer.go
index 26d429ad033..17d59e25832 100644
--- a/staging/src/k8s.io/kubectl/pkg/util/term/term_writer.go
+++ b/staging/src/k8s.io/kubectl/pkg/util/term/term_writer.go
@@ -17,6 +17,7 @@ limitations under the License.
 package term
 
 import (
+	"errors"
 	"io"
 	"os"
 
@@ -74,15 +75,15 @@ func NewWordWrapWriter(w io.Writer, limit uint) io.Writer {
 	}
 }
 
-func GetWordWrapperLimit() uint {
+func GetWordWrapperLimit() (uint, error) {
 	stdout := os.Stdout
 	fd := stdout.Fd()
 	if !term.IsTerminal(fd) {
-		panic("file descriptor is not a terminal")
+		return 0, errors.New("file descriptor is not a terminal")
 	}
 	terminalSize := GetSize(fd)
 	if terminalSize == nil {
-		panic("terminal size is nil")
+		return 0, errors.New("terminal size is nil")
 	}
 	var limit uint
 	switch {
@@ -93,7 +94,7 @@ func GetWordWrapperLimit() uint {
 	case terminalSize.Width >= 80:
 		limit = 80
 	}
-	return limit
+	return limit, nil
 }
 
 func (w wordWrapWriter) Write(p []byte) (nn int, err error) {

@lauchokyip
Copy link
Member Author

lauchokyip commented Sep 15, 2021

How much of this is because of the kubectl get output types?

We can change that output if it simplifies this.

Example:
2021-09-14_16-10

diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go b/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
index 4bfd306975c..c32e688c110 100644
--- a/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
+++ b/staging/src/k8s.io/kubectl/pkg/cmd/get/get_flags.go
@@ -161,7 +161,7 @@ func (f *PrintFlags) AddFlags(cmd *cobra.Command) {
 	f.CustomColumnsFlags.AddFlags(cmd)
 
 	if f.OutputFormat != nil {
-		cmd.Flags().StringVarP(f.OutputFormat, "output", "o", *f.OutputFormat, fmt.Sprintf("Output format. One of: %s See custom columns [https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [https://kubernetes.io/docs/reference/kubectl/jsonpath/].", strings.Join(f.AllowedFormats(), "|")))
+		cmd.Flags().StringVarP(f.OutputFormat, "output", "o", *f.OutputFormat, fmt.Sprintf("Output format. One of: \"%s\" See custom columns [https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [https://kubernetes.io/docs/reference/kubectl/jsonpath/].", strings.Join(f.AllowedFormats(), " ")))
 	}
 	if f.NoHeaders != nil {
 		cmd.Flags().BoolVar(f.NoHeaders, "no-headers", *f.NoHeaders, "When using the default or custom-column output format, don't print headers (default print headers).")

@eddiezane When I was testing most of the commands, I think the flags --template and --output are the one that are affected since the wrapper will treat [, ], | as a single word

@eddiezane
Copy link
Member

@eddiezane When I was testing most of the commands, I think the flags --template and --output are the one that are affected since the wrapper will treat [, ], | as a single word

And if we drop those characters and change the output does it reduce this PR at all?

@lauchokyip
Copy link
Member Author

@eddiezane When I was testing most of the commands, I think the flags --template and --output are the one that are affected since the wrapper will treat [, ], | as a single word

And if we drop those characters and change the output does it reduce this PR at all?

I don't think so 😅 , getting rid of these characters will only prevent the wrapper to add a newline character to strings with | , [ and ]

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. labels Mar 24, 2022
@k8s-ci-robot k8s-ci-robot added 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. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 24, 2022
@lauchokyip
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 24, 2022
@lauchokyip
Copy link
Member Author

somehow messed up the rebasing, sorry if it creates too much noise

@lauchokyip
Copy link
Member Author

/lgtm

@k8s-ci-robot
Copy link
Contributor

@lauchokyip: you cannot LGTM your own PR.

In response to this:

/lgtm

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.

@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@eddiezane
Copy link
Member

/retest

Copy link
Member

@eddiezane eddiezane left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianpursley, dixudx, eddiezane, lauchokyip

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

@jsturtevant
Copy link
Contributor

/remove sig-windows

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 24, 2022

@lauchokyip: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-conformance-image-test e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-conformance-image-test
pull-kubernetes-e2e-gce-network-proxy-grpc e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-network-proxy-grpc
pull-kubernetes-e2e-gce-csi-serial e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-csi-serial
pull-kubernetes-e2e-gce-storage-snapshot e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-storage-snapshot
pull-kubernetes-e2e-gce-iscsi-serial e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-iscsi-serial
pull-kubernetes-e2e-gce-network-proxy-http-connect e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link true /test pull-kubernetes-e2e-gce-network-proxy-http-connect
pull-kubernetes-files-remake e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link true /test pull-kubernetes-files-remake
pull-kubernetes-conformance-kind-ipv6-parallel e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-conformance-kind-ipv6-parallel
pull-kubernetes-local-e2e e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-local-e2e
check-dependency-stats e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test check-dependency-stats
pull-publishing-bot-validate e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-publishing-bot-validate
pull-kubernetes-e2e-capz-azure-disk-vmss e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-capz-azure-disk-vmss
pull-kubernetes-e2e-gce-alpha-features e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-alpha-features
pull-kubernetes-e2e-capz-conformance e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-capz-conformance
pull-kubernetes-e2e-ubuntu-gce-network-policies e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-ubuntu-gce-network-policies
pull-kubernetes-e2e-capz-azure-disk e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-capz-azure-disk
pull-kubernetes-e2e-gce-storage-slow e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-storage-slow
pull-kubernetes-e2e-capz-azure-file e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-capz-azure-file
pull-kubernetes-e2e-aks-engine-windows-containerd e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-aks-engine-windows-containerd
pull-kubernetes-e2e-gci-gce-ipvs e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gci-gce-ipvs
pull-kubernetes-e2e-gce-iscsi e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gce-iscsi
pull-kubernetes-e2e-gci-gce-ingress e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-gci-gce-ingress
pull-kubernetes-e2e-capz-azure-file-vmss e7de473ec62fb13e4e1b94dcf786e54d1a2324d8 link false /test pull-kubernetes-e2e-capz-azure-file-vmss

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

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. area/apiserver area/cloudprovider area/code-generation area/conformance Issues or PRs related to kubernetes conformance tests area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/ipvs area/kubeadm area/kubectl area/kubelet area/network-policy Issues or PRs related to Network Policy subproject area/provider/gcp Issues or PRs related to gcp provider area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scalability Categorizes an issue or PR as relevant to SIG Scalability. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/security Categorizes an issue or PR as relevant to SIG Security. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formatting of --help flag is very different across commands (accessibility)