Skip to content

Distinguish empty plugin folder from plugin load failures in logs - #72432

Merged
potiuk merged 1 commit into
apache:mainfrom
sreecharan-desu:fix-plugin-empty-folder-log
Sep 8, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
sreecharan-desu:fix-plugin-empty-folder-log

Conversation

@sreecharan-desu

Copy link
Copy Markdown

closes: #56816

Empty plugins/ on a new install was easy to read as a failure — per-file import errors already log at exception level, but the summary line didn't distinguish "nothing here" from "something broke".

  • debug when the folder is empty / has no valid plugins
  • warning with file list only when imports actually fail
  • unit test for the empty-folder case

Tested locally: uv run --project airflow-core pytest airflow-core/tests/unit/plugins/test_plugins_manager.py::TestPluginsManager::test_empty_plugins_folder_logs_no_failure airflow-core/tests/unit/plugins/test_plugins_manager.py::TestPluginsManager::test_loads_filesystem_plugins_exception -xvs

Empty plugins/ on a new install looked like a failure in the
summary line even when nothing was wrong; warn only when imports
actually fail.

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending green CI.

@sreecharan-desu

Copy link
Copy Markdown
Author

Thanks Sameer.

CI hasn't actually run yet on this one — the Checks tab only shows Mergeable/WIP. The AMD / CodeQL / newsfragment workflows are stuck on action_required (first-time contributor fork gate), so there's nothing green or red from the real suite yet.

If someone with write access can approve and run the workflows on the PR, I can chase any failures from there. Locally the two plugin tests I added passed.

@sreecharan-desu

Copy link
Copy Markdown
Author

Local run of the two tests this PR adds / extends — both green on my machine:

uv run --project airflow-core pytest \
  airflow-core/tests/unit/plugins/test_plugins_manager.py::TestPluginsManager::test_empty_plugins_folder_logs_no_failure \
  airflow-core/tests/unit/plugins/test_plugins_manager.py::TestPluginsManager::test_loads_filesystem_plugins_exception -xvs

local pytest — 2 passed

Still waiting on the fork workflow approval before GitHub CI can run the same checks here.

@SameerMesiah97

Copy link
Copy Markdown
Contributor

@sreecharan-desu

I dont have write access so I cannot approve the CI workflow. You can try posting the link to the PR in the contributors channel in the airflow slack.

@sreecharan-desu

sreecharan-desu commented Sep 8, 2026 •

Copy link
Copy Markdown
Author

Okay @SameerMesiah97, i've posted about it in the #new-contributors slack channel as well, so hopefully someone with write access can hit approve on the CI workflow when they get a moment

Thanks :D

@potiuk
potiuk merged commit 165b495 into apache:main Sep 8, 2026
78 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…ache#72432)

Empty plugins/ on a new install looked like a failure in the
summary line even when nothing was wrong; warn only when imports
actually fail.
regarmukesh3g pushed a commit to regarmukesh3g/airflow that referenced this pull request Sep 27, 2026
…ache#72432)

Empty plugins/ on a new install looked like a failure in the
summary line even when nothing was wrong; warn only when imports
actually fail.
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.

Improve log when there are no plugins to load

3 participants