andscoop commented on issue #3796: [AIRFLOW-2824] - Add config to disable 
default conn creation
URL: 
https://github.com/apache/incubator-airflow/pull/3796#issuecomment-416944894
 
 
   @ashb I made an assumption that the [logic happening after the example 
connection 
creation](https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L289)
 was necessary for a database initialization. For the most part, this does not 
appear to be the case.
   
   I think this brings up the larger question, should the project continue to 
support both `airflow initdb` and `airflow upgradedb` in their current forms? 
It appears that `upgradedb` does the work a user expects out of `initdb` and 
that the extra logic in `initdb` is not necessary to initialization the 
database. 
   
   ie.
   
   [Creation of example 
chart](https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L310)
   
   [Pre-loading of DAG 
table](https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L303)
   
   
   There are two other core pieces of logic inside of `initdb` that I am unsure 
of. Is the [loading of the known event 
types](https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L289)
 on database initialization necessary? It does not appear to be used beyond a 
single call at app creation time. If it is necessary the logic should be 
combined with `upgrade db`
   
   I am also unsure of the [RBAC 
piece](https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L328)
 inside of `initdb`.  If this is necessary we should combine with `upgrade db`.
   
   
   I am happy to pivot this ticket into consolidation of these two methods, but 
would like to hear thoughts from maintainers first.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to