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

logutil: adapt new redact functions #51642

Merged
merged 15 commits into from
Mar 12, 2024
Merged

logutil: adapt new redact functions #51642

merged 15 commits into from
Mar 12, 2024

Conversation

xhebox
Copy link
Contributor

@xhebox xhebox commented Mar 11, 2024

What problem does this PR solve?

Issue Number: close #51641, close #51310

Problem Summary: Add redact.Stringer, and remove all usage of old redact var to the new one for logutil reporter. redact.Redact() renamed to redact.String().

It also updated errors library to use the new redact function, ref #51310.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 11, 2024
Copy link

tiprow bot commented Mar 11, 2024

Hi @xhebox. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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 <xw897002528@gmail.com>
Copy link
Contributor

@Defined2014 Defined2014 left a comment

Choose a reason for hiding this comment

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

Better follow the comments. Reset LGTM

pkg/util/logutil/consistency/reporter.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 11, 2024
xhebox and others added 6 commits March 11, 2024 11:22
Co-authored-by: Hangjie Mo <mohangjie1995@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 11, 2024
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Merging #51642 (a8c4a4f) into master (ccbab5e) will increase coverage by 2.0665%.
Report is 1 commits behind head on master.
The diff coverage is 73.8461%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51642        +/-   ##
================================================
+ Coverage   70.7416%   72.8081%   +2.0665%     
================================================
  Files          1473       1473                
  Lines        436996     437020        +24     
================================================
+ Hits         309138     318186      +9048     
+ Misses       108525      98849      -9676     
- Partials      19333      19985       +652     
Flag Coverage Δ
integration 48.8448% <13.8461%> (?)
unit 70.5028% <73.8461%> (-0.0561%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.4062% <100.0000%> (+5.5206%) ⬆️

Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 11, 2024
Copy link

ti-chi-bot bot commented Mar 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-11 03:14:53.653821756 +0000 UTC m=+655320.676068141: ☑️ agreed by Defined2014.
  • 2024-03-11 07:25:58.045906082 +0000 UTC m=+670385.068152472: ☑️ agreed by hawkingrei.

@easonn7
Copy link

easonn7 commented Mar 12, 2024

/approve

Copy link

ti-chi-bot bot commented Mar 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Mar 12, 2024
@xhebox
Copy link
Contributor Author

xhebox commented Mar 12, 2024

/test mysql-test

Copy link

tiprow bot commented Mar 12, 2024

@xhebox: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test mysql-test

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.

@xhebox
Copy link
Contributor Author

xhebox commented Mar 12, 2024

/test mysql-test
/test unit-test

Copy link

tiprow bot commented Mar 12, 2024

@xhebox: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test mysql-test
/test unit-test

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.

@xhebox
Copy link
Contributor Author

xhebox commented Mar 12, 2024

/test mysql-test

Copy link

tiprow bot commented Mar 12, 2024

@xhebox: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test mysql-test

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.

@xhebox
Copy link
Contributor Author

xhebox commented Mar 12, 2024

/test mysql-test

Copy link

tiprow bot commented Mar 12, 2024

@xhebox: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test mysql-test

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.

@ti-chi-bot ti-chi-bot bot merged commit 15947c1 into master Mar 12, 2024
23 checks passed
@ti-chi-bot ti-chi-bot bot deleted the log_5 branch March 12, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adapt logutils adapt errors library https://github.com/pingcap/errors/blob/master/normalize.go#L25
5 participants