Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-921 1.8.0rc Issues
  3. AIRFLOW-919

Setting a task to running manually breaks a DAGs UI



    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: webserver
    • Labels:


      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:

      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'

      Instead we should display an empty start date.

      Bolke de Bruin




            • Assignee:
              aoen Dan Davydov
              aoen Dan Davydov
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: