EnableServices opened a new issue, #54414: URL: https://github.com/apache/airflow/issues/54414
https://github.com/apache/airflow/blob/367d8680af355b492f256ab86aa738f9ee292f2f/airflow-core/src/airflow/logging_config.py#L77 The method import_string in utils expects a string containing a dot, but following the rework of load_logging_config() it is passed the module name alone: ``` py else: modpath = logging_class_path.rsplit(".", 1)[0] try: mod = import_string(modpath) REMOTE_TASK_LOG = getattr(mod, "REMOTE_TASK_LOG") DEFAULT_REMOTE_CONN_ID = getattr(mod, "DEFAULT_REMOTE_CONN_ID", None) except Exception as err: log.info("Remote task logs will not be available due to an error: %s", err) ``` (modpath is just set to log_config here) The previous code concatenated the REMOTE_TASK_LOG string onto the log_config module prior to reading: ``` py else: mod = logging_class_path.rsplit(".", 1)[0] try: remote_task_log = import_string(f"{mod}.REMOTE_TASK_LOG") REMOTE_TASK_LOG = remote_task_log except Exception as err: log.info("Remote task logs will not be available due to an error: %s", err) ``` For systems implementing a custom log_config this change prevents the triggerer from starting. Snippet from airflow.cfg: ``` txt [logging] logging_config_class = log_config.LOGGING_CONFIG ``` config/log_config.py contents: ``` py from copy import deepcopy from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG LOGGING_CONFIG = deepcopy(DEFAULT_LOGGING_CONFIG) LOGGING_CONFIG["handlers"]["task"] = { "class": "airflow.providers.redis.log.redis_task_handler.RedisTaskHandler", "conn_id": "redis_default", "ttl_seconds": 259200, "base_log_folder": "/opt/pyenvs/airflow/logs", } REMOTE_TASK_LOG = None ``` -- 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]
