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/04/07 10:05:05 UTC

[GitHub] [airflow] TColl opened a new issue #15248: Clear notification in UI when duplicate dag names are present

TColl opened a new issue #15248:
URL: https://github.com/apache/airflow/issues/15248


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Description**
   
   When using decorators to define dags, e.g. dag_1.py:
   
   ```python
   from airflow.decorators import dag, task
   from airflow.utils.dates import days_ago
   
   DEFAULT_ARGS = {
       "owner": "airflow",
   }
   
   
   @task
   def some_task():
       pass
   
   
   @dag(
       default_args=DEFAULT_ARGS,
       schedule_interval=None,
       start_date=days_ago(2),
   )
   def my_dag():
       some_task()
   
   
   DAG_1 = my_dag()
   
   ```
   
   and
   
   dag_2.py:
   
   ```python
   from airflow.decorators import dag, task
   from airflow.utils.dates import days_ago
   
   DEFAULT_ARGS = {
       "owner": "airflow",
   }
   
   
   @task
   def some_other_task():
       pass
   
   
   @dag(
       default_args=DEFAULT_ARGS,
       schedule_interval=None,
       start_date=days_ago(2),
   )
   def my_dag():
       some_other_task()
   
   
   DAG_2 = my_dag()
   
   ```
   
   We have two different dags which have been written in isolation, but by sheer bad luck both define `my_dag()`. This seems fine for each file in isolation, but on the airflow UI, we only end up seeing one entry for `my_dag`, where it has picked up `dag_1.py` and ignored `dag_2.py`.
   
   **Use case / motivation**
   
   We currently end up with only one DAG showing up on the UI, and no indication as to why the other one hasn't appeared.
   
   Suggestion: popup similar to 'DAG import error' to highlight what needs changing in one of the DAG files in order for both to show up ("DAG import error: duplicate dag names found - please review {duplicate files} and ensure all dag definitions are unique"?)
   
   **Are you willing to submit a PR?**
   
   No time to spare on this at present
   
   **Related Issues**
   
   I haven't found any related issues with the search function.


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

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



[GitHub] [airflow] uranusjr commented on issue #15248: Clear notification in UI when duplicate dag names are present

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #15248:
URL: https://github.com/apache/airflow/issues/15248#issuecomment-815974761


   I plan to look into this.


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

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



[GitHub] [airflow] kaxil closed issue #15248: Clear notification in UI when duplicate dag names are present

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #15248:
URL: https://github.com/apache/airflow/issues/15248


   


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

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15248: Clear notification in UI when duplicate dag names are present

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15248:
URL: https://github.com/apache/airflow/issues/15248#issuecomment-814786077


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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

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