Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on click in dag-dependencies - airflow 2.1 #16328

Closed
jcmartins opened this issue Jun 8, 2021 · 3 comments · Fixed by #16345
Closed

error on click in dag-dependencies - airflow 2.1 #16328

jcmartins opened this issue Jun 8, 2021 · 3 comments · Fixed by #16345
Labels
affected_version:2.1 Issues Reported for 2.1 area:webserver Webserver related Issues kind:bug This is a clearly a bug

Comments

@jcmartins
Copy link

jcmartins commented Jun 8, 2021

Python version: 3.7.9

Airflow version: 2.1.0

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.7/site-packages/airflow/www/auth.py", line 34, in decorated
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/www/decorators.py", line 97, in view_func
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/www/decorators.py", line 60, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 4003, in list
if SerializedDagModel.get_max_last_updated_datetime() > self.last_refresh:
TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'

What you expected to happen:
See the dags dependencies

What do you think went wrong?
It's happen only if I don't have any dag yet.

How to reproduce it:
With any dag created click in
menu -> browser -> dag-dependencies

@jcmartins jcmartins added the kind:bug This is a clearly a bug label Jun 8, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 8, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

@jhtimmins
Copy link
Contributor

jhtimmins commented Jun 8, 2021

@jcmartins thanks for submitting. Do you want to submit a fix as well?

@uranusjr
Copy link
Member

uranusjr commented Jun 9, 2021

This reminds me of a task I left on the backburner, so I submitted a fix to this together.

@eladkal eladkal added the affected_version:2.1 Issues Reported for 2.1 label Jun 9, 2021
kaxil pushed a commit that referenced this issue Jun 15, 2021
This is possible when the query does not return a row, according to
SQLAlchemy documentation. We can handle them to provide better errors in
unexpected situations.

Toward #8171, fix #16328.
ashb pushed a commit that referenced this issue Jun 22, 2021
This is possible when the query does not return a row, according to
SQLAlchemy documentation. We can handle them to provide better errors in
unexpected situations.

Toward #8171, fix #16328.

(cherry picked from commit 147bcec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.1 Issues Reported for 2.1 area:webserver Webserver related Issues kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants