msardana94 edited a comment on issue #13679: URL: https://github.com/apache/airflow/issues/13679#issuecomment-763236068
Yes I just realized container names were duplicated (sorry an oversight on my part; fixed it). If you look at steps to reproduce mentioned in description, I don't use webserver and/or scheduler (just edited it to remove it altogether). The error happens while running `airflow db upgrade`. I have also pin pointed specific line of code which I believe is incorrectly written resulting in this error. After looking more into it, duplicate connection [check](https://github.com/apache/airflow/blob/ab5f770bfcd8c690cbe4d0825896325aca0beeca/airflow/utils/db.py#L618) will always raise an error whether or not there are duplicated connections because of invalid orm query (which gets resolved to sql specified in logs in description of issue). > And I am not sure why you had initdb and upgradedb both. Running `airflow db upgrade` when tables aren't setup yet appropriately raises an `ProgrammingError` exception as mentioned in comment [here](https://github.com/apache/airflow/blob/ab5f770bfcd8c690cbe4d0825896325aca0beeca/airflow/utils/db.py#L619). However, when tables are setup, it should _not_ raise any exception right? That's why I am running `db init` and then `db upgrade` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
