dag processor deletes import errors of other dag processors thinking the files don't exist #35949
Closed
2 tasks done
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
main (development)
What happened
When dag processor starts with a sub directory to process then the import errors are recorded with that path. So when there is processor for airflow-dag-processor-0 folder in order to remove import errors it lists all files under airflow-dag-processor-0 folder and deletes those not present. This becomes an issue when there is airflow-dag-processor-1 that records import errors whose files won't be part of airflow-dag-processor-0 folder.
What you think should happen instead
The fix would be to have processor_subdir stored in ImportError table so that during querying we only look at import errors relevant to the dag processor and don't delete other items. A fix similar to #33357 needs to be applied for import errors as well.
How to reproduce
~/airflow/dags/airflow-dag-processor-0/sample_sleep.py
. Start a dag processor with -S to process "~/airflow/dags/airflow-dag-processor-0/" . Import error should be present.~/airflow/dags/airflow-dag-processor-1/sample_sleep.py
. Start a dag processor with -S to process "~/airflow/dags/airflow-dag-processor-1/". Import error for airflow-dag-processor-0 is deleted.Operating System
Ubuntu
Versions of Apache Airflow Providers
No response
Deployment
Virtualenv installation
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: