airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Bandy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-3299) Logs for currently running sensors not visible in the UI
Date Thu, 08 Nov 2018 14:39:00 GMT

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

Chris Bandy commented on AIRFLOW-3299:
--------------------------------------

Possibly related to AIRFLOW-2143?

> Logs for currently running sensors not visible in the UI
> --------------------------------------------------------
>
>                 Key: AIRFLOW-3299
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3299
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: ui
>            Reporter: Brad Holmes
>            Priority: Major
>
> When a task is actively running, the logs are not appearing.  I have tracked this down
to the {{next_try_number}} logic of task-instances.
> In [the view at line 836|https://github.com/apache/incubator-airflow/blame/master/airflow/www/views.py#L836],
we have
> {code:java}
> logs = [''] * (ti.next_try_number - 1 if ti is not None else 0)
> {code}
> The length of the {{logs}} array informs the frontend on the number of {{attempts}} that
exist, and thus how many AJAX calls to make to load the logs.
> Here is the current logic I have observed
> ||Task State||Current length of 'logs'||Needed length of 'logs'||
> |Successfully completed in 1 attempt|1|1|
> |Successfully completed in 2 attempt|2|2|
> |Not yet attempted|0|0|
> |Actively running task, first time|0|1|
> That last case is the bug.  Perhaps task-instance needs a method like {{most_recent_try_number}}
?  I don't see how to make use of {{try_number()}} or {{next_try_number()}} to meet the need
here.
> ||Task State||try_number()||next_try_number()||Number of Attempts _Should_ Display||
> |Successfully completed in 1 attempt|2|2|1|
> |Successfully completed in 2 attempt|3|3|2|
> |Not yet attempted|1|1|0|
> |Actively running task, first time|0|1|1|
> [~ashb] : You implemented this portion of task-instance 11 months ago.  Any suggestions?
 Or perhaps the problem is elsewhere?



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

Mime
View raw message