Skip to content

Default 'once' start_date to 'now' when None #50760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

uranusjr
Copy link
Member

Previously, when a dag does not have start_date, 'once' would never run because the scheduler does not know when to do that one run. This was not particularly problematic in Airflow 2 since you almost always are expected to provide an explicit start_date to a dag.

In Airflow 3, however, since start_date=None is the implicit default, it is more common for people to forget about the start_date, and be surprised when the dag never runs. After some brief discussion, it's decided that it's more intuitive for this argument combination to run the dag 'as soon as convenient' instead.

See also: https://apache-airflow.slack.com/archives/C06K9Q5G2UA/p1747371756970659

Close #50374.

@uranusjr uranusjr force-pushed the once-no-start-means-anytime branch from d2cbacd to 284d783 Compare May 19, 2025 07:29
Previously, when a dag does not have start_date, 'once' would never run
because the scheduler does not know when to do that one run. This was
not particularly problematic in Airflow 2 since you almost always are
expected to provide an explicit start_date to a dag.

In Airflow 3, however, since start_date=None is the implicit default, it
is more common for people to forget about the start_date, and be
surprised when the dag never runs. After some brief discussion, it's
decided that it's more intuitive for this argument combination to run
the dag 'as soon as convenient' instead.

See also: https://apache-airflow.slack.com/archives/C06K9Q5G2UA/p1747371756970659
@uranusjr uranusjr force-pushed the once-no-start-means-anytime branch from 284d783 to 0d730c6 Compare May 19, 2025 07:30
@eladkal eladkal added this to the Airflow 3.1.0 milestone May 19, 2025
@eladkal eladkal added the type:new-feature Changelog: New Features label May 19, 2025
@uranusjr uranusjr merged commit 8166e86 into apache:main May 20, 2025
52 checks passed
@uranusjr uranusjr deleted the once-no-start-means-anytime branch May 20, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What should @once do when start_date=None?
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy