You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DateTimeSensorAsync crashes Dag parsing with templated target_time + start_from_trigger=True #70284
main (also reproduced against current released 3.x)
What happened
DateTimeSensorAsync declares target_time as a template_fields member (rendered via Jinja against the run context at task-execution time), but its __init__ calls timezone.parse(self.target_time) at Dag-parse time when start_from_trigger=True — before Jinja rendering has happened. If target_time is a template string (the normal, documented use case for this field), this raises a parser error and crashes parsing of the entire Dag
file, not just the task.
This is the same root-cause pattern fixed for TimeSensor in #69610 (parse-time handling of a value that can only correctly be resolved at/near task-execution time), but with a more severe symptom: instead of silent dag_version churn, the whole Dag fails to parse.
changed the title [-]DateTimeSensorAsync crashes DAG parsing with templated target_time + start_from_trigger=True[/-][+]DateTimeSensorAsync crashes Dag parsing with templated target_time + start_from_trigger=True[/+]on Jul 23, 2026
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Hi! I'd like to work on this one. The root cause is clear: DateTimeSensorAsync.__init__ parses target_time via timezone.parse at DAG-parse time, before Jinja rendering — so a templated target_time blows up parsing. I'll move the parse to execution time (or guard it) and add a test with a templated target_time. Submitting a PR shortly.
Correction: I see there are already three open PRs addressing this (#70310, #70459, #70576) — I won't duplicate their work. I'll retract my claim and review theirs instead. Apologies for the noise!
Hi, I’d like to work on this issue. I plan to reproduce the DAG parsing failure with a templated DateTimeSensorAsync value, review how similar operators delay parsing until after template rendering, implement the fix, and add regression tests for both templated and non-templated values. Is this issue still available?
Hi! I'd like to work on this. I'll reproduce, fix, add a regression test, and run the relevant tests. Please let me know if I can proceed / be assigned.
Hi, I'd like to work on this as my first Airflow contribution. I'll reproduce the issue locally, add regression coverage for a templated target_time with start_from_trigger=True, and investigate moving/guarding the parse-time conversion. Please let me know if anyone is already working on it.
Activity
[-]DateTimeSensorAsync crashes DAG parsing with templated target_time + start_from_trigger=True[/-][+]DateTimeSensorAsync crashes Dag parsing with templated target_time + start_from_trigger=True[/+]AIMindCrafter commentedon Jul 25, 2026
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
AaryanCdry commentedon Aug 2, 2026
Hi! I'd like to work on this one. The root cause is clear:
DateTimeSensorAsync.__init__parsestarget_timeviatimezone.parseat DAG-parse time, before Jinja rendering — so a templatedtarget_timeblows up parsing. I'll move the parse to execution time (or guard it) and add a test with a templatedtarget_time. Submitting a PR shortly.AaryanCdry commentedon Aug 2, 2026
Correction: I see there are already three open PRs addressing this (#70310, #70459, #70576) — I won't duplicate their work. I'll retract my claim and review theirs instead. Apologies for the noise!
jaydaVis04 commentedon Aug 6, 2026
Hi, I’d like to work on this issue. I plan to reproduce the DAG parsing failure with a templated DateTimeSensorAsync value, review how similar operators delay parsing until after template rendering, implement the fix, and add regression tests for both templated and non-templated values. Is this issue still available?
Fix DateTimeSensorAsync crash on templated target_time with start_fro…
LeonxLJX commentedon Aug 31, 2026
Hi! I'd like to look into the DateTimeSensorAsync crash with templated target_time. Thanks!
LeonxLJX commentedon Sep 1, 2026
Hi! I'd like to work on this. I'll reproduce, fix, add a regression test, and run the relevant tests. Please let me know if I can proceed / be assigned.
KushAgrawal1 commentedon Sep 9, 2026
Hi, I'd like to work on this as my first Airflow contribution. I'll reproduce the issue locally, add regression coverage for a templated target_time with start_from_trigger=True, and investigate moving/guarding the parse-time conversion. Please let me know if anyone is already working on it.