Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix scheduler crash during 3.0 to 3.1 migration when retry_delay is None#56202

Merged
kaxil merged 5 commits intoapache:mainfrom
dheerajturaga:bugfix/scheduler-crash-3_0-to-3_1
Sep 30, 2025
Merged

Fix scheduler crash during 3.0 to 3.1 migration when retry_delay is None#56202
kaxil merged 5 commits intoapache:mainfrom
dheerajturaga:bugfix/scheduler-crash-3_0-to-3_1

Conversation

Copy link
Member

dheerajturaga commented Sep 29, 2025 *
edited
Loading

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/m odels/taskinstance.py", line 991, in next_retry_datetime
return self.end_date + delay
~~~~~~~~~~~~~~^~~~~~~
TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 'NoneType'

dheerajturaga requested review from XD-DENG and ashb as code owners September 29, 2025 10:27
Copy link
Member

ashb commented Sep 29, 2025

cc @kaxil

ashb added the affected_version:3.1 Issues Reported for 3.1 label Sep 29, 2025
ashb requested a review from kaxil September 29, 2025 12:49
Copy link
Member

kaxil commented Sep 29, 2025

@dheerajturaga Could you post steps to reproduce it, please?

kaxil reviewed Sep 29, 2025
kaxil added this to the Airflow 3.1.1 milestone Sep 29, 2025
dheerajturaga requested a review from bolkedebruin as a code owner September 29, 2025 15:45
kaxil reviewed Sep 29, 2025
dheerajturaga force-pushed the bugfix/scheduler-crash-3_0-to-3_1 branch from 11533cb to 3176369 Compare September 29, 2025 16:08
dheerajturaga requested review from gopidesupavan and potiuk as code owners September 29, 2025 16:08
kaxil reviewed Sep 29, 2025
kaxil approved these changes Sep 30, 2025
kaxil added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Sep 30, 2025
kaxil merged commit 1f976d0 into apache:main Sep 30, 2025
108 checks passed
Copy link
Member Author

dheerajturaga commented Sep 30, 2025

@kaxil , Thanks for fixing the tests!

github-actions bot pushed a commit that referenced this pull request Sep 30, 2025
...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
Co-authored-by: Kaxil Naik
Copy link

github-actions bot commented Sep 30, 2025

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test

dheerajturaga deleted the bugfix/scheduler-crash-3_0-to-3_1 branch September 30, 2025 02:33
github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Sep 30, 2025
...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
Co-authored-by: Kaxil Naik
abdulrahman305 bot pushed a commit to qenex-ai/airflow 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
kaxil added a commit that referenced this pull request Oct 1, 2025
...y_delay is None (#56202) (#56236)

---------
(cherry picked from commit 1f976d0)

Co-authored-by: Dheeraj Turaga
Co-authored-by: Kaxil Naik
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 2, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 3, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 4, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 5, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 5, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 7, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 8, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 9, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 10, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 11, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 12, 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
dabla pushed a commit to dabla/airflow that referenced this pull request Oct 12, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 14, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 15, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 17, 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
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 19, 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
potiuk mentioned this pull request Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

kaxil kaxil approved these changes

XD-DENG Awaiting requested review from XD-DENG

ashb Awaiting requested review from ashb ashb is a code owner

bolkedebruin Awaiting requested review from bolkedebruin bolkedebruin is a code owner

potiuk Awaiting requested review from potiuk potiuk is a code owner

gopidesupavan Awaiting requested review from gopidesupavan gopidesupavan is a code owner

Assignees

No one assigned

Labels

affected_version:3.1 Issues Reported for 3.1 backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Milestone

Airflow 3.1.1

Development

Successfully merging this pull request may close these issues.

3 participants