lasdf1234 opened a new pull request, #14229:
URL: https://github.com/apache/gravitino/pull/14229

   ### What changes were proposed in this pull request?
   
   Disable `FAIL_ON_EMPTY_BEANS` on `JsonUtils.anyFieldMapper()` so field-less 
built-in policy contents (e.g. `IcebergSnapshotExpirationContent`) serialize as 
`{}` when persisted.
   
   Add POConverters round-trip coverage for snapshot-expiration and 
rewrite-manifests.
   
   ### Why are the changes needed?
   
   `#13766` registered placeholder contents with no instance fields. Persisting 
them via `POConverters` throws Jackson `InvalidDefinitionException` / `Failed 
to serialize json object` (HTTP 500). Rewrite later regained fields via 
`#13533` on `main`; snapshot-expiration is still empty and still fails.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Creating `system_iceberg_snapshot_expiration` (and any other empty 
placeholder content) succeeds instead of 500.
   
   ### How was this patch tested?
   
   `./gradlew :core:test --tests 
org.apache.gravitino.storage.relational.utils.TestPOConverters.testFromPolicyPOIcebergSnapshotExpirationPlaceholder
 --tests 
org.apache.gravitino.storage.relational.utils.TestPOConverters.testFromPolicyPOIcebergRewriteManifestsPersists
 -PskipITs`
   
   Made with [Cursor](https://cursor.com)


-- 
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]

Reply via email to