You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sumit Maheshwari (JIRA)" <ji...@apache.org> on 2016/11/11 04:39:58 UTC

[jira] [Resolved] (AIRFLOW-619) Gantt chart raises exception when there are running TaskInstances of the DagRun

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

Sumit Maheshwari resolved AIRFLOW-619.
--------------------------------------
    Resolution: Fixed

Issue resolved by pull request #1874
[https://github.com/apache/incubator-airflow/pull/1874]

> Gantt chart raises exception when there are running TaskInstances of the DagRun
> -------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-619
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-619
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 2.0
>            Reporter: Daniel Gies
>              Labels: gantt
>
> If you view the Gantt chart for a DagRun while there are TaskInstances still running, the Gantt chart throws an exception calling isoformat() on None because the task instance has no end_date
> {code}
> Traceback (most recent call last):
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
>     response = self.full_dispatch_request()
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
>     rv = self.dispatch_request()
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask_admin/base.py", line 68, in inner
>     return self._run_view(f, *args, **kwargs)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask_admin/base.py", line 367, in _run_view
>     return fn(self, *args, **kwargs)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/flask_login.py", line 755, in decorated_view
>     return func(*args, **kwargs)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/airflow/www/utils.py", line 125, in wrapper
>     return f(*args, **kwargs)
>   File "/home/dgies/airflow/venv/lib/python2.7/site-packages/airflow/www/views.py", line 1701, in gantt
>     'isoEnd': ti.end_date.isoformat()[:-4],
> AttributeError: 'NoneType' object has no attribute 'isoformat'
> {code}
> Proposed fix is to use `ti.end_date or datetime.now()` everywhere ti.end_date is used in the view.  This problem doesn't seem to affect any of the other views, only Gantt.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)