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
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.
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'
…y_delay is None (#56202)
* Kaxil's suggestions
* make default a float because some tests are complaining
* Fix test
* fixup! Fix test
* fixup! fixup! Fix test
---------
(cherry picked from commit 1f976d0)
Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
…y_delay is None (apache#56202)
* Kaxil's suggestions
* make default a float because some tests are complaining
* Fix test
* fixup! Fix test
* fixup! fixup! Fix test
---------
(cherry picked from commit 1f976d0)
Co-authored-by: Dheeraj Turaga <dheerajturaga@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
kaxil added a commit
that referenced
this pull request
Oct 1, 2025
…one (apache#56202)
* Kaxil's suggestions
* make default a float because some tests are complaining
* Fix test
* fixup! Fix test
* fixup! fixup! Fix test
---------
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Related: Airflow 3.0 to 3.1 migration compatibility