openshift / console

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
397 stars 607 forks source link

OCPBUGS-42712: Replace usage of `containsNonPrintableCharacters` function with `isBinary` function from 'istextorbinary' lib. #14364

Open TheRealJon opened 1 day ago

TheRealJon commented 1 day ago

The containsNonPrintableCharacters function was improperly detecting strings with tab characters as non-printable. The 'istextorbinary' library has more extensive logic for detecting binary, so this PR removes our util function and updates all references to use the isBinary function from the 'istextorbinary' lib.

openshift-ci-robot commented 1 day ago

@TheRealJon: This pull request references Jira Issue OCPBUGS-42712, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/console/pull/14364): >The `containsNonPrintableCharacters` function was improperly detecting strings with tab characters as non-printable. The 'istextorbinary' library has more extensive logic for detecting binary, so this PR removes our util function and updates all references to use the `isBinary` function from the 'istextorbinary' lib. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 1 day ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TheRealJon

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: - ~~[frontend/OWNERS](https://github.com/openshift/console/blob/master/frontend/OWNERS)~~ [TheRealJon] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 1 day ago

@TheRealJon: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).