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 2022/10/26 07:05:50 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #27145: Add support for DAG display name different than dag_id
uranusjr commented on code in PR #27145:
URL: https://github.com/apache/airflow/pull/27145#discussion_r1005296303
##########
airflow/models/dag.py:
##########
@@ -451,6 +453,7 @@ def __init__(
max_active_tasks = concurrency
self._max_active_tasks = max_active_tasks
self._pickle_id: int | None = None
+ self._display_name = dag_id if display_name is None else display_name
Review Comment:
I think what Elad meant is the user should be able to just do something like
```python
DAG(name="俺のダッグ")
```
and _internally_ Airflow would automatically generate a `dag_id` for it (say with `uuid`). Since (ideally) all user-facing interface would just show the user-friendly name, the auto-generated ID can be basically anything and wouldn’t matter to the user at all. And if the user does care, they can always still pass in a custom `dag_id` explicitly:
```python
DAG(dag_id="my_dag", name="俺のダッグ")
```
--
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