Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-09 Thread via GitHub


imrichardwu commented on PR #67586:
URL: https://github.com/apache/airflow/pull/67586#issuecomment-4658848395

   > @imrichardwu are you taking of this? [#67586 
(review)](https://github.com/apache/airflow/pull/67586#pullrequestreview-4402630796)
   > 
   > > I believe this calls for an update in the FAB auth manager otherwise 
this menu won't be accessible.
   > > And probably as well as a significant newsfragment to communicate that 
people needs to update their user permissions for them to be able to access 
this new 'menu'.
   
   Already done


-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-09 Thread via GitHub


vatsrahul1001 commented on PR #67586:
URL: https://github.com/apache/airflow/pull/67586#issuecomment-4658233108

   @imrichardwu are you taking of this?
   https://github.com/apache/airflow/pull/67586#pullrequestreview-4402630796
   
   > I believe this calls for an update in the FAB auth manager otherwise this 
menu won't be accessible.
   > 
   > And probably as well as a significant newsfragment to communicate that 
people needs to update their user permissions for them to be able to access 
this new 'menu'.
   
   


-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-04 Thread via GitHub


bbovenzi merged PR #67586:
URL: https://github.com/apache/airflow/pull/67586


-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-04 Thread via GitHub


bbovenzi commented on PR #67586:
URL: https://github.com/apache/airflow/pull/67586#issuecomment-4623239206

   > > UI looks good. Just one nit. I feel like we should move away from show 
the count of rows at the top of the table.
   > 
   > Random question, but do you have any advice for writing better PR titles?
   
   Think about a one sentence description in the release notes to understand 
what new feature was added.


-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-04 Thread via GitHub


bbovenzi commented on code in PR #67586:
URL: https://github.com/apache/airflow/pull/67586#discussion_r3356829310


##
airflow-core/newsfragments/67586.significant.rst:
##
@@ -0,0 +1,7 @@
+Add a new **Deadlines** page under the Browse menu.
+
+If you use the FAB auth manager with **custom roles**, grant the new
+``menu_access`` and ``can_read`` permissions on the ``Deadlines`` resource to
+any role that should be able to see this page.  The built-in ``Viewer``,
+``User``, ``Op``, and ``Admin`` roles are updated automatically when Airflow
+starts (``[fab] UPDATE_FAB_PERMS = True``).

Review Comment:
   lgtm



-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-03 Thread via GitHub


imrichardwu commented on PR #67586:
URL: https://github.com/apache/airflow/pull/67586#issuecomment-4618616073

   > UI looks good. Just one nit. I feel like we should move away from show the 
count of rows at the top of the table.
   
   Random question, but do you have any advice on having bette titles for PRs?


-- 
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]



Re: [PR] Add Browse > Deadlines page [airflow]

2026-06-03 Thread via GitHub


bbovenzi commented on code in PR #67586:
URL: https://github.com/apache/airflow/pull/67586#discussion_r3351429580


##
airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx:
##
@@ -0,0 +1,155 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Badge, Box, Heading, Link, VStack } from "@chakra-ui/react";
+import type { ColumnDef } from "@tanstack/react-table";
+import type { TFunction } from "i18next";
+import { useTranslation } from "react-i18next";
+import { Link as RouterLink, useSearchParams } from "react-router-dom";
+
+import { useDeadlinesServiceGetDeadlines } from "openapi/queries";
+import type { DeadlineResponse } from "openapi/requests/types.gen";
+import { DataTable } from "src/components/DataTable";
+import { useTableURLState } from "src/components/DataTable/useTableUrlState";
+import { ErrorAlert } from "src/components/ErrorAlert";
+import { FilterBar } from "src/components/FilterBar";
+import Time from "src/components/Time";
+import { TruncatedText } from "src/components/TruncatedText";
+import { SearchParamsKeys } from "src/constants/searchParams";
+import { useFiltersHandler, type FilterableSearchParamsKeys } from "src/utils";
+
+type DeadlineRow = { row: { original: DeadlineResponse } };
+
+const createColumns = (translate: TFunction): 
Array> => [
+  {
+accessorKey: "dag_id",
+cell: ({ row: { original } }: DeadlineRow) => (
+  
+
+  
+
+  
+),
+header: translate("common:dagId"),
+  },
+  {
+accessorKey: "dag_run_id",
+cell: ({ row: { original } }: DeadlineRow) => (
+  
+
+  
+
+  
+),
+enableSorting: false,
+header: translate("common:dagRunId"),
+  },
+  {
+accessorKey: "deadline_time",
+cell: ({ row: { original } }: DeadlineRow) => ,
+header: translate("browse:deadlines.columns.deadlineTime"),
+  },
+  {
+accessorKey: "missed",
+cell: ({
+  row: {
+original: { missed },
+  },
+}) => (
+  
+{missed
+  ? translate("browse:deadlines.filters.statusOptions.missed")
+  : translate("browse:deadlines.filters.statusOptions.pending")}
+  
+),
+header: translate("browse:deadlines.columns.status"),
+  },
+  {
+accessorKey: "alert_name",
+cell: ({ row: { original } }) => original.alert_name ?? "",
+enableSorting: false,
+header: translate("browse:deadlines.columns.alertName"),
+  },
+  {
+accessorKey: "created_at",
+cell: ({ row: { original } }: DeadlineRow) => ,
+header: translate("common:table.createdAt"),
+  },
+];
+
+const deadlinesFilterKeys: Array = [
+  SearchParamsKeys.DAG_ID,
+  SearchParamsKeys.DEADLINE_TIME_RANGE,
+  SearchParamsKeys.MISSED,
+];
+
+export const Deadlines = () => {
+  const { t: translate } = useTranslation(["browse", "common"]);
+  const { setTableURLState, tableURLState } = useTableURLState();
+  const [searchParams] = useSearchParams();
+
+  const { filterConfigs, handleFiltersChange, initialValues } = 
useFiltersHandler(deadlinesFilterKeys);
+
+  const columns = createColumns(translate);
+
+  const { pagination, sorting } = tableURLState;
+  const [sort] = sorting;
+  const orderBy = sort ? [`${sort.desc ? "-" : ""}${sort.id}`] : 
["-deadline_time"];
+
+  const filteredDagId = searchParams.get(SearchParamsKeys.DAG_ID);
+  const filteredMissed = searchParams.get(SearchParamsKeys.MISSED);
+  const deadlineTimeGte = searchParams.get(SearchParamsKeys.DEADLINE_TIME_GTE);
+  const deadlineTimeLte = searchParams.get(SearchParamsKeys.DEADLINE_TIME_LTE);
+
+  const missedFilter = filteredMissed === "true" ? true : filteredMissed === 
"false" ? false : undefined;
+
+  const { data, error, isFetching, isLoading } = 
useDeadlinesServiceGetDeadlines({
+dagId: filteredDagId !== null && filteredDagId !== "" ? filteredDagId : 
"~",
+dagRunId: "~",
+deadlineTimeGte: deadlineTimeGte ?? undefined,
+deadlineTimeLte: deadlineTimeLte ?? undefined,
+limit: pagination.pageSize,
+missed: missedFilter,
+offset: pagination.pageIndex * pagination.pageSize,
+orderBy,
+  });
+
+  return (
+
+  {translate("browse:deadlines.title")}
+  
+
+  
+