You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "mayeulk (via GitHub)" <gi...@apache.org> on 2023/03/11 14:02:39 UTC

[GitHub] [airflow] mayeulk opened a new issue, #30041: Sorting by Note in List Dag Run fails

mayeulk opened a new issue, #30041:
URL: https://github.com/apache/airflow/issues/30041

   ### Apache Airflow version
   
   2.5.1
   
   ### What happened
   
   Going to Airflow web UI, Browse>DAG Run displays the list of runs:
   http://0.0.0.0:8084/dagrun/list/
   Clicking on the columns headers allow to sort the data, except for the 'Note' field. This opens 
   http://0.0.0.0:8084/dagrun/list/?_oc_DagRunModelView=note&_od_DagRunModelView=asc
   and displays an error page:
   " Ooops!
   Something bad has happened.
   ...
   Python version: 3.7.16
   Airflow version: 2.5.1
   Node: 80277a0dd39e
   -------------------------------------------------------------------------------
   Error! Please contact server admin."
   
   
   ### What you think should happen instead
   
   It should sort the data by Note. 
   
   ### How to reproduce
   
   Run the docker stack. Click Browse>DAG Run to display the list of runs. Then click on the "Note" column header.
   
   ### Operating System
   
   Docker image "FROM apache/airflow:2.5.1-python3.7" (with Ubuntu host)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Following https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html
   Docker file is:
   #!/usr/bin/env -S docker build . --tag=airflow_python_r_v1 --network=host --file
   
   ARG AIRFLOW_VERSION=2.5.1
   ARG PYTHON_RUNTIME_VERSION=3.7
   FROM apache/airflow:${AIRFLOW_VERSION}-python${PYTHON_RUNTIME_VERSION}
   SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]
   USER root
   
   ENV TZ=Europe/Paris
   RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
   
   USER airflow
   
   
   ### Anything else
   
   Logs form the airflow-webserver container:
   ```
   127.0.0.1 - - [11/Mar/2023:14:58:11 +0100] "GET /health HTTP/1.1" 200 141 "-" "curl/7.74.0"
   [2023-03-11 14:58:17,322] {app.py:1742} ERROR - Exception on /dagrun/list/ [GET]
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 2525, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1822, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1820, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1796, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 133, in wraps
       return f(self, *args, **kwargs)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/views.py", line 554, in list
       widgets = self._list()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/baseviews.py", line 1169, in _list
       page_size=page_size,
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/baseviews.py", line 1068, in _get_list_widget
       page_size=page_size,
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 469, in query
       select_columns,
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 424, in apply_all
       aliases_mapping=aliases_mapping,
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 371, in _apply_inner_all
       query, order_column, order_direction, aliases_mapping=aliases_mapping
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 207, in apply_order_by
       query = query.order_by(asc(_order_column))
     File "<string>", line 2, in asc
     File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 3599, in _create_asc
       coercions.expect(roles.ByOfRole, column),
     File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/coercions.py", line 177, in expect
       element = element.__clause_element__()
     File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/ext/associationproxy.py", line 442, in __clause_element__
       "The association proxy can't be used as a plain column "
   NotImplementedError: The association proxy can't be used as a plain column expression; it only works inside of a comparison expression
   172.31.0.1 - - [11/Mar/2023:14:58:17 +0100] "GET /dagrun/list/?_oc_DagRunModelView=note&_od_DagRunModelView=asc HTTP/1.1" 500 1544 "http://0.0.0.0:8084/dagrun/list/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0"
   127.0.0.1 - - [11/Mar/2023:14:58:42 +0100] "GET /health HTTP/1.1" 200 141 "-" "curl/7.74.0"
   ```
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] mayeulk commented on issue #30041: Sorting by Note in List Dag Run fails

Posted by "mayeulk (via GitHub)" <gi...@apache.org>.
mayeulk commented on issue #30041:
URL: https://github.com/apache/airflow/issues/30041#issuecomment-1464988796

   As commented in the PR:
   Until a fix is found to re-enable this, I use direct connection in the postgresql backend, with:
   SELECT *
   FROM public.dag_run_note
   ORDER BY content ;
   (In case this helps someone.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] hussein-awala commented on issue #30041: Sorting by Note in List Dag Run fails

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #30041:
URL: https://github.com/apache/airflow/issues/30041#issuecomment-1464922092

   Thank you for opening the issue, I can reproduce with the main branch, I will open a PR to fix the problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on issue #30041: Sorting by Note in List Dag Run fails

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #30041:
URL: https://github.com/apache/airflow/issues/30041#issuecomment-1464918647

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk closed issue #30041: Sorting by Note in List Dag Run fails

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #30041: Sorting by Note in List Dag Run fails
URL: https://github.com/apache/airflow/issues/30041


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org