Register stable plugins in ActionModule#90067
Merged
pgomulka merged 21 commits intoelastic:mainfrom Sep 21, 2022
Merged
Conversation
Stable plugins are using @extensible and @NamedComponents annotations to mark components to be loaded. This commit is loading extensible classNames from extensibles.json and named components from named_components.json relates elastic#88980
…ticsearch into plugin_scanning_just_files
Collaborator
|
Hi @pgomulka, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| public AnalysisModule(Environment environment, List<AnalysisPlugin> plugins) throws IOException { | ||
| NamedRegistry<AnalysisProvider<CharFilterFactory>> charFilters = setupCharFilters(plugins); | ||
| public AnalysisModule(Environment environment, List<AnalysisPlugin> plugins, StablePluginsRegistry stablePluginRegistry) | ||
| throws IOException { |
Contributor
There was a problem hiding this comment.
Does it make sense to retain the 2-arg constructor, which can delegate to the 3-arg with a new StablePluginsRegistry(), as the third arg?
Contributor
Author
There was a problem hiding this comment.
from the "production" code point of view it makes no sense. Using the 2arg constructor would be wrong (but analysisModule is created in one place only anyway).
It would simplify the testing though. Like in this PR a big chunk of changes are test changes due to this constructor.
Do you think we should have a 2arg constructor for the sake of these tests?
thecoop
reviewed
Sep 15, 2022
server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java
Show resolved
Hide resolved
thecoop
reviewed
Sep 15, 2022
server/src/main/java/org/elasticsearch/common/NamedRegistry.java
Outdated
Show resolved
Hide resolved
thecoop
reviewed
Sep 15, 2022
server/src/main/java/org/elasticsearch/indices/analysis/wrappers/StableApiWrappers.java
Show resolved
Hide resolved
Member
|
LGTM |
thecoop
approved these changes
Sep 21, 2022
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Sep 22, 2022
* main: (186 commits) [DOCS] Add 8.5 release notes and fix links (elastic#90201) Mute DownsampleActionSingleNodeTests.testCannotRollupWhileOtherRollupInProgress (elastic#90198) Bump to version 8.6.0 Increase the minimum size of the management pool to 2 (elastic#90193) Speed `getIntLE` from `BytesReference` (elastic#90147) Restrict nodes for testClusterPrimariesActive1 (elastic#90191) Fix bug with `BigIntArray` serialization (elastic#90142) Synthetic _source: test _source filtering (elastic#90138) Modernize cardinality agg tests (elastic#90114) Mute failing test (elastic#90186) Move assertion in ES85BloomFilterPostingsFormat to fix test (elastic#90150) Restrict nodes for testClusterPrimariesActive2 (elastic#90184) Batch index delete cluster state updates (elastic#90033) Register stable plugins in ActionModule (elastic#90067) Mute failing test (elastic#90180) [HealthAPI] Disk: Use _ for diagnosis id (elastic#90179) [HealtAPI] Disk: use shorter help URLs (elastic#90178) Fixing disk health indicator unit tests (elastic#90175) Enable the health node and the disk health indicator elastic#84811 (elastic#90085) Add missing Disk Indicator health api IDs (elastic#90174) ...
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Sep 22, 2022
* main: (121 commits) [DOCS] Add 8.5 release notes and fix links (elastic#90201) Mute DownsampleActionSingleNodeTests.testCannotRollupWhileOtherRollupInProgress (elastic#90198) Bump to version 8.6.0 Increase the minimum size of the management pool to 2 (elastic#90193) Speed `getIntLE` from `BytesReference` (elastic#90147) Restrict nodes for testClusterPrimariesActive1 (elastic#90191) Fix bug with `BigIntArray` serialization (elastic#90142) Synthetic _source: test _source filtering (elastic#90138) Modernize cardinality agg tests (elastic#90114) Mute failing test (elastic#90186) Move assertion in ES85BloomFilterPostingsFormat to fix test (elastic#90150) Restrict nodes for testClusterPrimariesActive2 (elastic#90184) Batch index delete cluster state updates (elastic#90033) Register stable plugins in ActionModule (elastic#90067) Mute failing test (elastic#90180) [HealthAPI] Disk: Use _ for diagnosis id (elastic#90179) [HealtAPI] Disk: use shorter help URLs (elastic#90178) Fixing disk health indicator unit tests (elastic#90175) Enable the health node and the disk health indicator elastic#84811 (elastic#90085) Add missing Disk Indicator health api IDs (elastic#90174) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovered (loaded from named_components.json) stable plugins are stored in StablePluginRegistry
In order for a plugin to be accessible it has to be registered in ActionModule.
Stable plugins are implementing a new api (stable-plugin-api and plugin-api) and have to be wrapped with old api to allow the code to work together with the old plugins.
The plugins at the moment are expected to have only a no-arg constructor.
relates #88980