Open mshustov opened 4 years ago
Pinging @elastic/kibana-platform (Team:Platform)
a preliminary list of changes on the server side to understand the magnitude of refactoring:
getImportExportObjectLimit
from saved object service API https://github.com/elastic/kibana/blob/97d1685c3dea682f80fd1a907bbc1d6f3702ea85/src/core/server/saved_objects/saved_objects_service.ts#L163context service API
I believe this one should still be in setup since it is used to expose a context provider registry to other plugins.
all the http API except create router
We even want to move to start
the lifecycle hook registrations such as registerOnPreAuth
?
We are going to start with logging a warning whenever lifecycle API is called outside of the current lifecycle timeframe https://github.com/elastic/kibana/issues/124039
From the very beginning Kibana platform uses a notion of lifecycles to separate runtime process into different stages:
However, all the stages exist merely as a convention. This has led to the fact that plugins (and the platform itself) mix functionality up and provide runtime API from setup phase. As a result, when the platform decided to refactor public contracts we have realized it cannot be done due to the number of existing external dependencies. Not the full list of the blocked tasks:
To prevent problems in the future, we are going to reinforce the separation of the lifecycle stages. Otherwise, we have to add defensive checks in the code that API can be called, which is an error-prone approach. By default API exposed from start lifecycle stage unless it's crucial to move it to the setup stage
Suggestions:
start
phase.Child tasks: