AutomationDev85 commented on code in PR #65957:
URL: https://github.com/apache/airflow/pull/65957#discussion_r3180597612
##########
airflow-core/src/airflow/config_templates/airflow_local_settings.py:
##########
@@ -159,7 +159,18 @@ def _default_conn_name_from(mod_path, hook_name):
"logging/remote_task_handler_kwargs must be a JSON object (a
python dict), we got "
f"{type(remote_task_handler_kwargs)}"
)
- _handler_kwargs = cast("dict[str, Any]", remote_task_handler_kwargs)
+ _all_kwargs = cast("dict[str, Any]", remote_task_handler_kwargs)
+ # Dynamically determine which kwargs belong to FileTaskHandler vs
RemoteLogIO.
+ import inspect
+
+ from airflow.utils.log.file_task_handler import FileTaskHandler
Review Comment:
As part of the parameter validation that happens when arguments are added to
FileHandler near the end of the file, I think we need to import the class which
is actually defined at
https://github.com/srchilukoori/airflow/blob/b426c4090d40e46dd4426360811a8db2e10722c2/airflow-core/src/airflow/config_templates/airflow_local_settings.py#L78
##########
airflow-core/src/airflow/config_templates/airflow_local_settings.py:
##########
@@ -159,7 +159,18 @@ def _default_conn_name_from(mod_path, hook_name):
"logging/remote_task_handler_kwargs must be a JSON object (a
python dict), we got "
f"{type(remote_task_handler_kwargs)}"
)
- _handler_kwargs = cast("dict[str, Any]", remote_task_handler_kwargs)
+ _all_kwargs = cast("dict[str, Any]", remote_task_handler_kwargs)
+ # Dynamically determine which kwargs belong to FileTaskHandler vs
RemoteLogIO.
+ import inspect
Review Comment:
I think we can move this import to the top level imports.
--
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]