1fanwang commented on issue #70953:
URL: https://github.com/apache/airflow/issues/70953#issuecomment-5186713783

   Verified [Fix DateTimeSensor crash when target_time renders to a 
datetime](https://github.com/apache/airflow/pull/70320) on `standard 
1.17.0rc1`. Works as intended.
   
   Airflow 3.3.0, two identical virtualenvs: one with the RC providers, one 
with the previous stable release. Same Dag, same command, run through the real 
task runner. RPC is stubbed, and the stub asserts the value that actually 
reaches it.
   
   A `DateTimeSensor` whose `target_time` renders to a native `datetime` rather 
than a string.
   
   ```bash
   # standard 1.17.0rc1
   AIRFLOW_HOME=$PWD/airflow_home \
   AIRFLOW__CORE__DAGS_FOLDER=$PWD/dags_e2e/rc_70320_datetime_sensor \
     .venv/bin/airflow dags test rc_70320_datetime_sensor
   
   # standard 1.16.0, identical Dag
   AIRFLOW_HOME=$PWD/airflow_home_prev \
   AIRFLOW__CORE__DAGS_FOLDER=$PWD/dags_e2e/rc_70320_datetime_sensor \
     .venv-prev/bin/airflow dags test rc_70320_datetime_sensor
   ```
   
   ```
   # standard 1.17.0rc1
   RC_CHECK_OK DateTimeSensor poked with a native datetime and passed
   state=success
   
   # standard 1.16.0
   TypeError: argument 'input': 'DateTime' object cannot be cast as 'str'
   state=failed
   ```


-- 
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]

Reply via email to