FANNG1 opened a new issue, #10537: URL: https://github.com/apache/gravitino/issues/10537
**What would you like to be improved?** `core/src/main/java/org/apache/gravitino/audit/v2/CompatibilityUtils.java` and `core/src/main/java/org/apache/gravitino/audit/AuditLog.java` do not provide audit coverage for many existing listener event operation types. At the moment, a large set of `OperationType` values is still not mapped to audit operations, so these events fall back to `UNKNOWN_OPERATION` in audit output or are not explicitly covered in the legacy audit mapping. This makes audit logs incomplete and inconsistent across feature areas. The missing coverage currently includes these areas: - Tag events - Model and model version events - User, group, role, and privilege events - Owner events - Job and job template events - Statistics events - Policy events - Some table and fileset operations such as `LOAD_TABLE_CREDENTIAL`, `PLAN_TABLE_SCAN`, and `LIST_FILESET_FILES` This came up while reviewing PR #10488, which correctly adds audit mapping for the newly introduced `ENABLE/DISABLE` metalake and catalog events, but also highlights that broader audit coverage is still incomplete. **How should we improve?** Add explicit audit mappings for the remaining `OperationType` values in: - `core/src/main/java/org/apache/gravitino/audit/v2/CompatibilityUtils.java` - `core/src/main/java/org/apache/gravitino/audit/AuditLog.java` Suggested follow-up: - Introduce dedicated `AuditLog.Operation` values where needed instead of defaulting to `UNKNOWN_OPERATION` - Add tests to ensure every supported `OperationType` is either explicitly mapped to a concrete audit operation or intentionally mapped to `UNKNOWN_OPERATION` - Consider adding a guard test that fails when new `OperationType` values are added without updating audit compatibility mappings -- 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]
