You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Diederik Perdok (Jira)" <ji...@apache.org> on 2019/10/17 15:40:00 UTC

[jira] [Comment Edited] (AIRFLOW-4431) Gantt chart tab do not showing

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

Diederik Perdok edited comment on AIRFLOW-4431 at 10/17/19 3:39 PM:
--------------------------------------------------------------------

I ran into the same problem, so it is not fixed in 1.10.4.

For me the problem is caused by the presence of a task failure without start_date and duration. A task_instance for the same task_id does exist, and has state success and a valid start_date, end_date and duration. When viewing the Gantt chart, this task failure is included, but this fails due to the missing start_date.

The fix should not be that difficult, but I would first like to understand how the db can be put in this state. At first I thought this could be done by failing a task through the UI before it started, but this does not result in a new record in task_failure. I have tried other ways, but I have not been able to reproduce it myself.  I will talk to the user who reported the problem to me; hopefully he can tell me the exact steps that led up to this state.


was (Author: diederikwp):
I ran into the same problem, so it is not fixed in 1.10.4 (haven't tried 1.10.5 yet, but looking at the code I'm sure the same bug exists in 1.10.5 as well).

I believe the steps to reproduce are as follows:
 # Start a new dag run
 # Fail a task before it has had a chance to run
 # Clear this task and wait for it to start running
 # Try to view the Gantt chart

Now there exists a task instance which has a start_date, and a task failure for the same task_id which does not have a start_date. This task failure is included in the Gantt chart (because the _task instance_ does have a start_date), but it shouldn't be.

I will submit a PR before the end of next week.

BTW while the above steps do reproduce [AIRFLOW-4431|https://issues.apache.org/jira/browse/AIRFLOW-4431] they do not reproduce [AIRFLOW-4432|https://issues.apache.org/jira/browse/AIRFLOW-4432], probably because that was already fixed in [AIRFLOW-4409|https://issues.apache.org/jira/browse/AIRFLOW-4409].

> Gantt chart tab do not showing
> ------------------------------
>
>                 Key: AIRFLOW-4431
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4431
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: webserver
>    Affects Versions: 1.10.3
>         Environment: Ubuntu 16
> Python 3.5.2
>            Reporter: Dmytro Kulyk
>            Assignee: Diederik Perdok
>            Priority: Major
>              Labels: gantt
>
> There is an error when opening Gantt chart in WebUI
> {code}
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
>     response = self.full_dispatch_request()
>   File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
>     raise value
>   File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
>     rv = self.dispatch_request()
>   File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 69, in inner
>     return self._run_view(f, *args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 368, in _run_view
>     return fn(self, *args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/flask_login/utils.py", line 261, in decorated_view
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/www/utils.py", line 275, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/utils/db.py", line 73, in wrapper
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/airflow/www/views.py", line 1988, in gantt
>     'startDate': wwwutils.epoch(start_date),
>   File "/usr/local/lib/python3.5/dist-packages/airflow/www/utils.py", line 245, in epoch
>     return int(time.mktime(dttm.timetuple())) * 1000,
> AttributeError: 'NoneType' object has no attribute 'timetuple'
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)