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
BUG: Unable to view or browse dags in web UI after migrated airflow 1.9.0 to 1.10.10 #8752
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Here is related PR: https://github.com/apache/airflow/pull/7593/files |
BTW, I will check which PR cause this error |
@mmuru I find out the original pr is #7457, and I think it should not cause error because dag.description default value is Line 218 in 42e9a29
unless you define description=None in DAG files. if so maybe you should just remove the description define.
And, BTW, we have #7593 to fix that will release in 1.10.11, will use |
Please mention me if you have further problem, I am sick recently and only check github twice a day, sorry about that. |
@zhongjiajie: I reviewed PR #7457, It checks only dag.description length limit but dag.description can be null. In my case, as I mentioned the 1.9.0 dags didn't have description. The description column was introduced in 1.10 and the default is null. I reviewed PR #7593 and it will fix this issue. |
Yes that PR will be cherry-picked in 1.10.11 and should fix the issue. |
@mmuru In this case I prefer to close this issue, would reopen it if you still have further information. |
I face the same issue. Commenting here for record |
Cherry-picked to v1-10-test: d0de41c |
Apache Airflow version: airflow 1.10.10
Environment:
What happened:
Ooops! throws exception File "/Users/muru/opensrc/py36/airflow_110/venv368/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html", line 84, in block "body" <a href="{{ url_for('airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if dag.description|length > 80 else dag.description }}"> TypeError: object of type 'NoneType' has no len()
What you expected to happen:
Should able to load page without errors or exceptions.
The description column in dag table can be null. But in the dags.html, should check dag.decription is not null before perform length filter.
How to reproduce it:
migrate airflow 1.9.0 to 1.10.10
Perform airflow upgradedb
start airflow webserver
launch and open http://localhost:8080/
Anything else we need to know:
Line 84 in airflow/www/templates/airflow/dags.html file, replace the condition
if dag.description|length > 80 change to if dag.description and dag.description|length > 80
As a workaround, perform the following db update and open http://localhost:8080/
update dag set description=' ' where description is null;
The text was updated successfully, but these errors were encountered: