-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
filtering ANSI escape characters #104962
filtering ANSI escape characters #104962
Conversation
Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>
Skipping CI for Draft Pull Request. |
@RinkiyaKeDad: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: RinkiyaKeDad The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @soltysh |
/cc |
@RinkiyaKeDad: The following test failed, say
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. |
@@ -48,7 +49,8 @@ func (p *JSONPrinter) PrintObj(obj runtime.Object, w io.Writer) error { | |||
if err != nil { | |||
return err | |||
} | |||
_, err = w.Write(data) | |||
stringLiteral := strconv.QuoteToASCII(string(data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the issue really contained to watch events output by the json printer?
I'm surprised it doesn't manifest in many places (output of kubectl describe
, kubectl get
, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liggitt do you suggest changing the _, err = w.Write(data)
on line 79 instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are probably lots of paths that let data in free-form string fields hit the console... -o json, -o yaml, maybe simple kubectl get / kubectl describe commands, etc
I build a EDITED: slack context about this issue https://kubernetes.slack.com/archives/C2GL57FJ4/p1631182928020600 |
Hi, Any update o this issue? |
@RinkiyaKeDad Arsh, do we still need this? please reopen if needed /close |
@dims: Closed this PR. In response to this:
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. |
Hi, @RinkiyaKeDad. Is there any progress on this issue? |
Hey @wangyx1992, I'm not actively following this issue now, so I'm not familiar with the latest updates, sorry. You can bring this up in #sig-cli on the Kuberenetes slack if you want to start the discussion again 🙏 |
Signed-off-by: RinkiyaKeDad arshsharma461@gmail.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes ANSI escape characters not being filtered for some kubectl subcommands.
Which issue(s) this PR fixes:
Fixes #101695
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig cli