-
Notifications
You must be signed in to change notification settings - Fork 6k
*: migrate to the new parser redact function #51590
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
Conversation
Hi @xhebox. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51590 +/- ##
================================================
+ Coverage 70.7228% 72.9259% +2.2031%
================================================
Files 1468 1468
Lines 436494 438043 +1549
================================================
+ Hits 308701 319447 +10746
+ Misses 108428 98634 -9794
- Partials 19365 19962 +597
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
/ok-to-test |
@@ -59,6 +59,7 @@ type ProcessInfo struct { | |||
Port string | |||
ResourceGroupName string | |||
SessionAlias string | |||
RedactSQL string |
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.
Because of the default value for string is "", and the default behavior for this struct is no redact, new parser.Normalize
didnt default to ON
but OFF
.
Signed-off-by: xhe <[email protected]>
[LGTM Timeline notifier]Timeline:
|
/approve |
@@ -161,30 +167,30 @@ func (d *sqlDigester) doDigestNormalized(normalized string) (digest *Digest) { | |||
} | |||
|
|||
func (d *sqlDigester) doDigest(sql string) (digest *Digest) { | |||
d.normalize(sql, false, false, false) | |||
d.normalize(sql, "ON", false, false, false) |
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.
can we define a named enum for them?
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.
rest lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, Defined2014, easonn7, hawkingrei 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 |
What problem does this PR solve?
Issue Number: close #51588
Problem Summary: Change to
parser.Normalize(sql string, redact string)
. Whenredact == "ON"
, behavior is same as before. When it is""
or"OFF"
,sql
is returned as is. Or when it is"MARKER"
, important infos will be marked.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.