Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: Passing filename_template to FileTaskHandler is deprecated and has no effect #25743

Closed
1 of 2 tasks
mschweder opened this issue Aug 16, 2022 · 1 comment · Fixed by #25764
Closed
1 of 2 tasks
Labels
area:core kind:bug This is a clearly a bug

Comments

@mschweder
Copy link

mschweder commented Aug 16, 2022

Apache Airflow version

2.3.3

What happened

After upgrading or installing airflow 2.3.3 the remote_logging in airflow.cfg cant be set to true without creating depreciation warning.
I'm using remote logging to an s3 bucket.
It doesn't matter which version of apache-airflow-providers-amazon i have installed.

When using systemd units to start the airflow components, the webserver will spam the depreciation warning every second.

Tested with Python 3.10 and 3.7.3

What you think should happen instead

When using the remote logging
It should not execute an action every second in the background which seems to be deprecated.

How to reproduce

You could quickly install an Python virtual Environment on a machine of you choice.
After that install airflow and apache-airflow-providers-amazon over pip

Then change the logging part in the airflow.cfg:
[logging]
remote_logging = True

create a testdag.py containing at least: from airflow import DAG

run it with Python to see the errors:
python testdag.py

hint: some more deprecationWarnings will appear because the standard airflow.cfg which get created when installing airflow is not the current state.

The Deprication warning you should see when turning remote_logging to true is:
.../lib/python3.10/site-packages/airflow/utils/log/file_task_handler.py:52 DeprecationWarning: Passing filename_template to FileTaskHandler is deprecated and has no effect

Operating System

Debian GNU/Linux 10 (buster) and also tested Fedora release 36 (Thirty Six)

Versions of Apache Airflow Providers

apache-airflow-providers-amazon 4.0.0

Deployment

Virtualenv installation

Deployment details

Running a small setup. 2 Virtual Machines. Airflow installed over pip inside a Python virtual environment.

Anything else

The Problem occurs every dag run and it gets logged every second inside the journal produced by the webserver systemd unit.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mschweder mschweder added area:core kind:bug This is a clearly a bug labels Aug 16, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 16, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant