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

   ### What changes were proposed in this pull request?
   
   Align `PolicyExecutionSpec` with existing policy-module value objects
   (`TagValueSelector` / content factories):
   
   - Drop `withXxx` copy-mutators; construct only via `of` / `empty`
   - Enforce shared peer constraints in `of` (no deferred `validate()`)
   - Store option maps as `ImmutableMap`; add `@Evolving`
   - DTO peer setters rebuild via `ExecutionPeersDTO` + `PolicyExecutionSpec.of`
   - Update unit tests for construction-time validation
   
   ### Why are the changes needed?
   
   Keep the TMS execution-peer value type consistent with the rest of the
   `api` policy package.
   
   Fix: #14227
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — breaking for callers of removed `PolicyExecutionSpec.with*` /
   `validate()`. Wire JSON peers unchanged.
   
   ### How was this patch tested?
   
   ```bash
   ./gradlew :api:test --tests 'org.apache.gravitino.policy.TestPolicy*' \
     :common:test --tests 'org.apache.gravitino.dto.policy.TestPolicyDTO' \
     --tests 'org.apache.gravitino.dto.policy.TestOrphanFileRemovalPolicyDTO' \
     --tests 
'org.apache.gravitino.dto.policy.TestRewriteManifestsAndSnapshotExpirationPolicyDTO'
 \
     -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