-
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
Allow bootstrap plugins to appear in _cat/plugins #66260
Allow bootstrap plugins to appear in _cat/plugins #66260
Conversation
Bootstrap plugins are not loaded in the main Elasticsearch process, but instead take effect only when ES is starting. As such, these plugins are skipped when ES loads all installed plugins. As a result, it was impossible for the plugins _cat API to report whether any bootstrap plugins are installed. Fix this by adjusting how the loading process skips bootstrap plugins, and then tweaking the plugins _cat API so that bootstrap plugins can optionally be included in the response.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@@ -106,12 +113,16 @@ private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoR | |||
continue; | |||
} | |||
for (PluginInfo pluginInfo : plugins.getPluginInfos()) { | |||
if (pluginInfo.getType() == PluginType.BOOTSTRAP && includeBootstrapPlugins == false) { |
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.
We don't seem to have any unit tests for this class. Would it be possible to add a simple one? The packaging tests added seem to be testing this new flag, but that doesn't seem like the right place, since the flag doesn't directly have anything to do with the quota aware fs plugin, it's just the only example we have so far a bootstrap plugin.
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.
@rjernst I've added unit tests, please take a look.
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.
LGTM. Thanks @pugnascotia!
Closes #66107. Bootstrap plugins are not loaded in the main Elasticsearch process, but instead take effect only when ES is starting. As such, these plugins are skipped when ES loads all installed plugins. As a result, it was impossible for the plugins _cat API to report whether any bootstrap plugins are installed. Fix this by adjusting how the loading process skips bootstrap plugins, and then tweaking the plugins _cat API so that bootstrap plugins can optionally be included in the response.
Closes #66107.
Bootstrap plugins are not loaded in the main Elasticsearch process, but
instead take effect only when ES is starting. As such, these plugins are
skipped when ES loads all installed plugins.
As a result, it was impossible for the plugins _cat API to report
whether any bootstrap plugins are installed.
Fix this by adjusting how the loading process skips bootstrap plugins,
and then tweaking the plugins _cat API so that bootstrap plugins can
optionally be included in the response.