Skip to content

Conversation

@github-actions
Copy link

The DAG processor would crash when parsing_pre_import_modules=True and
a DAG imported a provider with missing optional dependencies. This occurred
because providers raise AirflowOptionalProviderFeatureException for missing
dependencies, but the pre-import code only caught ModuleNotFoundError.

This was a regression from Airflow 2.x where the original implementation
correctly caught all exceptions. The pre-import optimization is non-critical
and should never crash the DAG processor - any import errors are properly
handled later during actual DAG parsing.

Fixes #56755
(cherry picked from commit 9ef4f12)

Co-authored-by: Kaxil Naik [email protected]

@potiuk potiuk closed this Oct 17, 2025
@potiuk potiuk reopened this Oct 17, 2025
…on (#56773)

The DAG processor would crash when parsing_pre_import_modules=True and
a DAG imported a provider with missing optional dependencies. This occurred
because providers raise `AirflowOptionalProviderFeatureException` for missing
dependencies, but the pre-import code only caught `ModuleNotFoundError`.

This was a regression from Airflow 2.x where the original implementation
correctly caught all exceptions. The pre-import optimization is non-critical
and should never crash the DAG processor - any import errors are properly
handled later during actual DAG parsing.

Fixes #56755
(cherry picked from commit 9ef4f12)

Co-authored-by: Kaxil Naik <[email protected]>
@potiuk potiuk force-pushed the backport-9ef4f12-v3-1-test branch from 2d87b8a to 20008cd Compare October 18, 2025 23:01
@potiuk potiuk merged commit 45fc1ac into v3-1-test Oct 18, 2025
60 checks passed
@potiuk potiuk deleted the backport-9ef4f12-v3-1-test branch October 18, 2025 23:52
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.

2 participants