You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Dan Davydov (JIRA)" <ji...@apache.org> on 2017/02/27 19:05:45 UTC

[jira] [Created] (AIRFLOW-919) Setting a task to running manually breaks a DAGs UI

Dan Davydov created AIRFLOW-919:
-----------------------------------

             Summary: Setting a task to running manually breaks a DAGs UI
                 Key: AIRFLOW-919
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-919
             Project: Apache Airflow
          Issue Type: Bug
          Components: webserver
            Reporter: Dan Davydov


If you set a task instance with no start date to the RUNNING state manually (e.g. in the CRUD), you get the following traceback due to the lack of a start date for the task instance:

{code}
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 68, in inner
    return self._run_view(f, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 367, in _run_view
    return fn(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 221, in view_func
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 125, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 1248, in tree
    'children': [recurse_nodes(t, set()) for t in dag.roots],
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 1235, in recurse_nodes
    for d in dates],
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 1224, in set_duration
    d = datetime.now() - dateutil.parser.parse(tid["start_date"])
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 1164, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 552, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 671, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 188, in split
    return list(cls(s))
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 184, in next
    return self.__next__()  # Python 2.x support
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 177, in __next__
    token = self.get_token()
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 93, in get_token
    nextchar = self.instream.read(1)
AttributeError: 'NoneType' object has no attribute 'read'
{code}

Instead we should display an empty start date.

[~bolke]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)