Skip to content

Ignore task start_date and end_date outside scheduled runs - #74387

Open
yuseok89 wants to merge 2 commits into
apache:mainfrom
yuseok89:fix-manual-dagrun-outside-task-date-window-v2
Open

yuseok89 wants to merge 2 commits into
apache:mainfrom
yuseok89:fix-manual-dagrun-outside-task-date-window-v2

Conversation

@yuseok89

@yuseok89 yuseok89 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

closes: #38513
related: #71758

A Dag run whose logical date falls outside a task's start_date / end_date window creates no task instance for that task. When every task is filtered out this way, the run has no task instances and is immediately reported as success without anything having run.

Backfill runs were already exempt from this window. Every run type except scheduled runs is now exempt too, so the window only limits what the scheduler creates.

Improvements over #71758

  • Ignore task start_date and end_date on manual runs #71758 only exempted manual runs. Runs created by TriggerDagRunOperator (operator_triggered) and asset materialization runs still ended up empty, so they are covered now. The condition is run_type != SCHEDULED, which also covers run types added later.
  • The FAQ has a dedicated entry on which runs the dates apply to. It covers a task whose end_date has passed, which now runs in manual runs, and the depends_on_past=True with catchup=False case, which needs ignore_first_depends_on_past=True.

Verified in the UI

A Dag with a start_date of 2050 and three chained @task functions (extract → transform → load).

Before

Screen.Recording.2026-08-18.at.11.19.52.PM.mov

After

Screen.Recording.2026-08-18.at.11.24.09.PM.mov

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    • Claude Code (Opus 5.5)

  • 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.

@yuseok89 yuseok89 changed the title Fix manual dagrun outside task date window v2 Ignore task start_date and end_date outside scheduled runs Oct 7, 2026
@yuseok89
yuseok89 force-pushed the fix-manual-dagrun-outside-task-date-window-v2 branch from f668b47 to 318f390 Compare October 7, 2026 02:40
@yuseok89
yuseok89 force-pushed the fix-manual-dagrun-outside-task-date-window-v2 branch from 89e06eb to dd9974a Compare October 7, 2026 08:12
@yuseok89
yuseok89 marked this pull request as ready for review October 7, 2026 09:32

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAGs with future start_date are automatically marked as success without executing tasks

1 participant