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

enhance: Add Describe User methods #697

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

punkerpunker
Copy link
Contributor

@punkerpunker punkerpunker commented Apr 5, 2024

resolves: #698

I've added an entity:

type UserDescription struct {
	Name  string
	Roles []string
}

And two methods and tests for them:

  • DescribeUser(ctx context.Context, username string) (entity.UserDescription, error) - which returns UserDescription for a specific user.
  • DescribeUsers(ctx context.Context) ([]entity.UserDescription, error) - which returns UserDescription for all users presented.

The thing that I want to raise is that I am not sure if it is feasible to return empty UserDescription entity in case the user from DescribeUser method doesn't exist, I would highly appreciate suggestions here.

Also, I am not much familiar with the milvus-sdk-go codebase and this is my first PR here, so any comments/feedback/suggestions would be highly appreciated, thanks!

@sre-ci-robot sre-ci-robot requested review from congqixia and yah01 April 5, 2024 20:27
@sre-ci-robot
Copy link

Welcome @punkerpunker! It looks like this is your first PR to milvus-io/milvus-sdk-go 🎉

@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Apr 5, 2024
@punkerpunker punkerpunker force-pushed the describe_user_methods branch 2 times, most recently from a4730b9 to dd101c1 Compare April 5, 2024 20:51
@punkerpunker
Copy link
Contributor Author

Failing tests doesn't seem to be related to this specific change btw

@congqixia
Copy link
Contributor

@punkerpunker thanks for the contribution. I've fixed failing cases. could you please rebase and fix the lint issue reported in lint action?

@punkerpunker
Copy link
Contributor Author

@congqixia seems like fixed

@congqixia
Copy link
Contributor

/kind enhancement

@sre-ci-robot sre-ci-robot added the kind/enhancement New feature or request label Apr 10, 2024
@punkerpunker
Copy link
Contributor Author

Thanks @congqixia, once again the tests falling doesn't seem to be related to the change :)

@punkerpunker
Copy link
Contributor Author

punkerpunker commented Apr 24, 2024

Hey @congqixia, are we concerned about something in particular so we didn't merge this one yet? Want to start working on tf-provider, and that piece is missing :)

Let me know if I can help in any way

@congqixia
Copy link
Contributor

@punkerpunker sorry for the late reply. Master branch e2e cases was unstable due to rapid change of milvus master behavior. We have just fixed the cases. You can rebase your PR now

punkerpunker added 3 commits April 26, 2024 08:25
Signed-off-by: punkerpunker <[email protected]>
Signed-off-by: punkerpunker <[email protected]>
@punkerpunker punkerpunker force-pushed the describe_user_methods branch from 3cea4a8 to 891d019 Compare April 26, 2024 07:26
@mergify mergify bot added the ci-passed auto merge needed label label Apr 26, 2024
Copy link
Contributor

@congqixia congqixia left a comment

Choose a reason for hiding this comment

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

/lgtm

@sre-ci-robot sre-ci-robot added the lgtm look good to me label Apr 26, 2024
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia, punkerpunker

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 added the approved review approved label Apr 26, 2024
@sre-ci-robot sre-ci-robot merged commit 931d6e0 into milvus-io:master Apr 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved review approved ci-passed auto merge needed label kind/enhancement New feature or request lgtm look good to me size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add DescribeUser methods to map Users with Roles
3 participants