You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Josh Carp (JIRA)" <ji...@apache.org> on 2019/05/06 14:04:00 UTC

[jira] [Created] (AIRFLOW-4464) Fix case-insensitive id columns in mysql

Josh Carp created AIRFLOW-4464:
----------------------------------

             Summary: Fix case-insensitive id columns in mysql
                 Key: AIRFLOW-4464
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4464
             Project: Apache Airflow
          Issue Type: Improvement
            Reporter: Josh Carp
            Assignee: Josh Carp


By default, string comparisons in mysql are case-insensitive, so the task ids "foo" and "FOO" are treated as identical. This means that a dag with those task ids will fail to schedule with a sqlalchemy `IntegrityError` using mysql, but not postgres or sqlite. This situation probably doesn't happen often, and users probably shouldn't use task ids that are identical except for case, but I think we should improve the behavior here. A few options:

 
 * Configure sqlalchemy to use a binary collation for string id columns under mysql so that string comparisons are case-sensitive.
 * Require dag and task ids to be unique regardless of case. This would be a breaking change.
 * Document that mysql users should configure mysql to use binary collations for string types by default. This would still show users a 500 if the database isn't configured correctly.

 

I'll submit a pull request with a failing unit test to describe the issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)