You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/13 07:22:00 UTC

[jira] [Commented] (AIRFLOW-3690) Fix api.common.experimental.mark_tasks.set_state for manually-triggered DAG Runs

    [ https://issues.apache.org/jira/browse/AIRFLOW-3690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741481#comment-16741481 ] 

ASF GitHub Bot commented on AIRFLOW-3690:
-----------------------------------------

XD-DENG commented on pull request #4504: [AIRFLOW-3690] Fix api.common.experimental.mark_tasks.set_state for manually-triggered DAG Runs
URL: https://github.com/apache/airflow/pull/4504
 
 
   ### Jira
   
     - https://issues.apache.org/jira/browse/AIRFLOW-3690
   
   ### Description
   
   `set_state` function removes microsecond information from the exectution_date before
   further query from the database. However, microsecond is stored in the task_instance table. So all task instances of manually-triggered DAG Runs can not be queried successfully inside the set_state function.
   
   The result is: for all the manually-triggered DAG Runs, if users try to mark state of a task instance, it will fail because no corresponding records can be found. 
   
   This doesn't impact any scheduled DAG Runs since the microsecond in their execution_date is 0.
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Fix api.common.experimental.mark_tasks.set_state for manually-triggered DAG Runs
> --------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-3690
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3690
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: api
>            Reporter: Xiaodong DENG
>            Assignee: Xiaodong DENG
>            Priority: Major
>
> Line [https://github.com/apache/airflow/pull/2085/files#diff-4a8a799d7af166d79e74a8a3587e6171R75|https://github.com/apache/airflow/pull/2085/files#diff-4a8a799d7af166d79e74a8a3587e6171R75,]  removes microsecond information from the execution_date in the set_state function. But this will fail the query when it tries to look for all th valid execution_dates in the database, because microsecond is stored in the database.
>  
> The result is: for all the manually-triggered DAG Runs, if users try to mark state of a task instance, it will fail because no corresponding records can be found. 
>  
> This doesn't impact any scheduled DAG Runs since the microsecond in their execution_date is 0.
>  
> Actually someone already reported this in the original GitHub PR: [https://github.com/apache/airflow/pull/2085#issuecomment-297713635]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)