jroachgolf84 commented on code in PR #70310:
URL: https://github.com/apache/airflow/pull/70310#discussion_r3647190087
##########
providers/standard/src/airflow/providers/standard/sensors/date_time.py:
##########
@@ -125,8 +128,14 @@ def __init__(
self.start_from_trigger = start_from_trigger
if self.start_from_trigger:
+ try:
+ moment = timezone.parse(self.target_time)
+ except ValueError as e:
+ raise ValueError(
+ f"start_from_trigger=True requires a static target_time,
not a template: {self.target_time!r}"
+ ) from e
self.start_trigger_args.trigger_kwargs = dict(
- moment=timezone.parse(self.target_time),
+ moment=moment,
Review Comment:
@shahar1 - I think the goal was to replicate something like this:
https://github.com/apache/airflow/pull/69610/changes
--
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]