github-actions[bot] opened a new pull request, #8499:
URL: https://github.com/apache/gravitino/pull/8499
### What changes were proposed in this pull request?
- Map `Entity.EntityType.GROUP` → `GroupEntity.class` in
`MetadataIdConverter`
- Add a unit test to cover the GROUP → GroupEntity code path in `getID()`
### Why are the changes needed?
- GROUP was mapped to `Entity.class`, which is incorrect and may lead to
runtime issues
(e.g., invalid casting or resolving the wrong class in the entity store).
- The fix ensures the converter resolves GROUP to the correct entity class
and prevents regressions.
Fix: #8339
### Does this PR introduce _any_ user-facing change?
- No user-facing/API changes.
### How was this patch tested?
- Added a unit test that verifies `getID()` returns the expected id for
GROUP.
- Local runs:
```
./gradlew spotlessApply
./gradlew :server-common:test --tests
'org.apache.gravitino.server.authorization.TestMetadataIdConverter'
./gradlew test -PskipITs
```
### Notes / Follow-ups (for reviewers)
- This PR does **not yet update**:
- `MetadataObjectUtil.checkMetadataObject()` to handle GROUP explicitly.
- The Javadoc / comments in `MetadataObject` for the newly added GROUP
type.
These will need to be clarified, and I’d like to confirm the expected
behavior first.
(e.g., GROUP as a metalake-scoped object)
I’m opening this to get feedback on the current approach before finalizing
those parts.
--
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]