pierrejeambrun commented on code in PR #46017:
URL: https://github.com/apache/airflow/pull/46017#discussion_r1941432267
##########
airflow/models/backfill.py:
##########
@@ -215,6 +223,8 @@ def _validate_backfill_params(dag, reverse,
reprocess_behavior: ReprocessBehavio
"DAG has tasks for which depends_on_past=True. "
"You must set reprocess behavior to reprocess completed or
reprocess failed."
)
+ if from_date >= timezone.utcnow() and to_date >= timezone.utcnow():
Review Comment:
timezone.utcnow() can be extracted to the same constant value. instead of
called twice.
##########
airflow/models/backfill.py:
##########
@@ -215,6 +223,8 @@ def _validate_backfill_params(dag, reverse,
reprocess_behavior: ReprocessBehavio
"DAG has tasks for which depends_on_past=True. "
"You must set reprocess behavior to reprocess completed or
reprocess failed."
)
+ if from_date >= timezone.utcnow() and to_date >= timezone.utcnow():
Review Comment:
What if only one of the two dates (from_date or to_date) is in the future ?
Should that be considered invalid or valid ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]