potiuk commented on code in PR #73791:
URL: https://github.com/apache/airflow/pull/73791#discussion_r4179548987


##########
airflow-core/src/airflow/api_fastapi/logging/decorators.py:
##########
@@ -246,6 +258,8 @@ async def log_action(
             extra_fields = _mask_variable_fields(request_body or extra_fields)
         elif "connection" in event_name:
             extra_fields = _mask_connection_fields(request_body or 
extra_fields)
+        elif "xcom" in event_name:
+            extra_fields = _mask_xcom_fields(request_body or extra_fields)

Review Comment:
   Good catch, thank you — you're right: the XCom branch replaced the 
path/query context with the body, so an update row lost `xcom_key`. Fixed in 
fba6f3e95b by merging the masked body into the existing `extra_fields` 
(`_mask_xcom_fields({**extra_fields, **masked_body_json})`), as you suggested. 
`test_patch_xcom_entry_audit_log_masks_value` now also asserts that `xcom_key` 
is kept.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting



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