karmendra8386 opened a new pull request, #14623: URL: https://github.com/apache/gravitino/pull/14623
### What changes were proposed in this pull request? Add the policy client operations to the Python client, mirroring the Java client and following the existing tag wiring in the Python client. `GravitinoMetalake` and `GravitinoClient` gain the `PolicyOperations` methods: list/get/create/alter/delete/enable/disable policies, plus the tag associations in both directions (list/add/remove policies for a tag, list tag associations for a policy). The tag operations gain the policy association defaults, `MetadataObjectPolicyOperations` implements `SupportsPolicies` for metadata objects, and `GenericPolicy` / `GenericPolicyTagAssociation` wrap the DTOs. This also adds the policy error handler and the policy conversions in `DTOConverters`. This is part 2 of the work for #7897, tracked as #14622, and follows the merged #14544, which added the policy API types and DTOs this builds on. ### Why are the changes needed? The server, the Java client and, since #14544, the Python API/DTO layer support policies, but the Python client still cannot call any policy operation, so Python users cannot work with policies. Fixes #14622. Together with #14544 this completes the Python client policy support from #7897. ### Does this PR introduce _any_ user-facing change? It wires up the new public policy operations on the Python client and metalake. No existing APIs are changed. ### How was this patch tested? Added unit tests for the policy client API, `GenericPolicy`, the DTO converters and the metadata object policy operations, using the same mock style as the tag operation tests. Ran the full client-python unit suite on this branch: ``` 1395 passed, 1022 subtests passed ``` Pylint on the changed files is 10.00/10, ruff check and format check and black check are clean, and `git diff --check` passes. -- 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]
