YoinkingFishy opened a new pull request, #70787:
URL: https://github.com/apache/airflow/pull/70787
When `DateTimeSensorAsync` is used with `start_from_trigger=True` and
`target_time` is a Jinja template string (e.g. `"{{
data_interval_end.tomorrow().replace(hour=1) }}"`), the operator crashes at
DAG-parse time because `__init__` eagerly accesses `self._moment`, which calls
`timezone.parse()` on the unresolved template string.
This fix detects template strings (containing `{{`) in `target_time` and
disables `start_from_trigger` for that task instance, falling back to the
normal `execute()` path. Template resolution happens at execution time in the
worker, after which the task defers to the triggerer correctly.
- [X] Yes (specify the tool below)
Generated-by: OpenCode
--
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]