jarredhj0214 commented on PR #12288:
URL: https://github.com/apache/gravitino/pull/12288#issuecomment-5140918060
> > > Why is the input parameter of addUsers a List users? Your scenario
should not include externalId. Let's first create a simpler version without
externalId.
> > > You can modify the code according to this logic, and then I will
continue to review it. Thank you. (The first PR has many details to be
discussed and may need to be revised many times. The subsequent PRs will be
merged quickly.)
> >
> >
> > Thanks for the detailed suggestion.
> > Regarding the `addUsers` input, the current request body follows the
approved design doc. In section 3.1, the bulk add users API is defined as `POST
/api/bulk/metalakes/{metalake}/users/add`, and the request body is specified as
a `users` array whose items contain `name`, `externalId`, and `enabled`:
> > ```json
> > {
> > "users": [
> > { "name": "alice", "externalId": "ext-alice", "enabled": true },
> > { "name": "bob", "enabled": true },
> > { "name": "alice" }
> > ]
> > }
> > ```
>
> I have already corrected the comment.
Thanks for the suggestion. I have updated this PR following your proposal.
The latest changes include:
- Kept `BulkOperations` thin with only the constructor, `addUsers`, and
`removeUsers`.
- Added core-level `BulkManager` and `BulkItemResult`.
- Added `AccessControlManager#addUsers` and
`AccessControlManager#removeUsers`, both using a single tree lock for the whole
bulk request.
- Introduced a new `UserAdd` core object for bulk user creation instead of
reusing REST DTOs in core.
- Kept `externalId` and `enabled` support for `addUsers` according to the
design doc.
- Changed duplicate user names in `addUsers` to be reported as item-level
errors instead of rejecting the whole request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]