lovk korm created AIRFLOW-4310:
----------------------------------
Summary: Wrong refer of List tab in Edit Dag
Key: AIRFLOW-4310
URL: https://issues.apache.org/jira/browse/AIRFLOW-4310
Project: Apache Airflow
Issue Type: Bug
Affects Versions: 1.10.3
Reporter: lovk korm
Fix For: 1.10.4
Reproduce steps:
Used the code of the following DAG:
[https://github.com/apache/airflow/blob/master/airflow/example_dags/example_bash_operator.py]
In the UI:
# Click on Edit DAG
# You are now forwarded into the EDIT tab. Click on the List tab.
# It tries to refer you to :
[http://IP:8080/admin/dagmodel/|http://ip:8080/admin/dagmodel/] which causes
error.
Following error is appears:
Traceback (most recent call last): File
"/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request() File
"/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in
full_dispatch_request rv = self.handle_user_exception(e) File
"/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in
handle_user_exception reraise(exc_type, exc_value, tb) File
"/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
raise value File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line
1813, in full_dispatch_request rv = self.dispatch_request() File
"/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in
dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 69, in
inner return self._run_view(f, *args, **kwargs) File
"/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 368, in
_run_view return fn(self, *args, **kwargs) File
"/usr/local/lib/python3.5/dist-packages/flask_admin/model/base.py", line 2056,
in index_view return_url=self._get_list_url(view_args), File
"/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 308, in
render return render_template(template, **kwargs) File
"/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 135, in
render_template context, ctx.app) File
"/usr/local/lib/python3.5/dist-packages/flask/templating.py", line 117, in
_render rv = template.render(context) File
"/usr/lib/python3/dist-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True) File
"/usr/lib/python3/dist-packages/jinja2/environment.py", line 754, in
handle_exception reraise(exc_type, exc_value, tb) File
"/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise raise
value.with_traceback(tb) File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/airflow/list_dags.html",
line 22, in top-level template code \{% import 'admin/actions.html' as
actionlib with context %} File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/admin/master.html",
line 18, in top-level template code \{% extends 'admin/base.html' %} File
"/usr/local/lib/python3.5/dist-packages/flask_admin/templates/bootstrap3/admin/base.html",
line 38, in top-level template code \{% block page_body %} File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/admin/master.html",
line 145, in block "page_body" \{% block body %} File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/airflow/list_dags.html",
line 67, in block "body" \{% block model_list_table %} File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/airflow/list_dags.html",
line 115, in block "model_list_table" \{% block list_row scoped %} File
"/usr/local/lib/python3.5/dist-packages/airflow/www/templates/airflow/list_dags.html",
line 143, in block "list_row" <td>\{{ get_value(row, c) }}</td> File
"/usr/local/lib/python3.5/dist-packages/flask_admin/model/base.py", line 1861,
in get_list_value self.column_type_formatters, File
"/usr/local/lib/python3.5/dist-packages/flask_admin/model/base.py", line 1826,
in _get_list_value value = column_fmt(self, context, model, name) File
"/usr/local/lib/python3.5/dist-packages/airflow/www/views.py", line 113, in
dag_link execution_date=m.execution_date) AttributeError: 'DagModel' object has
no attribute 'execution_date'
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)