I have a setup where several dags (e.g. "dags/dag1.py", "dags/dag2.py") import from other python files in the dags folder (e.g. "dags/settings.py" and others). I'm getting error messages in the web UI like:
Broken DAG: [/home/airflow/gcs/dags/dag1.py] No module named settings
The dags aren't loaded in the UI properly -- I can see them but can't run them and there is an error message like "This DAG seems to be existing only locally. The master scheduler doesn't seem to be aware of its existence.”
If I run "list_dags", all the dags are imported fine with no errors, and I can run the same code locally in Airflow with no issues.
In the past, in Composer we had errors like this that would come and go kind of unpredictably, but now I can't seem to get things to work at all. Is it safe to use import statements (e.g. "from settings import foo") for Python modules we copy into the dags folder? It's strange that this usually works for us, but sometimes doesn't.
Terry