You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "alejandrofm (via GitHub)" <gi...@apache.org> on 2023/02/02 15:19:52 UTC
[GitHub] [airflow] alejandrofm opened a new issue, #29322: DAG list, sorting lost when switching page
alejandrofm opened a new issue, #29322:
URL: https://github.com/apache/airflow/issues/29322
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
Hi, I'm currently on Airflow 2.4.2
In /home when sorting by DAG/Owner/Next Run and going to the next page the sort resets.
This feature only works if I'm looking for last or first, everything in the middle is unreachable.
### What you think should happen instead
The sorting should continue over the pagination
### How to reproduce
Sort by any sortable field on DagList and go to the next page
### Operating System
apache/airflow:2.4.2-python3.10
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else
_No response_
### 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] bbovenzi closed issue #29322: DAG list, sorting lost when switching page
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi closed issue #29322: DAG list, sorting lost when switching page
URL: https://github.com/apache/airflow/issues/29322
--
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] amoghrajesh commented on issue #29322: DAG list, sorting lost when switching page
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1437874203
@bbovenzi I need some help understanding how to fix this issue. Please refer to my last comment
--
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] bbovenzi commented on issue #29322: DAG list, sorting lost when switching page
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1419622674
@amoghrajesh We will need to persist `sorting_key` and `sorting_direction` which come from [here](https://github.com/apache/airflow/blob/main/airflow/www/views.py#L699)
--
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] amoghrajesh commented on issue #29322: DAG list, sorting lost when switching page
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1426622518
@bbovenzi i can add the sorting key as a parameter to the method you mentioned above but the list that needs sorting is a list of markup nodes. Any hint on how the sorting_key that looks like: `dag_id` etc be used for markup nodes?
--
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] pierrejeambrun commented on issue #29322: DAG list, sorting lost when switching page
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1444385248
Hello @amoghrajesh,
Sorting is done in the [db query](https://github.com/apache/airflow/blob/main/airflow/www/views.py#L780). The template renders that into a table in the same order.
What we need to do is keep the query parameters that are responsible for the sorting when redirecting to a new page. As mentioned by Brent, `generate_pages` is taking care of that. You need to update it so it can handle the `sorting_key` and `sorting_direction` query param. (The view will take care of querying the proper data and rendering it in the correct order as long as the requested URL has those 2 extra query params)
--
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] amoghrajesh commented on issue #29322: DAG list, sorting lost when switching page
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1417005868
@bbovenzi to understand better, few qns:
How do we add a sort to a list if markup nodes? What will be the sorting key here?
--
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] bbovenzi commented on issue #29322: DAG list, sorting lost when switching page
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1416009037
Can confirm, we should add sort to `generate_pages()` [here](https://github.com/apache/airflow/blob/main/airflow/www/utils.py#L222)
--
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] amoghrajesh commented on issue #29322: DAG list, sorting lost when switching page
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1416970747
@bbovenzi @alejandrofm I can help by taking up this issue if anyone is not actively working on it. Can you assign it to me and provide some more context?
--
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] amoghrajesh commented on issue #29322: DAG list, sorting lost when switching page
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #29322:
URL: https://github.com/apache/airflow/issues/29322#issuecomment-1444988373
@pierrejeambrun @bbovenzi I added a PR that can solve this issue: https://github.com/apache/airflow/pull/29756
Added the sorting parameters to the generate_pages method. However, I think I am missing something. Can I get some help in understanding better?
--
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