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

ASF GitHub Bot commented on AIRFLOW-3172:
-----------------------------------------

silentsokolov opened a new pull request #4338: [AIRFLOW-3172] Fix error 
creation dag link
URL: https://github.com/apache/incubator-airflow/pull/4338
 
 
   The "dag_link" is used in the views for DagModel and DagRun.
   DagModel does not have attribute execute_date, which causes an error 500.
   
   I think it's just a typo GH-2801
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-3172
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI 
changes:
   
   Now, on page `/admin/dagrun/`, the link in column `Dag Id` without GET param 
`execute_date`
   
   ### Tests
   
   - [x] Does not need testing for this extremely good reason:
   
   DagModelView use ModelView without overrides
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes 
how to use it.
     - When adding new operators/hooks/sensors, the autoclass documentation 
generation needs to be added.
     - All the public functions and the classes in the PR contain docstrings 
that explain what it does
   
   ### Code Quality
   
   - [x] Passes `flake8`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> AttributeError: 'DagModel' object has no attribute 'execution_date'
> -------------------------------------------------------------------
>
>                 Key: AIRFLOW-3172
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3172
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>         Environment: Docker Environment: python:3.6-stretch
>            Reporter: Vinnson Lee
>            Priority: Major
>             Fix For: 1.10.2
>
>
> 2018-10-09 10:13:28,430] ERROR in app: Exception on /admin/dagmodel/ [GET]
> Traceback (most recent call last):
>  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1982, in 
> wsgi_app
>  response = self.full_dispatch_request()
>  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1614, in 
> full_dispatch_request
>  rv = self.handle_user_exception(e)
>  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1517, in 
> handle_user_exception
>  reraise(exc_type, exc_value, tb)
>  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in 
> reraise
>  raise value
>  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1612, in 
> full_dispatch_request
>  rv = self.dispatch_request()
>  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1598, in 
> dispatch_request
>  return self.view_functions[rule.endpoint](**req.view_args)
>  File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, 
> in inner
>  return self._run_view(f, *args, **kwargs)
>  File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 368, 
> in _run_view
>  return fn(self, *args, **kwargs)
>  File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", 
> line 1900, in index_view
>  return_url=self._get_list_url(view_args),
>  File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 308, 
> in render
>  return render_template(template, **kwargs)
>  File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 134, 
> in render_template
>  context, ctx.app)
>  File "/usr/local/lib/python3.6/site-packages/flask/templating.py", line 116, 
> in _render
>  rv = template.render(context)
>  File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 
> 989, in render
>  return self.environment.handle_exception(exc_info, True)
>  File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 
> 754, in handle_exception
>  reraise(exc_type, exc_value, tb)
>  File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in 
> reraise
>  raise value.with_traceback(tb)
>  File 
> "/usr/local/lib/python3.6/site-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.6/site-packages/airflow/www/templates/admin/master.html",
>  line 18, in top-level template code
>  \{% extends 'admin/base.html' %}
>  File 
> "/usr/local/lib/python3.6/site-packages/flask_admin/templates/bootstrap3/admin/base.html",
>  line 30, in top-level template code
>  \{% block page_body %}
>  File 
> "/usr/local/lib/python3.6/site-packages/airflow/www/templates/admin/master.html",
>  line 107, in block "page_body"
>  \{% block body %}
>  File 
> "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/list_dags.html",
>  line 67, in block "body"
>  \{% block model_list_table %}
>  File 
> "/usr/local/lib/python3.6/site-packages/airflow/www/templates/airflow/list_dags.html",
>  line 115, in block "model_list_table"
>  \{% block list_row scoped %}
>  File 
> "/usr/local/lib/python3.6/site-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.6/site-packages/flask_admin/model/base.py", 
> line 1742, in get_list_value
>  self.column_type_formatters,
>  File "/usr/local/lib/python3.6/site-packages/flask_admin/model/base.py", 
> line 1707, in _get_list_value
>  value = column_fmt(self, context, model, name)
>  File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 
> 124, in dag_link
>  execution_date=m.execution_date)
> AttributeError: 'DagModel' object has no attribute 'execution_date'
>  
>  
> Its fine to work with SQLlite, but not with mysql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to