dheerajturaga opened a new pull request, #56202:
URL: https://github.com/apache/airflow/pull/56202

     During migration from Airflow 3.0 to 3.1, some task instances may have
     retry_delay set to None due to serialization/deserialization changes or
     database migration issues. This causes the scheduler to crash with:
   
     TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 
'NoneType'
   
     The error occurs in TaskInstance.next_retry_datetime() when attempting to
     add a None retry_delay to end_date.
   
     This fix adds a null check and falls back to DEFAULT_RETRY_DELAY 
(configured
     via core.default_task_retry_delay, defaults to 300 seconds) when 
retry_delay
     is None, preventing the scheduler crash while maintaining proper retry 
behavior.
   
     Fixes: scheduler crash in next_retry_datetime() method
     Related: Airflow 3.0 to 3.1 migration compatibility
   
   ```
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py",
 line 991, in next_retry_datetime
       return self.end_date + delay
              ~~~~~~~~~~~~~~^~~~~~~  
   TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 
'NoneType'           
   ```


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