Skip to content

Fix airflowctl dagrun list ignoring --start-date and --end-date - #76348

Merged
shahar1 merged 1 commit into
apache:mainfrom
Andrushika:airflowctl-dagrun-date-filters
Nov 3, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
Andrushika:airflowctl-dagrun-date-filters

Conversation

@Andrushika

Copy link
Copy Markdown
Contributor

Why

airflowctl dagrun list sends --start-date and --end-date to the Dag runs endpoint as the start_date and end_date query parameters. The endpoint does not read these names. For dates, it reads only range query parameters, for example start_date_gte. The command then returns all Dag runs without an error.

What

--start-date now sends start_date_gte, and --end-date now sends end_date_lte. The command then lists the Dag runs that started at or after --start-date and ended at or before --end-date.


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

Generated-by: Claude Code (Opus 5.5) following the guidelines

airflowctl sent the two filters as start_date and end_date query
parameters. The Dag runs endpoint only reads range parameters such as
start_date_gte and end_date_lte, and FastAPI drops parameters it does
not declare. The command returned all Dag runs with no error.
@github-actions github-actions Bot added the fork ci required Gated by AIP-120: CI must pass in the contributor's fork. Managed by the fork CI reconciler. label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fork CI: green. CI for the latest commit passed in your fork. The pull request is ready for maintainer review.

Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite.

Latest run: https://github.com/Andrushika/airflow/actions/runs/41585976105

How this works: fork CI for external contributors.


This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated.

@github-actions github-actions Bot added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 3, 2026

@shahar1 shahar1 left a comment

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.

The fix is correct. GET /dags/{dag_id}/dagRuns reads dates only as range parameters (start_date_gte, end_date_lte, …), and FastAPI drops unknown query parameters, so start_date / end_date were silently ignored. The new names already exist in Airflow 3.0.0, so older servers keep working. The bug is also on airflow-ctl/v0-1-test, so the backport label fits. The new test assertion fails without the change.

One optional docstring nit inline; not blocking.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Airflow handles maintainer review:
Contributing guide.

@shahar1
shahar1 merged commit 29368e8 into apache:main Nov 3, 2026
82 checks passed
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: airflow-ctl/v0-1-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ airflow-ctl/v0-1-test PR Link

shahar1 pushed a commit that referenced this pull request Nov 3, 2026
…ate and --end-date (#76348) (#76382)

airflowctl sent the two filters as start_date and end_date query
parameters. The Dag runs endpoint only reads range parameters such as
start_date_gte and end_date_lte, and FastAPI drops parameters it does
not declare. The command returned all Dag runs with no error.
(cherry picked from commit 29368e8)

Co-authored-by: Andrew Chang <[email protected]>
shahar1 pushed a commit to shahar1/airflow that referenced this pull request Nov 4, 2026
…ate and --end-date (apache#76348) (apache#76382)

airflowctl sent the two filters as start_date and end_date query
parameters. The Dag runs endpoint only reads range parameters such as
start_date_gte and end_date_lte, and FastAPI drops parameters it does
not declare. The command returned all Dag runs with no error.
(cherry picked from commit 29368e8)

Co-authored-by: Andrew Chang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-airflow-ctl/v0-1-test fork ci required Gated by AIP-120: CI must pass in the contributor's fork. Managed by the fork CI reconciler. ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants