Skip to content

Fix celery provider ImportError on airflow 3.2.x by gating ExecutorWorkload on 3.3+#65752

Merged
ferruzzi merged 1 commit intoapache:mainfrom
anishgirianish:fix-celery-execute-workload-3-3-gate
Apr 24, 2026
Merged

Fix celery provider ImportError on airflow 3.2.x by gating ExecutorWorkload on 3.3+#65752
ferruzzi merged 1 commit intoapache:mainfrom
anishgirianish:fix-celery-execute-workload-3-3-gate

Conversation

@anishgirianish
Copy link
Copy Markdown
Contributor


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

celery_executor_utils.execute_workload gates the new ExecutorWorkload / BaseExecutor.run_workload path on AIRFLOW_V_3_2_PLUS, but both symbols were only added on main (3.3+). On airflow 3.2.0 every celery task fails with:

ImportError: cannot import name 'ExecutorWorkload' from 'airflow.executors.workloads'

Fix: add AIRFLOW_V_3_3_PLUS and move the gate (+ rename the fallback helper to _execute_workload_pre_3_3).

Surfaced while verifying #65702 (celery 3.19.0rc1). Regression from #62645.


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

@anishgirianish
Copy link
Copy Markdown
Contributor Author

anishgirianish commented Apr 24, 2026

cc: @shahar1 @ferruzzi

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 24, 2026

I think we should add some executor tests with compatibility tests. We do not seem to test compatibility for executors in our compat tests. It's the second time when the tests were not catching something I think.

Anyone could take a look maybe?

Copy link
Copy Markdown
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add some executor tests with compatibility tests

+1

@ferruzzi ferruzzi merged commit c9e175d into apache:main Apr 24, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants