airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Davydov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-1288) Bad owners field in DAGs breaks Airflow front page
Date Wed, 07 Jun 2017 18:42:18 GMT

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

Dan Davydov updated AIRFLOW-1288:
---------------------------------
    Description: 
DAGs that have owners set to a bad value break the front page of the webserver with an error
like below. Instead these should just cause import errors for the specific dags in question.
{code}
Ooops.

                          ____/ (  (    )   )  \___
                         /( (  (  )   _    ))  )   )\
                       ((     (   )(    )  )   (   )  )
                     ((/  ( _(   )   (   _) ) (  () )  )
                    ( (  ( (_)   ((    (   )  .((_ ) .  )_
                   ( (  )    (      (  )    )   ) . ) (   )
                  (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
                  ( (  (   ) (  )   (  ))     ) _)(   )  )  )
                 ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
                  (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
                 ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
                  ((  (   )(    (     _    )   _) _(_ (  (_ )
                   (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
                   ((__)        \\||lll|l||///          \_))
                            (   /(/ (  )  ) )\   )
                          (    ( ( ( | | ) ) )\   )
                           (   /(| / ( )) ) ) )) )
                         (     ( ((((_(|)_)))))     )
                          (      ||\(|(|)|/||     )
                        (        |(||(||)||||        )
                          (     //|/l|||)|\\ \     )
                        (/ / //  /|//||||\\  \ \  \ _)
-------------------------------------------------------------------------------
Node: i-0dbbddfb63fb2cfbc.inst.aws.airbnb.com
-------------------------------------------------------------------------------
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/newrelic/hooks/framework_flask.py", line 103,
in _nr_wrapper_Flask_handle_exception_
    return wrapped(*args, **kwargs)
  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/newrelic/hooks/framework_flask.py", line 40,
in _nr_wrapper_handler_
    return wrapped(*args, **kwargs)
  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/views.py", line 1909, in index
    all_dag_ids=all_dag_ids)
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 307, in render
    return render_template(template, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line 110,
in literal_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line 98, in
dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html", line
18, in top-level template code
    {% extends "airflow/master.html" %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/master.html",
line 18, in top-level template code
    {% extends "admin/master.html" %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line
18, in top-level template code
    {% extends 'admin/base.html' %}
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html",
line 30, in top-level template code
    {% block page_body %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line
104, in block "page_body"
    {% block body %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html", line
99, in block "body"
    {{ dag.owner if dag else orm_dags[dag_id].owners }}
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 408, in getattr
    return getattr(obj, attribute)
  File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 2876, in owner
    return ", ".join(list(set([t.owner for t in self.tasks])))
TypeError: unhashable type: 'list'
{code}

  was:
DAGs that have owners set to a bad value break the front page of the webserver with an error
like below. Instead these should just cause import errors for the specific dags in question.
{{code}}
Ooops.

                          ____/ (  (    )   )  \___
                         /( (  (  )   _    ))  )   )\
                       ((     (   )(    )  )   (   )  )
                     ((/  ( _(   )   (   _) ) (  () )  )
                    ( (  ( (_)   ((    (   )  .((_ ) .  )_
                   ( (  )    (      (  )    )   ) . ) (   )
                  (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
                  ( (  (   ) (  )   (  ))     ) _)(   )  )  )
                 ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
                  (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
                 ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
                  ((  (   )(    (     _    )   _) _(_ (  (_ )
                   (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
                   ((__)        \\||lll|l||///          \_))
                            (   /(/ (  )  ) )\   )
                          (    ( ( ( | | ) ) )\   )
                           (   /(| / ( )) ) ) )) )
                         (     ( ((((_(|)_)))))     )
                          (      ||\(|(|)|/||     )
                        (        |(||(||)||||        )
                          (     //|/l|||)|\\ \     )
                        (/ / //  /|//||||\\  \ \  \ _)
-------------------------------------------------------------------------------
Node: i-0dbbddfb63fb2cfbc.inst.aws.airbnb.com
-------------------------------------------------------------------------------
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/newrelic/hooks/framework_flask.py", line 103,
in _nr_wrapper_Flask_handle_exception_
    return wrapped(*args, **kwargs)
  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/newrelic/hooks/framework_flask.py", line 40,
in _nr_wrapper_handler_
    return wrapped(*args, **kwargs)
  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/views.py", line 1909, in index
    all_dag_ids=all_dag_ids)
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 307, in render
    return render_template(template, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line 110,
in literal_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line 98, in
dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html", line
18, in top-level template code
    {% extends "airflow/master.html" %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/master.html",
line 18, in top-level template code
    {% extends "admin/master.html" %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line
18, in top-level template code
    {% extends 'admin/base.html' %}
  File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html",
line 30, in top-level template code
    {% block page_body %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html", line
104, in block "page_body"
    {% block body %}
  File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html", line
99, in block "body"
    {{ dag.owner if dag else orm_dags[dag_id].owners }}
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 408, in getattr
    return getattr(obj, attribute)
  File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 2876, in owner
    return ", ".join(list(set([t.owner for t in self.tasks])))
TypeError: unhashable type: 'list'
{{code}}


> Bad owners field in DAGs breaks Airflow front page
> --------------------------------------------------
>
>                 Key: AIRFLOW-1288
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1288
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: webserver
>            Reporter: Dan Davydov
>
> DAGs that have owners set to a bad value break the front page of the webserver with an
error like below. Instead these should just cause import errors for the specific dags in question.
> {code}
> Ooops.
>                           ____/ (  (    )   )  \___
>                          /( (  (  )   _    ))  )   )\
>                        ((     (   )(    )  )   (   )  )
>                      ((/  ( _(   )   (   _) ) (  () )  )
>                     ( (  ( (_)   ((    (   )  .((_ ) .  )_
>                    ( (  )    (      (  )    )   ) . ) (   )
>                   (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
>                   ( (  (   ) (  )   (  ))     ) _)(   )  )  )
>                  ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
>                   (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
>                  ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
>                   ((  (   )(    (     _    )   _) _(_ (  (_ )
>                    (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
>                    ((__)        \\||lll|l||///          \_))
>                             (   /(/ (  )  ) )\   )
>                           (    ( ( ( | | ) ) )\   )
>                            (   /(| / ( )) ) ) )) )
>                          (     ( ((((_(|)_)))))     )
>                           (      ||\(|(|)|/||     )
>                         (        |(||(||)||||        )
>                           (     //|/l|||)|\\ \     )
>                         (/ / //  /|//||||\\  \ \  \ _)
> -------------------------------------------------------------------------------
> Node: i-0dbbddfb63fb2cfbc.inst.aws.airbnb.com
> -------------------------------------------------------------------------------
> 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/newrelic/hooks/framework_flask.py", line
103, in _nr_wrapper_Flask_handle_exception_
>     return wrapped(*args, **kwargs)
>   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/newrelic/hooks/framework_flask.py", line
40, in _nr_wrapper_handler_
>     return wrapped(*args, **kwargs)
>   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/views.py", line 1909, in index
>     all_dag_ids=all_dag_ids)
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 307, in render
>     return render_template(template, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line
110, in literal_wrapper
>     return wrapped(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
>     context, ctx.app)
>   File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
>     rv = template.render(context)
>   File "/usr/local/lib/python2.7/dist-packages/newrelic/api/function_trace.py", line
98, in dynamic_wrapper
>     return wrapped(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
>     return self.environment.handle_exception(exc_info, True)
>   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
>     reraise(exc_type, exc_value, tb)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html",
line 18, in top-level template code
>     {% extends "airflow/master.html" %}
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/master.html",
line 18, in top-level template code
>     {% extends "admin/master.html" %}
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html",
line 18, in top-level template code
>     {% extends 'admin/base.html' %}
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/templates/bootstrap3/admin/base.html",
line 30, in top-level template code
>     {% block page_body %}
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/admin/master.html",
line 104, in block "page_body"
>     {% block body %}
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/templates/airflow/dags.html",
line 99, in block "body"
>     {{ dag.owner if dag else orm_dags[dag_id].owners }}
>   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 408, in getattr
>     return getattr(obj, attribute)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 2876, in owner
>     return ", ".join(list(set([t.owner for t in self.tasks])))
> TypeError: unhashable type: 'list'
> {code}



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

Mime
View raw message