Skip to content

Display Deadlines in Browser#64878

Draft
imrichardwu wants to merge 14 commits intoapache:mainfrom
imrichardwu:dashboard
Draft

Display Deadlines in Browser#64878
imrichardwu wants to merge 14 commits intoapache:mainfrom
imrichardwu:dashboard

Conversation

@imrichardwu
Copy link
Copy Markdown
Contributor

@imrichardwu imrichardwu commented Apr 8, 2026

Add a global Deadlines view that displays all pending deadlines where deadline_time is in the future, as well as recently missed deadlines from the last 24 hours across all DAG runs, with clickable links to the corresponding DAG and DAG run for sorting and filtering. The dashboard shows the 5 most recent, and the user can view more in the browser section.

Screenshot 2026-04-07 at 9 15 10 PM Screenshot 2026-04-07 at 9 18 49 PM

Related to #50501 (comment)


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    Claude code for code review and bug fix.

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@pierrejeambrun
Copy link
Copy Markdown
Member

pierrejeambrun commented Apr 8, 2026

Let us know when this is ready for review. (take your time, fix the CI, thorough local tests, etc..., there is no hurry)

@imrichardwu imrichardwu marked this pull request as ready for review April 8, 2026 17:45
Copy link
Copy Markdown
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the Dashboard changes for now since they will really depend on the UX in your other PR and we can just focus on the browse page.

Comment thread airflow-core/src/airflow/ui/public/i18n/locales/en/dashboard.json Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx
Comment thread airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx
Comment thread airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx Outdated

const missedFilter = filteredMissed === "true" ? true : filteredMissed === "false" ? false : undefined;

const { data, error, isFetching, isLoading } = useDeadlinesServiceGetDeadlines({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would ideally like to include the alert reference and the dag run's end_date plus state to give much more context here, but that can be a custom UI endpoint later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I leave as is for now?

export const Deadlines = () => {
const { t: translate } = useTranslation("dashboard");
const refetchInterval = useAutoRefresh({ checkPendingRuns: true });
const now = dayjs().toISOString();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the refetchInterval, we will calculate a new now and last24h constantly.

It would be better to move this under the "History" section and use the start and end date provided just like you did with the Overview page. But again, we don't want to do any of this yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this, should I leave as is?

@imrichardwu imrichardwu marked this pull request as draft April 8, 2026 20:10
Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
@imrichardwu
Copy link
Copy Markdown
Contributor Author

imrichardwu commented Apr 8, 2026

Let us know when this is ready for review. (take your time, fix the CI, thorough local tests, etc..., there is no hurry)

Sounds good, thank you for your patience. This pr might take some time as I will work on my other pr (have a lot of feedback to address), and it's the final exam month for me :(, so this pr might actually not be updated until around the end of April.

@kaxil kaxil requested a review from Copilot April 10, 2026 19:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Comment thread airflow-core/src/airflow/ui/src/pages/Dashboard/Deadlines/Deadlines.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/Dashboard/Deadlines/Deadlines.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx
Comment thread airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts
Comment thread airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
@imrichardwu imrichardwu marked this pull request as ready for review April 22, 2026 04:20
@imrichardwu imrichardwu changed the title Display Deadlines in Dashboard and Browser Display Deadlines in Browser Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +114 to +130
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,
});
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Deadlines browse view currently fetches all deadlines across all DAGs/DAG runs (dagId="", dagRunId="") with no default time window. This doesn’t match the PR description (future pending + missed within last 24h) and can also be expensive because the backend query will scan/count potentially large tables when no range filter is applied. Consider setting a default deadline_time_gte (e.g. now minus 24h) when the page loads (and/or updating the PR description if the intent is to show all deadlines).

Copilot uses AI. Check for mistakes.
@potiuk potiuk marked this pull request as draft April 22, 2026 19:52
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 22, 2026

@imrichardwu This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Unresolved review comments (2 threads from maintainers): please walk through each unresolved review thread. Even if a suggestion looks incorrect or irrelevant — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. Leaving threads unaddressed for weeks blocks the PR from moving forward.

What to do next:

  • Walk through each unresolved review thread and respond as described above.
  • Make sure static checks pass locally: prek run --from-ref main --stage pre-commit.
  • Mark the PR as "Ready for review" when you're done.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

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

Labels

area:API Airflow's REST/HTTP API area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants