-
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
Use transport actions instead of guice for xpack info #43449
Conversation
The Xpack info API internally gathers all xpack feature sets by using guice to bind many implementations. The info api then iterates over these feature sets to gather usage information for each. However, since each of these implementations are in different plugins, there is no direct, non-guice way for them to register the implementations. This commit removes the dependence on guice for the info api by having the core xpack jar contain an action instance for each plugin, and the implementation of those actions are then registered within each xpack feature plugin. The info api then iterates over each of these actions and calls them with the NodeClient.
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.
overall looks good! just a nit and request for more javadoc
I suspect there are existing xpack info rest tests that are unchanged, right?
...plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackUsageAction.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/elasticsearch/xpack/core/action/XPackInfoFeatureTransportAction.java
Show resolved
Hide resolved
@talevy I addressed your comments. In answer to your question about tests: yes, there are existing tests for all the info action implementations. These are just the feature set tests we had before but renamed. |
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 pending some test fixes
Pinging @elastic/es-core-infra |
The Xpack info API internally gathers all xpack feature sets by using
guice to bind many implementations. The info api then iterates over
these feature sets to gather usage information for each. However, since
each of these implementations are in different plugins, there is no
direct, non-guice way for them to register the implementations. This
commit removes the dependence on guice for the info api by having the
core xpack jar contain an action instance for each plugin, and the
implementation of those actions are then registered within each xpack
feature plugin. The info api then iterates over each of these actions
and calls them with the NodeClient.