Seems like a very reasonable question and a bug - feel free to file a bug
(and fix it :-). The loading of a dag_bag happens in a few places and one
of them seems to be getting triggered in this case.

-s

On Wed, Aug 3, 2016 at 12:58 AM, Wang Yajun <[email protected]> wrote:

> Hi
>
> the airflow initdb failed if dags  file in dag folder reference undefined
> Variables
>
> like that:
>
>
> * from airflow.models import Variable*
> *from airflow import DAG*
> * env = Variable.get('RS_ENV') #Note: RS_ENV is undefined*
>
> *dag = DAG()*
> *....*
>
> it seems that airflow would  load the dag files after  airflow init
> metadata. it seems that this action should init metadata db only,  but  i
> don't understand
> why the airflow must be load the dag files.
>
> thanks!
>

Reply via email to