backfill should not create runs for future dates #46012
Labels
area:backfill
Specifically for backfill related
good first issue
kind:meta
High-level information important to the community
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
The text was updated successfully, but these errors were encountered: