jason810496 commented on code in PR #66633:
URL: https://github.com/apache/airflow/pull/66633#discussion_r3698259238
##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -119,8 +119,14 @@ def configure_logging(
if mask_secrets:
extra_processors += (mask_logs,)
- if (remote := load_remote_log_handler()) and (remote_processors :=
getattr(remote, "processors")):
- extra_processors += remote_processors
+ # NOTE: Do NOT call getattr(remote, "processors") here.
+ # Accessing remote.processors triggers creation of the remote handler
+ # via a cached_property. The configure_logging() call below runs
dictConfig() internally,
Review Comment:
We don't need to mention the `cached_property` workaround anymore. Since
this PR address the root case.
```suggestion
# The configure_logging() call below runs dictConfig() internally,
```
##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -119,8 +119,14 @@ def configure_logging(
if mask_secrets:
extra_processors += (mask_logs,)
- if (remote := load_remote_log_handler()) and (remote_processors :=
getattr(remote, "processors")):
- extra_processors += remote_processors
+ # NOTE: Do NOT call getattr(remote, "processors") here.
+ # Accessing remote.processors triggers creation of the remote handler
+ # via a cached_property. The configure_logging() call below runs
dictConfig() internally,
Review Comment:
We don't need to mention the `cached_property` workaround anymore. Since
this PR address the root cause.
```suggestion
# The configure_logging() call below runs dictConfig() internally,
```
--
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]