roryqi opened a new pull request, #13505: URL: https://github.com/apache/gravitino/pull/13505
### What changes were proposed in this pull request? Convert `NoSuchEntityException` raised while resolving a role's securable object into `NoSuchMetadataObjectException`, while preserving the original cause. Add a regression test that verifies the correct exception and ensures the role remains unchanged after the failed update. ### Why are the changes needed? Role privilege updates currently report every missing entity as a missing role. When the role exists but its securable object cannot be resolved, clients incorrectly receive `NoSuchRoleException`, masking the actual failure. Fix: #13504 ### Does this PR introduce _any_ user-facing change? Yes. When a securable object is missing during a role privilege update, clients now receive `NoSuchMetadataObjectException` instead of the incorrect `NoSuchRoleException`. Missing roles retain their existing behavior. ### How was this patch tested? - `./gradlew :core:test --tests org.apache.gravitino.storage.relational.service.TestRoleMetaService -PskipDockerTests=false` - `./gradlew :core:test --tests org.apache.gravitino.authorization.TestAccessControlManagerForPermissions -PskipDockerTests=false` - `./gradlew :core:spotlessApply` - `git diff --check` -- 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]
