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)

Reply via email to