Skip to content

fix: show collections support custom privilege groups granted objects #41203

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

shaoting-huang
Copy link
Contributor

related: #41200

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
@sre-ci-robot sre-ci-robot added the size/M Denotes a PR that changes 30-99 lines. label Apr 9, 2025
@shaoting-huang
Copy link
Contributor Author

also tested with e2e:

>>> connections.connect(host="localhost", user="root", password="Milvus")
>>> client = MilvusClient(uri="http://localhost:19530", user="root", password="Milvus")
>>> client.create_collection("col1", dimension=128)

>>> db.create_database("jubing")
>>> role = Role("jubing_owner")
>>> role.create()
>>> utility.list_roles(True)
RoleInfo groups:
- RoleItem: <role_name:admin>, <users:()>
- RoleItem: <role_name:jubing_owner>, <users:()>
- RoleItem: <role_name:public>, <users:()>
>>> utility.create_user(user="jubing_owner", password="Milvus")
>>> role.add_user("jubing_owner")
>>> utility.list_roles(True)
RoleInfo groups:
- RoleItem: <role_name:admin>, <users:()>
- RoleItem: <role_name:jubing_owner>, <users:('jubing_owner',)>
- RoleItem: <role_name:public>, <users:()>
>>> role.list_grants()
GrantInfo groups:
>>> role = Role("jubing_owner")
>>> role.create_privilege_group("CollectionGroupA")
>>> role.add_privileges_to_group("CollectionGroupA", ["Load"])
>>> role.grant_v2("CollectionGroupA", "col1")
>>> role.list_grants()
GrantInfo groups:
- GrantItem: <object:Global>, <object_name:col1>, <db_name:default>, <role_name:jubing_owner>, <grantor_name:root>, <privilege:CollectionGroupA>
>>> client = MilvusClient(uri="http://localhost:19530", user="jubing_owner", password="Milvus")
>>> client.list_collections()
['col1']

Copy link
Contributor

mergify bot commented Apr 9, 2025

@shaoting-huang go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

mergify bot commented Apr 9, 2025

@shaoting-huang E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.48%. Comparing base (ee1faf8) to head (1ea0a08).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
internal/rootcoord/show_collection_task.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #41203      +/-   ##
==========================================
+ Coverage   80.46%   80.48%   +0.01%     
==========================================
  Files        1483     1483              
  Lines      210051   210054       +3     
==========================================
+ Hits       169027   169054      +27     
+ Misses      34889    34869      -20     
+ Partials     6135     6131       -4     
Components Coverage Δ
Client 79.59% <ø> (ø)
Core 69.89% <ø> (+0.05%) ⬆️
Go 82.30% <57.14%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
internal/rootcoord/show_collection_task.go 97.02% <57.14%> (-2.98%) ⬇️

... and 28 files with indirect coverage changes

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

sre-ci-robot pushed a commit that referenced this pull request Apr 10, 2025
…bjects (#41204)

cherry-pick from master: #41203
related: #41200

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
@mergify mergify bot added the ci-passed label Apr 10, 2025
Copy link
Member

@liliu-z liliu-z left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liliu-z, shaoting-huang

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

@sre-ci-robot sre-ci-robot merged commit 0d45b24 into milvus-io:master Apr 10, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug lgtm size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants