jerqi commented on code in PR #6515:
URL: https://github.com/apache/gravitino/pull/6515#discussion_r1974878611
##########
authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationPlugin.java:
##########
@@ -576,8 +576,9 @@ public Boolean onGrantedRolesToUser(List<Role> roles, User
user)
try {
rangerClient.grantRole(rangerServiceName,
grantRevokeRoleRequest);
} catch (RangerServiceException e) {
- // Ignore exception, support idempotent operation
- LOG.warn("Grant role: {} to user: {} failed!", role, user, e);
+ throw new AuthorizationPluginException(
+ "Fail to grant role %s to user %s, exception: %s",
+ role.name(), user.name(), e.getMessage());
}
Review Comment:
You origin test code have covered the logic. You can see
RangerHiveIT#testOnGrantedRolesToUser
--
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]