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

*: fix redact log #8415

Merged
merged 4 commits into from
Jul 19, 2024
Merged

*: fix redact log #8415

merged 4 commits into from
Jul 19, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jul 18, 2024

What problem does this PR solve?

Issue Number: Close #8419.

What is changed and how does it work?

Check List

Tests

  • Manual test

previous with redact log enabled:

[2024/07/18 11:32:59.548 +08:00] [INFO] [keyspace.go:383] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule="{\"id\":\"keyspaces/0\",\"index\":0,\"labels\":[{\"key\":\"id\",\"value\":\"0\"}],\"rule_type\":\"key-range\",\"data\":[{\"start_key\":\"7200000000000000fb\",\"end_key\":\"7200000100000000fb\"},{\"start_key\":\"7800000000000000fb\",\"end_key\":\"7800000100000000fb\"}]}"] [takes=1.505851ms]
[2024/07/18 11:32:59.787 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=12] [origin="id:14 end_key:\"748000FFFFFFFFFFFFF900000000000000F8\" region_epoch:<conf_ver:1 version:7 > peers:<id:15 store_id:1 >"] [total=1]

now with redact log disabled:

[2024/07/18 11:24:55.806 +08:00] [INFO] [keyspace.go:384] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule="id: keyspaces/0, index: 0, type: key-range, labels: [key: id, value: 0], data: [startKey: {7200000000000000fb}, endKey: {7200000100000000fb}, startKey: {7800000000000000fb}, endKey: {7800000100000000fb}]"] [takes=1.031017ms]
[2024/07/18 11:24:56.768 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=10] [origin="id:12 end_key:\"748000FFFFFFFFFFFFFA00000000000000F8\" region_epoch:<conf_ver:1 version:6 > peers:<id:13 store_id:1 >"] [total=1]

now with redact log enabled:

[2024/07/18 11:26:17.840 +08:00] [INFO] [keyspace.go:384] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule=?] [takes=1.007138ms]
[2024/07/18 11:26:20.371 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=14] [origin=?] [total=1]

Release note

None.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 18, 2024
Signed-off-by: Ryan Leung <[email protected]>
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 77.28%. Comparing base (a17ff35) to head (14ba46c).
Report is 69 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8415      +/-   ##
==========================================
+ Coverage   77.23%   77.28%   +0.04%     
==========================================
  Files         471      471              
  Lines       61878    61903      +25     
==========================================
+ Hits        47794    47842      +48     
+ Misses      10489    10464      -25     
- Partials     3595     3597       +2     
Flag Coverage Δ
unittests 77.28% <86.20%> (+0.04%) ⬆️

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

@okJiang
Copy link
Member

okJiang commented Jul 19, 2024

Where can we find out what content needs to be redacted?

Copy link
Contributor

ti-chi-bot bot commented Jul 19, 2024

@okJiang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

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.

@rleungx
Copy link
Member Author

rleungx commented Jul 19, 2024

Where can we find out what content needs to be redacted?

Mostly, it is the region's key range. PD doesn't have any other information related to the user data.

Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 19, 2024

@HuSharp: Your lgtm message is repeated, so it is ignored.

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.

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, JmPotato, okJiang

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

Copy link
Contributor

ti-chi-bot bot commented Jul 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-19 08:54:38.604773352 +0000 UTC m=+603300.595714819: ☑️ agreed by HuSharp.
  • 2024-07-19 10:11:12.372432991 +0000 UTC m=+607894.363374457: ☑️ agreed by JmPotato.

@ti-chi-bot ti-chi-bot bot merged commit 2d8e03f into tikv:master Jul 19, 2024
24 of 25 checks passed
@rleungx rleungx deleted the redact branch July 20, 2024 10:06
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Jul 22, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8425.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jul 22, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Jul 22, 2024
close #8419

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Jul 31, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8472.

ti-chi-bot bot pushed a commit that referenced this pull request Jul 31, 2024
close #8419

Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
@HuSharp HuSharp added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Aug 27, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #8570.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Aug 27, 2024
This was referenced Aug 27, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8571.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Aug 27, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Aug 27, 2024
close #8419

Signed-off-by: husharp <[email protected]>

Co-authored-by: husharp <[email protected]>
ti-chi-bot bot added a commit that referenced this pull request Aug 28, 2024
close #8419

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: Ryan Leung <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some key are not replaced in log
5 participants