liwenjie200543 opened a new pull request, #75029:
URL: https://github.com/apache/airflow/pull/75029

   ### What
   
   `process_log_messages_from_subprocess` spreads every remaining key of a 
subprocess log event into `_log_to_target(target, level, msg, **event)`. A log 
event carrying a key named `target` or `msg` collides with the helper's own 
parameter names and raises `TypeError`. Nothing in the supervisor loop catches 
it, so the heartbeat stops, the child process (in its own process group) is 
never killed, and a successful task is recorded as failed — the repro and trace 
are in the issue.
   
   This makes the first three parameters positional-only (`/`), so event keys 
can no longer collide with them and every key is forwarded as a kwarg. 
Non-reserved keys (`environment=` etc.) behave exactly as before.
   
   ### Checks
   
   - Reproduced locally against the exact upstream functions with structlog 
26.1.0 + msgspec: `target=`/`msg=` events raised `TypeError` before the change 
and are forwarded unchanged after it; a real structlog logger renders 
`target=prod` / `msg=prod` as expected.
   - `_log_to_target` has two call sites 
(`process_log_messages_from_subprocess` and `forward_to_log`), both pass the 
first three arguments positionally, so the `/` marker changes no existing call.
   - Added a regression test asserting both reserved-key events are logged 
without error.
   
   Fixes: #75017


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