You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Daniel Gies (JIRA)" <ji...@apache.org> on 2016/11/09 17:34:58 UTC
[jira] [Created] (AIRFLOW-619) Gantt chart raises exception when
there are running TaskInstances of the DagRun
Daniel Gies created AIRFLOW-619:
-----------------------------------
Summary: 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
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)