yuqi1129 commented on code in PR #12503:
URL: https://github.com/apache/gravitino/pull/12503#discussion_r3930198462
##########
core/src/main/java/org/apache/gravitino/policy/PolicyManager.java:
##########
@@ -65,7 +65,9 @@ public class PolicyManager implements PolicyDispatcher {
MetadataObject.Type.TABLE,
MetadataObject.Type.FILESET,
MetadataObject.Type.TOPIC,
- MetadataObject.Type.MODEL);
+ MetadataObject.Type.MODEL,
+ MetadataObject.Type.VIEW,
Review Comment:
**Design blocker:** this extends the legacy direct object-policy model on
`main`, but `main` already contains the accepted policy-on-tag design and
`ObjectPolicyResolver`. That design makes object policies read-only derived
results (`Policy -> Tag -> Metadata Object`) and explicitly says runtime
resolution will not read direct `POLICY_METADATA_OBJECT_REL` records.
With this change, users can create new VIEW/FUNCTION relations in
`policy_relation_meta`, while the 2.0 resolver reads only effective tags and
`POLICY_TAG_REL`. Those associations would therefore disappear behaviorally
once the resolver is wired, unless an explicit migration/compatibility path is
added.
Please decide the version boundary before merging:
- if this is only a 1.3.1 fix, keep it release-branch-only and document how
these relations are migrated or retired in 2.0;
- if this targets `main`/2.0, cover VIEW/FUNCTION through tag association
and `ObjectPolicyResolver` instead of enabling direct association here.
Ref: `design-docs/policy-on-tag.md`, especially “Read-Only Object Policies”,
“Explicit Breaking Migration”, and “Direct Object Policy Compatibility”.
--
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]