fix: improve plugin loading log messages to distinguish empty folder from errors#62819
Open
turanalmammadov wants to merge 1 commit intoapache:mainfrom
Open
fix: improve plugin loading log messages to distinguish empty folder from errors#62819turanalmammadov wants to merge 1 commit intoapache:mainfrom
turanalmammadov wants to merge 1 commit intoapache:mainfrom
Conversation
Previously, when no plugins were present in the plugins folder, the loading summary log was identical to a successful load. This made it hard to distinguish between an empty plugin directory and errors. Changes: - When import_errors exist: emit a WARNING listing all failing plugin paths so operators can quickly see what broke - When no plugins and no errors: emit a clear DEBUG message indicating the plugins folder is empty / contains no Airflow plugins - When plugins are loaded successfully: keep the existing debug timing message Closes apache#56816 Made-with: Cursor
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
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.
Motivation
Closes #56816
The current logging in
plugins_manager.pyhas one generic timing debug message regardless of whether:This makes it hard for operators and developers to quickly understand the plugin loading state.
Changes
Updated
_get_plugins()inairflow-core/src/airflow/plugins_manager.py:Before:
After:
Why this approach
WARNINGso they are visible in default log configurations and clearly list which plugins failed — making debugging much easier.DEBUGmessage so developers inspecting debug logs can understand why no plugins are active.Testing
The change is straightforward — no new tests needed as the logic is covered by existing plugin loading tests.
Made with Cursor