apache airflow initdb fails at kubernetes_resource_checkingpoint for mysql

There is an open bug in airflow bug tracker.

https://issues.apache.org/jira/browse/AIRFLOW-4995.

As a workaround, you may apply the proposed changes in pull request manually.

Update: This bug is fixed in airflow version: 1.10.4


I run into exactly same issue. Someone knows what to do?

BTW, I run into another issue, complaining that dag_stats table already exist while resetting db. I had to manually drop dag_stats to make resetting go through that step. But still blocked on this constraint.

CREATE TABLE kube_resource_version (
    one_row_id BOOL NOT NULL DEFAULT true,
    resource_version VARCHAR(255),
    PRIMARY KEY (one_row_id),
    CONSTRAINT kube_resource_version_one_row_id CHECK (one_row_id),
    CHECK (one_row_id IN (0, 1))
)