Copilot commented on code in PR #12855:
URL: https://github.com/apache/gravitino/pull/12855#discussion_r3921888307


##########
core/src/main/java/org/apache/gravitino/audit/AuditLog.java:
##########
@@ -330,6 +330,10 @@ enum Operation {
 
     LIST_TAGS_INFO,
 
+    ADD_POLICY_FOR_TAG,
+
+    REMOVE_POLICY_FROM_TAG,
+

Review Comment:
   `AuditLog.Operation` adds `ADD_POLICY_FOR_TAG` / `REMOVE_POLICY_FROM_TAG`, 
but `Operation.fromEvent(Event)` in this same file does not map the 
corresponding new listener events, so the deprecated v1 `SimpleFormatter` will 
emit `UNKNOWN_OPERATION` for these operations. This contradicts the PR’s goal 
of providing complete audit mappings.
   
   Please add `instanceof` branches for `AddPolicyForTag*Event` and 
`RemovePolicyFromTag*Event` (and their failure variants) in 
`Operation.fromEvent` so both v1 and v2 audit formatters resolve these 
operations consistently.



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