-
Notifications
You must be signed in to change notification settings - Fork 16.3k
POC/WIP on provider package discovery mechanism #10822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| onerror=ignore): | ||
| try: | ||
| if ispkg: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| onerror=ignore): | |
| try: | |
| if ispkg: | |
| onerror=ignore): | |
| if not ispkg: | |
| continue | |
| try: |
WDYT?
| import pkgutil | ||
|
|
||
|
|
||
| def get_provider_info(conn_type_to_hook, connection_types): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels similar to existing code in PluginsManager, and serves a similar purpose. What do you think about move this code in to there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure - it's really a POC which I prepared quickly - happy to move it there.
|
@kaxil - I missed this at the beginning of the call - this PR had "beta1" but I do not think it is actualy needed in beta1 (and this is a POC so I am going to re-implement it anyway in smaller pieces). I planned the work there for different betas to add those incrementally and split it into separate issues (all in https://github.com/apache/airflow/projects/5) |
|
@potiuk I've been having a quick look at using https://pluggy.readthedocs.io/en/latest/ (the plugin system from pytest) for this -- I'll let you know my thoughts |
Interesting. I have not yet come back to it - busy with CI optimisations, but will come back to it this week, so happy to hear your thoughts. this was just POC to see that it is possible but if there are ready-to-use solutions, I am happy to use them instead |
|
The main problem we we've run in to with the existing plugin mechanism (we ship some custom plugins in our Astronomer images) is that any conflicting deps means plugins are unloadable: Given the odds of some version conflict in a non-trival airflow install is quite high, using our existing plugin mechanism for more doesn't seem like a great idea. I haven't looked in detail yet at Pluggy, but somehow it doesn't suffer this same problem, even though it supports entrypoints. Also at first though I quite like the idea of a richer plugin mechanism in Airflow. |
Here is a POC/WIP of dynamic discovery for Provider packages .
This is a WIP of master version of the dynamic discovery of packages from #11163 . It needs completion. Details of the work needed are described in https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=100827303
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.