[ 
https://issues.apache.org/jira/browse/AIRFLOW-870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bolke de Bruin resolved AIRFLOW-870.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.8.0

> Airflow Web UI "Mark Success" action not working properly
> ---------------------------------------------------------
>
>                 Key: AIRFLOW-870
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-870
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.8
>            Reporter: Yi Chen
>             Fix For: 1.8.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I have found a few issues and some ideas of resolving them:
> 1) *Issue*: In Web UI, if click Mark Success of a task that has not been 
> processed(a.k.a any white box in list view), I get "No task instances to mark 
> as successful" error message.
> *Reason*: A task that has not been processed has a record in the table 
> task_instance with state column value as NULL. Then, here 
> https://github.com/apache/incubator-airflow/blob/v1-8-stable/airflow/www/views.py#L1146
>  , this line filters out not only the case `TI.state = State.SUCCESS` but 
> also the case `TI.state is NULL`. 
> *Solution*: make this line as ` or_((TI.state.is_(None)), TI.state != 
> State.SUCCESS)).all()` 
> 2) *Issue*: Not clear why we need a new option in "Mark Success" -- the 
> "Recursive" option. I think we used to have the option "DownStream" or 
> "UpStream" with recursive searching. Can anyone explain the design and double 
> check the implementation? Right now, if I do not choose "Recursive" option 
> with the "DownStream". I get KeyError in this line 
> https://github.com/apache/incubator-airflow/blob/v1-8-stable/airflow/www/views.py#L1188.
>  
> *Reason*: In this line, 
> https://github.com/apache/incubator-airflow/blob/v1-8-stable/airflow/www/views.py#L1122
>  , We actually have got the relatives from recursive searching already, and 
> the task_ids is populated, but task_id_to_dag is not populated properly if  
> "Recursive" option is not chosen. Therefore a KeyError show up later as 
> mentioned above.
> *Solution*: I think we have to discuss the design of the desired behavior of 
> each option and refactor code w.r.t.the design.
> [This is my first Apache JIRA ticket. Feel free to point out any mistakes in 
> reporting and describing issues if I have any.]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to