Skip to content

Conversation

@bbovenzi
Copy link
Contributor

Alternative to #44989

Ensure that we have the UI config before any other request is made to the backend.

Ultimately, we should include this as part of the authentication flow.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Dec 19, 2024
@bbovenzi bbovenzi merged commit 5e0aeef into apache:main Dec 20, 2024
41 checks passed
@bbovenzi bbovenzi deleted the fix-waiting-on-config-query branch December 20, 2024 15:08
@tirkarthi
Copy link
Contributor

For some reason the dags page filter buttons by state like failed, running etc. are not working and the url is not updated with the selected state value for last_dag_run_state. But selecting the filter from dashboard button applies the query parameter last_dag_run_state and it's working fine. I bisected to this commit using below command

Not working

(myenv) ➜ ui git:(main) ✗ git checkout 5e0aeef src/
Updated 0 paths from e685b10ac1

Working

(myenv) ➜ ui git:(main) ✗ git checkout 5e0aeef~1 src/
Updated 3 paths from 222dbe1da5

@tirkarthi
Copy link
Contributor

Below seems to fix this issue. I don't see any changes to table state in the fix. Somewhere along the line the search params and table state seem to get out of sync.

gd src/pages/DagsList/DagsFilters.tsx | cat
diff --git a/airflow/ui/src/pages/DagsList/DagsFilters.tsx b/airflow/ui/src/pages/DagsList/DagsFilters.tsx
index 94cca4d5ee..2c766af8e4 100644
--- a/airflow/ui/src/pages/DagsList/DagsFilters.tsx
+++ b/airflow/ui/src/pages/DagsList/DagsFilters.tsx
@@ -86,11 +86,11 @@ export const DagsFilters = () => {
       } else {
         searchParams.set(PAUSED_PARAM, val);
       }
-      setSearchParams(searchParams);
       setTableURLState({
         pagination: { ...pagination, pageIndex: 0 },
         sorting,
       });
+      setSearchParams(searchParams);
     },
     [pagination, searchParams, setSearchParams, setTableURLState, sorting],
   );
@@ -103,11 +103,11 @@ export const DagsFilters = () => {
         } else {
           searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
         }
-        setSearchParams(searchParams);
         setTableURLState({
           pagination: { ...pagination, pageIndex: 0 },
           sorting,
         });
+	setSearchParams(searchParams);
       },
       [pagination, searchParams, setSearchParams, setTableURLState, sorting],
     );

@bbovenzi
Copy link
Contributor Author

bbovenzi commented Jan 7, 2025

Very weird. @tirkarthi, Do you want to open those changes as PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants