Uh oh!
There was an error while loading. Please reload this page.
Fix remote_task_handler_kwargs passing handler params to RemoteLogIO - #65957
Conversation
srchilukoori
commented
Apr 29, 2026
jscheffl
commented
Apr 29, 2026
@AutomationDev85 as you filed the bug, can you have a look? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Split remote_task_handler_kwargs into handler-level params (max_bytes,
backup_count, delay) and IO-level params before the provider if/elif
chain. Handler params go to DEFAULT_LOGGING_CONFIG["handlers"]["task"],
IO params go to the RemoteLogIO constructor.
Previously all kwargs were passed to RemoteLogIO (causing TypeError
for attrs-based classes) and then reset to {}, so handler params
never reached FileTaskHandler.
closes: apache#58770…coding
Address review feedback: use inspect.signature(FileTaskHandler.__init__)
to determine which remote_task_handler_kwargs belong to the file handler
vs the RemoteLogIO constructor. Remove dead _io_kwargs = {} reset lines.6e1a6e5 to
b426c40Compare
jscheffl
left a comment
There was a problem hiding this comment.
Looks good to me, @AutomationDev85 Can you have another look?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Backport successfully created: v3-2-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…RemoteLogIO (#65957) (#66440) * Fix remote_task_handler_kwargs passing handler params to RemoteLogIO Split remote_task_handler_kwargs into handler-level params (max_bytes, backup_count, delay) and IO-level params before the provider if/elif chain. Handler params go to DEFAULT_LOGGING_CONFIG["handlers"]["task"], IO params go to the RemoteLogIO constructor. Previously all kwargs were passed to RemoteLogIO (causing TypeError for attrs-based classes) and then reset to {}, so handler params never reached FileTaskHandler. closes: #58770 * Derive FileTaskHandler params dynamically via inspect instead of hardcoding Address review feedback: use inspect.signature(FileTaskHandler.__init__) to determine which remote_task_handler_kwargs belong to the file handler vs the RemoteLogIO constructor. Remove dead _io_kwargs = {} reset lines. * Move inspect and FileTaskHandler imports to top level --------- (cherry picked from commit 823b86e) Co-authored-by: Sadha Chilukoori <srchilukoori@gmail.com> Co-authored-by: Sadha Chilukoori <ssreddy.8555@gmail.com>
…RemoteLogIO (#65957) (#66440) * Fix remote_task_handler_kwargs passing handler params to RemoteLogIO Split remote_task_handler_kwargs into handler-level params (max_bytes, backup_count, delay) and IO-level params before the provider if/elif chain. Handler params go to DEFAULT_LOGGING_CONFIG["handlers"]["task"], IO params go to the RemoteLogIO constructor. Previously all kwargs were passed to RemoteLogIO (causing TypeError for attrs-based classes) and then reset to {}, so handler params never reached FileTaskHandler. closes: #58770 * Derive FileTaskHandler params dynamically via inspect instead of hardcoding Address review feedback: use inspect.signature(FileTaskHandler.__init__) to determine which remote_task_handler_kwargs belong to the file handler vs the RemoteLogIO constructor. Remove dead _io_kwargs = {} reset lines. * Move inspect and FileTaskHandler imports to top level --------- (cherry picked from commit 823b86e) Co-authored-by: Sadha Chilukoori <srchilukoori@gmail.com> Co-authored-by: Sadha Chilukoori <ssreddy.8555@gmail.com>
remote_task_handler_kwargshas two bugs when it contains FileTaskHandlerparams like
max_bytes,backup_count, ordelay:constructor (attrs-based), which rejects unknown params like
max_bytes._handler_kwargsis reset to{}after each RemoteLogIO construction, so handler params never reach
DEFAULT_LOGGING_CONFIG["handlers"]["task"].PR #65412 partially fixed this by correcting the variable name used for the
handler config update, but the kwargs split was still missing.
Root cause:
_handler_kwargswas being passed wholesale to both theRemoteLogIO constructor and the handler config update, with a reset to
{}in between.
Fix: Split
_handler_kwargsinto_file_handler_kwargs(params belongingto
FileTaskHandler.__init__:max_bytes,backup_count,delay) and_io_kwargs(everything else) before the provider if/elif chain. RemoteLogIOgets
_io_kwargs, handler config gets_file_handler_kwargs.This PR continues work from #63594 and #62932, both closed for inactivity.
The approach is the same (static param set split), with reviewer feedback from
those PRs addressed here (coupling guard test, expanded test coverage).
closes: #58770
Was generative AI tooling used to co-author this PR?