pierrejeambrun commented on code in PR #68657:
URL: https://github.com/apache/airflow/pull/68657#discussion_r3466389900


##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx:
##########
@@ -108,10 +111,13 @@ export const DagsFilters = () => {
   };
 
   const handleStateChange = (value: StateValue) => {
-    if (value === "all") {
-      searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
-    } else {
-      searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
+    searchParams.delete(LAST_DAG_RUN_STATE_PARAM);
+    searchParams.delete(DAG_RUN_STATE_PARAM);
+    if (value !== "all") {
+      searchParams.set(
+        anyRunStateValues.includes(value) ? DAG_RUN_STATE_PARAM : 
LAST_DAG_RUN_STATE_PARAM,
+        value,

Review Comment:
   Also we probably want to limit the `filter` values to `running` and 
`queued`. 
   
   There is no partial index in the db for other states, and those will trigger 
full scan on the dagrun table, making them not scalable. (UI will be slow to 
load). Even if that's UI specific, just to make sure we don't allow more 
(success/failure) to be passed too in the future I think it would be good to 
limit this too `queued/running` subset only



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to