You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/22 23:06:51 UTC

[GitHub] [airflow] potiuk opened a new issue #18449: Silent failure when running `airflow db init`

potiuk opened a new issue #18449:
URL: https://github.com/apache/airflow/issues/18449


   ### Discussed in https://github.com/apache/airflow/discussions/18408
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **ziplokk1** September 21, 2021</sup>
   Hey folks,
   
   I've come across an issue where when attempting to run migrations against a clean database, but with existing dags defined in my dags folder, there's a silent failure and the migration exits with the `airflow` command usage prompt saying "invalid command 'db'". 
   
   I got to digging and the culprit was the [following line](https://github.com/apache/airflow/blob/main/airflow/migrations/versions/cc1e65623dc7_add_max_tries_column_to_task_instance.py#L73).
   
   I'm almost positive that this has to do with an erroneous `.py` file in my dags folder (I have yet to dig deeper into the issue), but this begged the question of why is the migration is reading the dags to migrate existing data in the database in the first place? Shouldn't the migration simply migrate the data regardless of the state of the dag files themselves?
   
   I was able to fix the issue by changing the line in the link above to `dagbag = DagBag(read_dags_from_db=True)` but I'd like to see if there was any context behind reading the dag file instead of the database before opening a PR.</div>


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #18449: Silent failure when running `airflow db init`

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #18449:
URL: https://github.com/apache/airflow/issues/18449


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org