Add smoke test for broken import#66846
Open
parkhojeong wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
The CI failure around jwt.types.Options does not seem related to this PR. |
d6880a1 to
fb5eae1
Compare
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.
Problem
A broken import is sitting in the codebase, undetected by any check.
task_handler_with_custom_formatter.pyhas broken import_render_template_to_stringfromairflow.utils.helpersRoot cause
The module-level
__getattr__makes mypy treat every undefined name as possibly valid. so imports of removed symbols pass without warningairflow.utils.helpershas a__getattr__deprecation shim that masks removed-symbol imports from mypy.Changes
Add a runtime smoke check for airflow.* module imports. Walks every module under
airflow.*and verifies it can be imported. not a replacement for static analysis, but a backstop for what it can't see.env.pymodules — require an Alembic runtime context.apache-beammodules — heavy optional dep. covered by providers-tests instead.breeze shell -c "python /opt/airflow/scripts/in_container/run_check_airflow_import_smoke.py"Notes
Happy to wire it into pre-commit/CI, or split the regression fix into a separate PR — whichever you'd prefer.
Was generative AI tooling used to co-author this PR?
Cluade Code(Opus5.7)