-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Plugin entry points using Settings.getAsClass are broken #12656
Comments
This code is really broken, this class needs to die right here and now, there is no other way about it. |
I'm sorry... I don't see any problem with I agree with that in general, all plugin points should be exposed as methods on the relevant modules (and the |
I'll bite: I consider this blocker issue open until this class is removed. If you like it, go get it from source history. |
sure... I'm immuned :)
I don't know This issue however is about If you want to remove it, sure... go ahead, but at the same time provide a good alternative that doesn't force a single place in the code knowing about all the services in the codebase(s). In other words, If modules And if you do provide an alternative that enables same level of modularity, that'd be awesome. But then it's a cleanup as it doesn't really fix any bugs, and therefore I don't see any reason for it to be a blocker for beta1. The referenced bug in this issue has nothing to do with the sole existence of |
I care very very little about this. The top priority is making sure that the code we load up and use, the classes themselves, are correct. This is fundamental to a working application. |
The underlying issue (which took me a lot more reading to understand thanks to tons of concepts with modules, services, components, etc) is |
As a side comment, the problem with Long story short, removing any class loading functionality from |
@costin absolutely... agree that |
the default classloader. It had all kinds of leniency in how the classname was found, and simply cannot work with plugins having isolated classloaders. This change removes that method. Some of the uses of it were for custom extension points, like custom repository or discovery types. A lot were just there to plugin mock implementations for tests. For the settings that were legitimate, all now support plugins adding the given setting via onModule. For those that were specific to tests for mocks, they now use Classes.loadClass (a helper around Class.forName). This is a temporary measure until (in a future PR) tests can change the implementation via package private statics. I also removed a number of unnecessary intermediate modules, added a "jvm-example" plugin that can be filled in in the future as a smoke test for breaking plugins, and gave some documentation to "spawn" modules interface. closes elastic#12643 closes elastic#12656
I think the underlying issue in #12643 is how
SpawnModules
works. This is an entry point for various pluggable classes that goes out and tries to load plugged in modules from the classloader. However, this no longer works now that plugins get their own classloader.I think the right thing to do is eliminate SpawnModules altogether. Any plugin entry points should:
I think this has to block 2.0 beta, otherwise many plugins are just broken (like all the discovery plugins right now).
The text was updated successfully, but these errors were encountered: