This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Dag.test causes Logging Recurison when run as a Python Task (Celery) #30029
Labels
area:core
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Apache Airflow version
2.5.1
What happened
Executor: Celery
Airflow V 2.5.1
Platform: Python 3.9
OS: ubuntu20.04
Hi team, this one is pretty wild.
In order to integrate with our CICD, we run Pytest as a Task inside a Dag like so
This has been working great! And I was excited to use the new
dag.test
command to run our test dags inside the pipeline. Unfortunately, if youdag.test
any Dag with dynamically mapped tasks, the logging system triggers a recursive exception.You can easily recreate this behavior by creating the following test case
And then executing it as a task using the above
run_pytest
. You'll see a stack trace likeetc etc. You can see the cycle between
flush
andpropagate_log
What you think should happen instead
It would be nice to be able to run a Dag.test command inside a PythonOperator Task so we can easily run pytest as a remotely triggered Dag.
How to reproduce
Operating System
ubuntu20.04
Versions of Apache Airflow Providers
You don't need any providers to reproduce
Deployment
Docker-Compose
Deployment details
Running scheduler, worker, webserver, and Redis, are inside a local docker compose. Single worker container with default Celery settings.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: