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 2023/01/03 05:23:59 UTC

[GitHub] [airflow] uranusjr commented on pull request #28183: allows users to write dag_id and task_id in their national characters, added display name for dag / task

uranusjr commented on PR #28183:
URL: https://github.com/apache/airflow/pull/28183#issuecomment-1369406739

   I like the general direction this takes. The only part I _don’t_ like is it silently slugifies the IDs. This does create some backward incompatibility issues (can be eliminated if we only slugify if the ID is not valid as-is), but more importantly, can result in som weird usability issues, such as ID conflicts when there are no actually conflicting IDs (because the slugified IDs conflict). This could be improved by improving error messages to report the original (user-supplied) value instead of the slugified one. Another further issue with this is it won’t be possible for the user to work around this slugified ID conflict. One possible solution would be to make the API more explicit, such as:
   
   ```python
   # This would generate an auto slugified ID.
   DAG(dag_name="いろはにほへと")
   
   # But I can supply my own ID.
   DAG(dag_name="いろはにほへと", dag_id="my_dag")
   ```


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