Skip to content

Task SDK cannot upload remote logs due to missing handlers #47634

@ianbuss

Description

@ianbuss

Apache Airflow version

3.0.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

The configure_logging method in the task sdk overwrites the configured Airflow loggers from airflow.logging_config, which makes it look like the airflow.task logger has no handlers. This prevents the _upload_logs function from being able to update logs.

A potential fix is to cache the configured handler for airflow.task before the task sdk supervise method and use that cached handler. A longer term fix is to not use the derived handlers but to read the logging configuration directly in the supervise method to instantiate the correct log upload functionality.

What you think should happen instead?

The task sdk superviser should be able to use the configured remote loggers.

How to reproduce

Run any executor with logging.remote_logging=True and a configured remote logging configuration.

Operating System

Debian GNU/Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

area:corearea:loggingkind:bugThis is a clearly a bugpriority:highHigh priority bug that should be patched quickly but does not require immediate new release

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions