Repository navigation
Fix CeleryExecutor failing to load with Celery 5.7 - #76591
Merged
Merged
Conversation
raphaelauv
approved these changes
Nov 6, 2026
raphaelauv
left a comment
Contributor
There was a problem hiding this comment.
I just hit the problem in my CI , thanks for the fix
eladkal
approved these changes
Nov 6, 2026
Lee-W
added a commit
that referenced
this pull request
Nov 12, 2026
The CI upgrade bumps Celery to 5.7.0, which no longer exports `retry` from `celery.backends.database`, so importing the Celery executor fails and breaks core tests, K8S and PROD image e2e runs. Use tenacity's `retry` instead, as done on main in #76591.
Lee-W
added a commit
that referenced
this pull request
Nov 13, 2026
…x is released Celery 5.7 removed retry from celery.backends.database. The PROD image installs apache-airflow-providers-celery 4.0.0 from PyPI, which predates #76591, so CeleryExecutor fails to import and every PROD e2e and K8S CeleryExecutor job fails. Cap celery below 5.7 until a celery provider release with the fix is available.
Lee-W
added a commit
that referenced
this pull request
Nov 13, 2026
* [v3-4-test] CI: Upgrade important CI environment * [v3-4-test] Fix CeleryExecutor failing to load with Celery 5.7 The CI upgrade bumps Celery to 5.7.0, which no longer exports `retry` from `celery.backends.database`, so importing the Celery executor fails and breaks core tests, K8S and PROD image e2e runs. Use tenacity's `retry` instead, as done on main in #76591. * [v3-4-test] Keep Celery below 5.7 until a celery provider with the fix is released Celery 5.7 removed retry from celery.backends.database. The PROD image installs apache-airflow-providers-celery 4.0.0 from PyPI, which predates #76591, so CeleryExecutor fails to import and every PROD e2e and K8S CeleryExecutor job fails. Cap celery below 5.7 until a celery provider release with the fix is available. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Wei Lee <dev@wei-lee.me>
vatsrahul1001
pushed a commit
that referenced
this pull request
Nov 27, 2026
* [v3-4-test] CI: Upgrade important CI environment * [v3-4-test] Fix CeleryExecutor failing to load with Celery 5.7 The CI upgrade bumps Celery to 5.7.0, which no longer exports `retry` from `celery.backends.database`, so importing the Celery executor fails and breaks core tests, K8S and PROD image e2e runs. Use tenacity's `retry` instead, as done on main in #76591. * [v3-4-test] Keep Celery below 5.7 until a celery provider with the fix is released Celery 5.7 removed retry from celery.backends.database. The PROD image installs apache-airflow-providers-celery 4.0.0 from PyPI, which predates #76591, so CeleryExecutor fails to import and every PROD e2e and K8S CeleryExecutor job fails. Cap celery below 5.7 until a celery provider release with the fix is available. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Wei Lee <dev@wei-lee.me>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Celery 5.7.0 removed the
retrydecorator fromcelery.backends.database(celery/celery#10130), so importingcelery_executor_utilsfails andCeleryExecutorcan't load. The provider allowscelery<6, so a fresh install picks up 5.7.0.BulkStateFetcher._query_task_cls_from_db_backendnow uses tenacity with the same behavior as Celery's old decorator: up to 3 attempts on the same SQLAlchemy errors, a warning before each retry, and the last error re-raised. This works on every Celery version the provider supports. The integration test that checks the retry log message is updated for tenacity's wording. I checked the import and theBulkStateFetcherDB backend tests on Celery 5.6.3 and 5.7.0.closes: #76590
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5.5) following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.