You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "LarytheLord (via GitHub)" <gi...@apache.org> on 2026/03/05 17:52:20 UTC
[PR] Fix duplicate plugin names by surfacing import errors [airflow]
LarytheLord opened a new pull request, #62954:
URL: https://github.com/apache/airflow/pull/62954
## Summary
Fixes #55140.
When two plugins share the same `AirflowPlugin.name`, Airflow currently logs a warning and silently skips the duplicate. This can hide the real problem from users (especially when only one plugin appears in UI/API).
This change keeps the current non-blocking behavior (subsequent plugins still load), but also records duplicate plugin-name conflicts as import errors so the issue is visible and actionable.
## Changes
- In `airflow.plugins_manager._get_plugins()`:
- track loaded plugin names with their source
- on duplicate name:
- keep warning log
- add an explicit entry to `import_errors`
- Update unit test coverage in `test_plugins_manager.py`:
- `test_duplicate_plugin_name_is_reported_and_does_not_prevent_loading_subsequent_plugins`
- verifies duplicate is reported in `import_errors` while unique plugins still load
## Why this approach
- Surfaces the conflict as a concrete error instead of only a warning.
- Preserves existing resilience: one bad/duplicate plugin does not block other plugins.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #62954: Fix duplicate plugin names by surfacing import errors
URL: https://github.com/apache/airflow/pull/62954
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62954:
URL: https://github.com/apache/airflow/pull/62954#issuecomment-4194934410
@LarytheLord This PR has been converted to **draft** because it does not yet meet our [Pull Request quality criteria](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-quality-criteria).
**Issues found:**
- :x: **Provider tests**: Failing: Basic tests / Shared providers_discovery tests. Run provider tests with `breeze run pytest <provider-test-path> -xvs`. See [Provider tests docs](https://github.com/apache/airflow/blob/main/contributing-docs/12_provider_distributions.rst).
- :x: **Image build**: Failing: Build CI images / Build CI linux/amd64 image 3.10. Check that Dockerfiles and dependencies are correct. See [Image build docs](https://github.com/apache/airflow/blob/main/contributing-docs/03a_contributors_quick_start_beginners.rst).
- :x: **Other failing CI checks**: Failing: Basic tests / Shared listeners tests, Basic tests / Shared timezones tests, Basic tests / Shared secrets_masker tests, Basic tests / Shared configuration tests, Basic tests / Shared logging tests (+5 more). Run `prek run --from-ref main` locally to reproduce. See [static checks docs](https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst).
> **Note:** Your branch is **628 commits behind `main`**. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.
**What to do next:**
- The comment informs you what you need to do.
- Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
- There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates.
- Maintainers will then proceed with a normal review.
Converting a PR to draft is **not** a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the [Airflow Slack](https://s.apache.org/airflow-slack).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "LarytheLord (via GitHub)" <gi...@apache.org>.
LarytheLord commented on PR #62954:
URL: https://github.com/apache/airflow/pull/62954#issuecomment-4006696785
Follow-up validation on this branch:
- `uvx ruff check airflow-core/src/airflow/plugins_manager.py airflow-core/tests/unit/plugins/test_plugins_manager.py`
- `uvx ruff format --check airflow-core/src/airflow/plugins_manager.py airflow-core/tests/unit/plugins/test_plugins_manager.py`
Both pass.
I also attempted to run the targeted pytest case for `test_plugins_manager.py -k duplicate_plugin_name`, but this local environment started bootstrapping the full monorepo dependency set and did not complete in a reasonable time window. CI on the PR should run the full project test matrix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #62954:
URL: https://github.com/apache/airflow/pull/62954#issuecomment-4006689232
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)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "LarytheLord (via GitHub)" <gi...@apache.org>.
LarytheLord commented on PR #62954:
URL: https://github.com/apache/airflow/pull/62954#issuecomment-4012174330
Rebased on latest `main` to satisfy up-to-date checks. No functional changes beyond the existing fix + test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix duplicate plugin names by surfacing import errors [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62954:
URL: https://github.com/apache/airflow/pull/62954#issuecomment-4331426169
@LarytheLord This draft PR has been inactive for 21 days since the last triage comment and no response from the author. Closing to keep the queue clean.
You are welcome to reopen this PR when you resume work, or to open a new one addressing the issues previously raised. There is no rush — take your time.
---
_Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this [two-stage triage process](https://github.com/apache/airflow/blob/main/contributing-docs/25_maintainer_pr_triage.md#why-the-first-pass-is-automated) so that our maintainers' limited time is spent where it matters most: the conversation with you._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org