Skip to content
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

backfill should not create runs for future dates #46012

Open
1 task done
dstandish opened this issue Jan 24, 2025 · 0 comments · May be fixed by #46017
Open
1 task done

backfill should not create runs for future dates #46012

dstandish opened this issue Jan 24, 2025 · 0 comments · May be fixed by #46017
Assignees
Labels
area:backfill Specifically for backfill related good first issue kind:meta High-level information important to the community

Comments

@dstandish
Copy link
Contributor

Body

backfill shouldn't be created for future dates I believe but if I pass run_backwards=true then its creating backfill for future date also
reverse block is missing the condition if x.data_interval.end < now
Also we can reuse the infos in the reverse block
def _get_info_list(
*,
from_date,
to_date,
reverse,
dag,
):
infos = dag.iter_dagrun_infos_between(from_date, to_date)
now = timezone.utcnow()
dagrun_info_list = (x for x in infos if x.data_interval.end < now)
if reverse:
dagrun_info_list = reversed([x for x in dag.iter_dagrun_infos_between(from_date, to_date)])
return dagrun_info_list

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@dstandish dstandish added the kind:meta High-level information important to the community label Jan 24, 2025
@dosubot dosubot bot added the area:backfill Specifically for backfill related label Jan 24, 2025
@vatsrahul1001 vatsrahul1001 self-assigned this Jan 24, 2025
@vatsrahul1001 vatsrahul1001 linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:backfill Specifically for backfill related good first issue kind:meta High-level information important to the community
Projects
Development

Successfully merging a pull request may close this issue.

3 participants