Skip to content

fix: correct fullMethod for OperatePrivilegeV2 REST endpoints#48537

Open
sunby wants to merge 1 commit intomilvus-io:masterfrom
sunby:fix-rest-privilege-v2-fullmethod
Open

fix: correct fullMethod for OperatePrivilegeV2 REST endpoints#48537
sunby wants to merge 1 commit intomilvus-io:masterfrom
sunby:fix-rest-privilege-v2-fullmethod

Conversation

@sunby
Copy link
Contributor

@sunby sunby commented Mar 26, 2026

Summary

  • REST handlers for /roles/grant_privilege_v2 and /roles/revoke_privilege_v2 pass V1 fullMethod OperatePrivilege instead of OperatePrivilegeV2 to wrapperProxy, causing Hook interceptors to reject the request as a denied API
  • Also fix routeToMethod metrics map entries for the same endpoints

issue: #48115

The REST handlers for /roles/grant_privilege_v2 and
/roles/revoke_privilege_v2 incorrectly pass the V1 fullMethod
string "OperatePrivilege" instead of "OperatePrivilegeV2".
This causes Hook interceptors to reject the request as a
denied API.

issue: milvus-io#48115
Signed-off-by: sunby <sunbingyi1992@gmail.com>
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sunby
To complete the pull request process, please assign congqixia after the PR has been reviewed.
You can assign the PR to them by writing /assign @congqixia in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details 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

@sre-ci-robot sre-ci-robot added the size/XS Denotes a PR that changes 0-9 lines. label Mar 26, 2026
@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Mar 26, 2026
@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: New ci-v2 system is enabled for this PR.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-build-all // for ci-v2/build-all (multi-arch builds)
  • /ci-rerun-buildenv // for ci-v2/build-env (build milvus-env builder images)
  • /ci-rerun-ut-integration // for ci-v2/ut-integration, will rerun ci-v2/build
  • /ci-rerun-ut-go // for ci-v2/ut-go, will rerun ci-v2/build
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp, will rerun ci-v2/build
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm
  • /ci-rerun-e2e-default // for ci-v2/e2e-default
  • /ci-rerun-ciloop // for ci-v2/ciloop (build + unit tests in one pipeline)
  • /ci-rerun-gosdk // for ci-v2/go-sdk (Go SDK E2E tests, AMD)
  • /ci-rerun-gosdk-arm // for ci-v2/go-sdk-arm (Go SDK E2E tests, ARM)

If you have any questions or requests, please contact @zhikunyao.

@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.81%. Comparing base (1c0302a) to head (442a826).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #48537       +/-   ##
===========================================
+ Coverage   74.95%   77.81%    +2.85%     
===========================================
  Files        1485     2100      +615     
  Lines      247232   349379   +102147     
===========================================
+ Hits       185323   271863    +86540     
- Misses      53589    69229    +15640     
+ Partials     8320     8287       -33     
Components Coverage Δ
Client 79.25% <ø> (ø)
Core 84.01% <ø> (∅)
Go 75.79% <100.00%> (-0.04%) ⬇️
Files with missing lines Coverage Δ
...nternal/distributed/proxy/httpserver/handler_v2.go 85.77% <100.00%> (ø)

... and 672 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-e2e-default
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

5 similar comments
@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@zhikunyao
Copy link
Collaborator

/ci-rerun-gosdk

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

9 similar comments
@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

1 similar comment
@sunby
Copy link
Contributor Author

sunby commented Mar 26, 2026

/ci-rerun-go-sdk
/ci-rerun-integration-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-passed DCO check passed. kind/bug Issues or changes related a bug size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants