You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2018/11/05 17:03:00 UTC
[jira] [Commented] (AIRFLOW-3299) Logs for currently running tasks
fail to load
[ https://issues.apache.org/jira/browse/AIRFLOW-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675430#comment-16675430 ]
Ash Berlin-Taylor commented on AIRFLOW-3299:
--------------------------------------------
When you say "not appearing" what do you mean? Could you provide a screen shot too?
> Logs for currently running tasks fail to load
> ---------------------------------------------
>
> 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)