Fix mismatched AirflowConfigException in celery and edge3 - #72437
Merged
dheerajturaga merged 1 commit intoSep 6, 2026
Merged
dheerajturaga merged 1 commit into
dheerajturaga merged 1 commit into
Conversation
FrankYang0529
marked this pull request as ready for review
September 3, 2026 12:54
FrankYang0529
requested review from
dheerajturaga,
hussein-awala,
jscheffl and
shubhamraj-git
as code owners
September 3, 2026 12:54
Signed-off-by: PoAn Yang <payang@apache.org>
FrankYang0529
force-pushed
the
airflow-celery-edge3-config-exception
branch
from
September 4, 2026 06:17
2275b92 to
682277a
Compare
dheerajturaga
approved these changes
Sep 6, 2026
pierrejeambrun
pushed a commit
to astronomer/airflow
that referenced
this pull request
Sep 8, 2026
Signed-off-by: PoAn Yang <payang@apache.org>
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Sep 11, 2026
Signed-off-by: PoAn Yang <payang@apache.org>
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.
Why
from airflow.providers.common.compat.sdk import conf. celery and edge3 took the newconfbut leftAirflowConfigExceptioncoming fromairflow.exceptions.confresolves to the Task SDK parser, which raisesairflow.sdk._shared.configuration.exceptions.AirflowConfigException. The handlers nameairflow.exceptions.AirflowConfigException, so they never catch what the parser raises.default_celery.pyneeds both classes in the handler, becauseget_default_celery_config()also receives core'sExecutorConfon the multi-team path.How
celery_command.pyonly ever see the compatconf, soAirflowConfigExceptionnow comes from the same compat import line.get_default_celery_config()gets the compatconfat module scope and core'sExecutorConfon the multi-team path. Those two raise different classes, so the handler indefault_celery.pycatches both.Verification
uv run --project providers/celery pytest "providers/celery/tests/unit/celery/executors/test_celery_executor.py" "providers/celery/tests/unit/celery/cli/test_celery_command.py" "providers/edge3/tests/unit/edge3/plugins/test_edge_executor_plugin.py" -vWas generative AI tooling used to co-author this PR?
{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.