You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/06/28 07:43:46 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #32118: Fix CLI commands when custom timetable is used
uranusjr commented on code in PR #32118:
URL: https://github.com/apache/airflow/pull/32118#discussion_r1244819419
##########
airflow/cli/commands/dag_command.py:
##########
@@ -72,7 +72,13 @@ def _run_dag_backfill(dags: list[DAG], args) -> None:
if args.dry_run:
print(f"Dry run of DAG {dag.dag_id} on {args.start_date}")
- dr = DagRun(dag.dag_id, execution_date=args.start_date)
+ dr = DagRun(
+ dag.dag_id,
+ execution_date=args.start_date,
+ data_interval=dag.timetable.infer_manual_data_interval(
+ run_after=timezone.coerce_datetime(args.start_date)
+ ),
Review Comment:
Hmm, I’m not quite sure if this should use a *manual* data interval, since backfills are generally considered as scheduled runs.
The non-dry-run code path calculates data intervals with `dag.iter_dagrun_infos_between` instead, which should be applicable here as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org