[tribe] Creates single interface to retrieve clusters#9266
[tribe] Creates single interface to retrieve clusters#9266tylersmalley merged 3 commits intoelastic:tribe-node-supportfrom
Conversation
1d3f027 to
2ca13be
Compare
There was a problem hiding this comment.
Not set on adding, but needed to make it configurable for the tests to complete faster. I have heard of users manually changing the constant in health_check.js.
jbudz
left a comment
There was a problem hiding this comment.
Thoughts on renaming callAsKibanaUser --> callAsKibanaServerUser or callWithServerAuthentication/something along those lines to avoid any ambiguity? In the case of not using the security plugin, the default user isn't necessarily kibana.
There was a problem hiding this comment.
callAsKibanaUser? Yeah, it's being passed as callAdminAsKibanaUser which is defined on line 20. I can see how that is confusing. Thoughts on what we can rename it to? caller?
|
jenkins, test this |
|
Test failures seem to be legitimate |
Previous we had been adding interfaces directly to the Hapi plugin (client, ElasticsearchClientLogging, createClient, callWithRequestFactory, callWithRequest). Since we are now further expanding on that functionality but adding another cluster (Admin/Data), it's time to clean up the interface. This adds getCluster and createCluster to server.plugins.elasticsearch. getCluster now returns a cluster object which contains the config (including log), createClient, callWithRequestFactory and callWithRequest. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
fd17313 to
56c1699
Compare
What about calling it Thoughts? |
|
@jbudz, tests are now passing. |
|
@tylersmalley call may be confusing with Function.call |
| } | ||
|
|
||
| if (!api) { | ||
| throw new Error(`callWithRequest called with an invalid endpoint: ${endpoint}`); |
There was a problem hiding this comment.
callWithRequest = callAsKibanaUser?
|
Ah, I spaced on that. We could do |
c2b16b9 to
a50eaa1
Compare
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
a50eaa1 to
3be9a5d
Compare
Previously we had been adding interfaces directly to the Hapi plugin (
client,ElasticsearchClientLogging,createClient,callWithRequestFactory,callWithRequest). Since we are now further expanding on that functionality but adding another cluster (Admin/Data), it's time to clean up the interface.This adds getCluster and createCluster to
server.plugins.elasticsearch. getCluster now returns a cluster object which contains theconfig(including log),createClient,callWithRequestFactoryandcallWithRequest.For #9132