lasdf1234 commented on PR #14520: URL: https://github.com/apache/gravitino/pull/14520#issuecomment-6603913111
@mchades Thanks, reworked along your suggestion: - Known `policyType` values (all built-ins and `custom`) are now resolved case-insensitively by a `PolicyContentTypeIdResolver` before content is bound, so `SYSTEM_ICEBERG_COMPACTION` selects compaction content and is validated as such. `custom` is registered explicitly; the fallback that bound any unknown type as custom content is removed. - Removed both whole-request deserializers and `PolicyWireContentTypes`; create/update use Jackson's default field binding again. - Only an unresolved type produces a type-named 400 (`Unknown built-in policy type: ...` / `Unknown policy type: ...`), surfaced through `JsonMappingException` rather than a generic `IllegalArgumentException` cause. - Create already stores `BuiltInType.policyType()`; `updateContent` now also passes the canonical lowercase value. - Tests cover lowercase/uppercase/mixed-case known types (create and update), unknown types with empty and non-empty content, and the existing field validation (`enabled`, unknown fields). The input normalization is documented in `manage-policies-in-gravitino.md`. -- 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]
