[ 
https://issues.apache.org/jira/browse/AIRFLOW-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17351190#comment-17351190
 ] 

sulphide commented on AIRFLOW-2268:
-----------------------------------

just wanted to check in on this again. we're having issues with it again on 
1.10.0.

> upgradedb is not idempotent
> ---------------------------
>
>                 Key: AIRFLOW-2268
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2268
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: database
>    Affects Versions: 1.9.0
>            Reporter: sulphide
>            Priority: Major
>              Labels: mysql
>
> if upgradedb fails in the middle and you try to run it again you can receive 
> fatal errors, e.g.:
> (from upgradedb for airflow 1.9)
> sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1060, 
> "Duplicate column name 'max_tries'") [SQL: u"ALTER TABLE task_instance ADD 
> COLUMN max_tries INTEGER DEFAULT '-1'"]
> solution: make upgradedb idempotent by using transactions that rollback on 
> failure.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to