You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/02/27 21:44:45 UTC

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

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

ASF subversion and git services commented on AIRFLOW-919:
---------------------------------------------------------

Commit 57e8956b5635211a34744943e071330f098d4639 in incubator-airflow's branch refs/heads/master from [~aoen]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=57e8956 ]

[AIRFLOW-919] Running tasks with no start date shouldn't break a DAGs UI

Please accept this PR that addresses the following
issues:
-
https://issues.apache.org/jira/browse/AIRFLOW-919

I also made the airflow PR template a little bit
less verbose (requires less edits when creating a
PR).

Testing Done:
- Ran a webserver with this case and made sure
that the DAG page loaded

Closes #2110 from
aoen/ddavydov/fix_running_task_with_no_start_date


> 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
>            Assignee: Dan Davydov
>
> If you set a task instance with no start date to the RUNNING state manually (e.g. mark a task as success and then change the state to running in the CRUD UI), 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)