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
Return referenced by count with each action on the find API #49104
Return referenced by count with each action on the find API #49104
Conversation
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
0c89d1b
to
ded3cdd
Compare
This comment has been minimized.
This comment has been minimized.
@@ -101,6 +106,9 @@ export function shim( | |||
const initializerContext: ActionsPluginInitializerContext = { | |||
logger: newPlatform.coreContext.logger, | |||
config: { | |||
kibana$: Rx.of({ | |||
index: server.config().get('kibana.index'), | |||
}), |
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.
@rudolf is this the proper assumption based on #46240 (comment)? I recall reading and mention it will eventually move to saved objects.
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.
Yes that's our latest design. We initially thought kibana.index
belongs to the Saved Objects domain and so should be exposed from there, but the way actions and spaces (and maybe others) use kibana.index
it's become more like a tenant ID for having multiple kibana clusters share the same ES cluster. So it feels more like a global config than something limited to saved objects.
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.
Ya, I'll be needing it for the event log, which is independent of actions and alerts (but those USE event log), and it generates ES resources that should match config.get('kibana.index')
. So, having it in SO would be a little weird, since the event log doesn't use SO, and would only pre-req it to get the name of the kibana index.
This comment has been minimized.
This comment has been minimized.
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
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
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.
Code LGTM
@elasticmachine merge upstream |
💚 Build Succeeded |
…49104) * Initial work * .kibana index configurable, NP ready implementation * Fix broken jest tests * Fix broken functional tests * Add functional test * Cleanup actions_client.test.ts
In this PR, I'm changing the action find APIs to always return the number of saved objects referencing an action. A new attribute of
referencedByCount
is returned for every action returned by the find API.Assumptions: