You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/01 11:13:46 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #19257: fix: dag_id and task_id non ascii char

potiuk commented on a change in pull request #19257:
URL: https://github.com/apache/airflow/pull/19257#discussion_r740134367



##########
File path: airflow/models/dag.py
##########
@@ -368,8 +369,11 @@ def __init__(
                 DeprecationWarning,
                 stacklevel=2,
             )
-
-        validate_key(dag_id)
+        
+        if not is_ascii(dag_id):
+            # slugify dag id
+            dag_id = slugify(dag_id, lowercase=False)

Review comment:
       @dstandish - missed the comment - but yeah that's the plan - to have different ids in the db. 
   
   The problem is that current we have that limitation (all dag IDs are ASCII). And that in some cases (MySQL) we will not be able to get rid of that (UTF-8mb4 indexes are too big even for MySQL 8).
   
   So yeah i t means that in UI the I'd will be different. I was pretty ok so far with this but your point might be valid - i am not sure really how bad it would be for those IDs to be different. I can't immediately see any obvious problem here (of course when you integrate with it via API etc. You need to use different I'd but when you query/list etc. You will see the slugified dag id).
   
   Why do you think it will be a problem ? 




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org