Commit Graph

7 Commits

Author SHA1 Message Date
Armin Braun b7eafce32c
Make some practically static methods static (#97565)
Another round of automated fixes to this, marking things that can be
made static as static. Saves some JIT cycles but also turns some lambdas
from capturing to non-capturing and makes the "utilityness" of some
classes visible.
2023-10-06 23:37:07 +02:00
Przemyslaw Gomulka 2a7f61fb53
Scan stable plugins for named components upon install (#92528)
stable plugins not build with ES's gradle plugin will not have named_components.json file.
To allow these plugins to expose their named components, a scan can be performed upon install.

relates #88980
2023-01-18 18:19:02 +01:00
Chris Hegarty 77fe1b81bf
Ensure plugin class scanner always closes its directory stream (#93027) 2023-01-18 13:34:18 +00:00
Ryan Ernst 90f49de0f9
Delete temp jars in classfile tests sooner (#93019)
This commit more aggressively deletes the temporary jar files produced
to test jar scanning for plugins. By deleting right after use, any
leaked file handles should cause the tests to fail on windows.

relates #93005
2023-01-17 16:33:04 -08:00
Przemyslaw Gomulka 2cdaabe783
[Stable plugin api] Drop api suffix in package names (#92905)
Refactoring that drops the api suffix from package name
This will have to be followed up by a plugins/examples fix in imports
Also set an artifact group name to `org.elasticsearch.plugin` in the plugin-api and plugin-analysis-api
2023-01-14 09:49:37 +01:00
Ryan Ernst 98e067b3cd
Fix unclosed directory stream in ClassReaders (#92890)
Using Files.walk requires closing the returned stream. This commit fixes a helper method in ClassReaders to use try-with-resources with the returned stream.

closes #92866
2023-01-13 09:27:54 +01:00
Przemyslaw Gomulka ed83f9cc86
Refactor plugin scanning into lib (#92437)
new stable plugins require generated named_components.json file which contains all analysis components implemented by this plugin. The generation is currently done in build-tools by elasticsearch.stable-esplugin
However this makes the generation only available for plugins using gradle. Plugin developers using maven or other building tooling will not be able to use it.

This commits refactors the scanning logic into libs:plugin-scanner which will allow for plugin install command to perform the scanning too.

relates #88980
2023-01-09 15:25:54 +01:00