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 2020/01/21 00:54:44 UTC

[GitHub] [airflow] xinbinhuang commented on a change in pull request #7170: [AIRFLOW-6562] mushroom cloud error when clicking 'mark failed/success' from graph view of dag that has never been run yet

xinbinhuang commented on a change in pull request #7170: [AIRFLOW-6562] mushroom cloud error when clicking 'mark failed/success' from graph view of dag that has never been run yet
URL: https://github.com/apache/airflow/pull/7170#discussion_r368770447
 
 

 ##########
 File path: airflow/api/common/experimental/mark_tasks.py
 ##########
 @@ -102,6 +102,10 @@ def set_state(
     if dag is None:
         raise ValueError("Received tasks with no DAG")
 
+    latest_execution_date = dag.latest_execution_date
+    if latest_execution_date is None:
+        return []
+
 
 Review comment:
   This whole snippet should be modified inside `get_execution_dates`. 
   https://github.com/apache/airflow/blob/2eff0e750f5a0cfde6bb68af215631f781e8fd90/airflow/api/common/experimental/mark_tasks.py#L248-L250
   
   Also, isn't the original behavior (throwing an error) intended?

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


With regards,
Apache Git Services