jarno-r commented on issue #60860:
URL: https://github.com/apache/airflow/issues/60860#issuecomment-4213720954
> Since we have moved to using dag bundles, you need to set the dag bundle
config list to the directory you have the dags. This test does not use the dag
processor but uses the `AIRFLOW__DAG_PROCESSOR__DAG_BUNDLE_CONFIG_LIST` to know
where you have your dag.
It seems the dag_bundle_config_list isn't a simple list of folders, but JSON
objects. Interestingly, you can just add the environment variable in your dag
test file:
````python
if __name__ == "__main__":
import os
import json
os.environ["AIRFLOW__DAG_PROCESSOR__DAG_BUNDLE_CONFIG_LIST"]=json.dumps(
[{"name":"test",
"classpath": "airflow.dag_processing.bundles.local.LocalDagBundle",
"kwargs":{"path":str(os.path.realpath(__file__))}}])
hello_dag.test()
````
*Note:* Airflow seems to store the dag bundle in the DB, so if you remove
the env variable, it will still remember it, until the DB is reset.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]