phanipaladugula commented on issue #60408:
URL: https://github.com/apache/airflow/issues/60408#issuecomment-3746078943

   Hi everyone,
   
   I've been analyzing this issue and would like to help resolve it.
   
   Root Cause: The error occurs in _deserialize_field_value within 
serialized_objects.py. When a field name ends in _date (like logical_date in 
the TriggerDagRunOperator), the deserializer assumes the value is a numeric 
timestamp and passes it to _deserialize_datetime. However, when using partial() 
with a template string (e.g., "{{ ts_nodash_with_tz }}"), the value is a 
string, causing timezone.from_timestamp() to throw a TypeError.
   
   I suggest updating _deserialize_datetime (or the logic in 
_deserialize_field_value) to include a type check. If the value is an instance 
of str, it should be returned as-is to allow for later Jinja rendering, rather 
than attempting to interpret it as a timestamp.
   
   I've seen that PR #60414 was opened recently; I am happy to collaborate on 
that or provide a comprehensive PR including unit tests for this specific 
mapped operator edge case.
   
   Please let me know if I should proceed!


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