elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[Cases] Use the `CasesContext` to pass the Kibana services #168178

Open cnasikas opened 9 months ago

cnasikas commented 9 months ago

The Security solution, Observability, and the Stack are using cases. When Cases require a new service (dependency), we have to go to all solutions, add that service as a dependency, and pass it to the KibanaContext. Ideally, we should not force solutions to increase their dependencies if they do not use it already. To do that, we should pass our services to the CasesContext.

elasticmachine commented 9 months ago

Pinging @elastic/response-ops (Team:ResponseOps)

elasticmachine commented 9 months ago

Pinging @elastic/response-ops-cases (Feature:Cases)

cnasikas commented 4 months ago

Also, in https://github.com/elastic/kibana/pull/177132 it was made apparent that our plugin lifecycle types (CasesServerSetup and CasesServerStart) are not correct because even though cases have some plugins as required in the kibana.jsonc we have to define them as optional in the types. The reason is that some plugins, like the ML, do not pass all required dependencies to the KibanaContext.