tidb icon indicating copy to clipboard operation
tidb copied to clipboard

sem, privilege: fix the issue that some privileges cannot be limited

Open YangKeao opened this issue 2 months ago • 8 comments

What problem does this PR solve?

Issue Number: close #64159

Problem Summary:

What changed and how does it work?

  1. Turn the privilege into upper case before passing it to SEM.

Check List

Tests

  • [x] 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

YangKeao avatar Oct 28 '25 10:10 YangKeao

Codecov Report

:x: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 69.8704%. Comparing base (30af6c7) to head (53a3954). :warning: Report is 24 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64160        +/-   ##
================================================
- Coverage   70.9313%   69.8704%   -1.0609%     
================================================
  Files          1888       1869        -19     
  Lines        515817     520141      +4324     
================================================
- Hits         365876     363425      -2451     
- Misses       125538     134701      +9163     
+ Partials      24403      22015      -2388     
Flag Coverage Δ
integration 42.8480% <10.5263%> (-5.3057%) :arrow_down:
unit 67.3342% <68.4210%> (+1.6736%) :arrow_up:

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 39.3715% <ø> (-20.0436%) :arrow_down:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 28 '25 10:10 codecov[bot]

/check-issue-triage-complete

YangKeao avatar Oct 28 '25 12:10 YangKeao

/retest

lance6716 avatar Nov 21 '25 01:11 lance6716

--- FAIL: TestIsRestrictedPrivilege (0.00s)
panic: assert failed, privilege name must be uppercase [recovered]
	panic: assert failed, privilege name must be uppercase

lance6716 avatar Nov 21 '25 02:11 lance6716

/retest

YangKeao avatar Dec 05 '25 05:12 YangKeao

/retest

YangKeao avatar Dec 11 '25 06:12 YangKeao

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, lance6716

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[bot] avatar Dec 16 '25 08:12 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-12-11 06:04:46.694827489 +0000 UTC m=+1107431.508605061: :ballot_box_with_check: agreed by lance6716.
  • 2025-12-16 08:18:56.399761296 +0000 UTC m=+1547481.213538858: :ballot_box_with_check: agreed by hawkingrei.

ti-chi-bot[bot] avatar Dec 16 '25 08:12 ti-chi-bot[bot]

@YangKeao: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test-next-gen 53a3954c3a8fb2cbc6719a0295cd5567a9bd8275 link unknown /test pull-unit-test-next-gen
idc-jenkins-ci-tidb/unit-test 53a3954c3a8fb2cbc6719a0295cd5567a9bd8275 link unknown /test unit-test

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

ti-chi-bot[bot] avatar Dec 16 '25 09:12 ti-chi-bot[bot]