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


##########
mcp-server/mcp_server/core/audit.py:
##########
@@ -74,13 +75,19 @@ def emit(
                    authorization denial being the common case), not only
                    authorization failures; inspect error_type to disambiguate.
         error_type: Exception class name when outcome is "deny", empty 
otherwise.
+        metalake:  Metalake the call named, empty when it used the server's
+                   configured default. Recorded because one server can now
+                   serve several metalakes, so "which tenant did this touch"
+                   is no longer answerable from the server config alone.

Review Comment:
   The audit.emit() docstring says the metalake is empty when the server 
default is used, but AuditMiddleware passes the resolved metalake (including 
defaults) and tests assert it is recorded. Update the docstring to match the 
actual behavior (empty only for non-metalake-scoped tools).



##########
mcp-server/mcp_server/tools/statistic.py:
##########
@@ -36,7 +35,6 @@ async def list_statistics_for_metadata(
 
         Args:
             ctx (Context): The request context.
-            metalake_name (str): The name of the metalake.
             metadata_type (str): The type of metadata (e.g., table, column). 
For
                 more, please refer to too 'metadata_type_to_fullname_formats'

Review Comment:
   Docstring typo: "refer to too" should be "refer to the tool".



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