Related to #56205
Once all 1st party legacy plugins have been removed or migrated, we should disable legacy plugin discovery altogether, even for 3rd party plugins.
When we make this change, we also need to add a note to the "breaking changes" doc for 7.10
@elastic/stack-monitoring-ui
@elastic/kibana-app-arch
@elastic/kibana-core-ui
@elastic/es-ui
@elastic/logs-metrics-ui
@elastic/kibana-gis
@elastic/kibana-security
@elastic/kibana-platform
Pinging @elastic/kibana-platform (Team:Platform)
We are very close to being able to remove the legacy optimizer, however we still got some work to do before we will be able to totally drop legacy plugin discovery, as there are some remaining.
Done in https://github.com/elastic/kibana/pull/73016
This is used to expose elasticsearchUrl to the ui
I thought it could be done by exposing an endpoint that would access elasticsearch.legacy.config$, but I was wrong, as this property is only exposed on the internal / legacy contract. I moved https://github.com/elastic/kibana/issues/68497 back to 7.10, this removal is blocked by it.
cc @elastic/es-ui
It's exposing things like createCluster and getCluster, which may be removed if no more legacy plugins are using them (did not check usages in the legacy server code itself), but it's also exposing waitUntilReady which is tightly coupled with the legacy server itself. I guess this plugin will have to stay until the end of legacy.
EDIT: it seems it is also registering proxy routes to ES
Not sure who is consuming these, does anyone have an idea?
Still doing a few things:
Exporting the src/legacy/core_plugins/kibana/public/index.scss as styleSheetPaths. This seems closely related to https://github.com/elastic/kibana/issues/58369
Exporting some uiSettingDefaults
Not sure if related to https://github.com/elastic/kibana/issues/22779 or https://github.com/elastic/kibana/issues/59755
csp usage collectorNot sure I saw this one listed anywhere. csp config is now in core, so I guess this should probably be moved there, but we need a way to access usageCollection plugin from within core. Seems related to https://github.com/elastic/kibana/issues/56762#issuecomment-654423343
data foldercreated https://github.com/elastic/kibana/issues/73002
Done in https://github.com/elastic/kibana/pull/72017.
The empty app plugin left should safely be removed once the legacy optimizer is no more.
I have no idea what this is for. I see some karma references, is this only used for karma testing @elastic/kibana-operations?
Covered by https://github.com/elastic/kibana/pull/70930
Used to bridge the legacy status API to the KP plugin
Depends on https://github.com/elastic/kibana/issues/41983
Only here to expose some hacks (x-pack/legacy/plugins/security/public/hacks/legacy.ts) for the legacy apps. Should be good to remove as we no longer have any legacy apps? Or is this still used for management tabs @elastic/kibana-security
Not sure if these are still really used now that we don't have any app running in legacy mode? @elastic/kibana-security
replaceInjectedVars in uiExports. Seems to be used to add the activeSpace var. Not sure if this is still relevant @elastic/kibana-security?
getSpaceId and getActiveSpace on the serverThis seems fine to remove once we no longer have any other xpack server-side legacy plugin.
This one is doing quite a few things. I guess this will be the last xpack plugin to be removed.
@elastic/apm-ui Is this still used anywhere, or can the legacy apm_oss plugin be removed?
apm_oss is a dependency of xpack.apm so cannot be removed now or in the future. However, looking closer I see there are two apm_oss plugins:
I think that legacy/core_plugins/apm_oss can be merged into plugins/apm_oss.
From what I see, the remains are only used to expose indexPatterns to the server
I'm not sure if server.expose is still used for anything. it was added by @tylersmalley in https://github.com/elastic/kibana/pull/29845 so maybe he knows.
apm_oss is a dependency of xpack.apm so cannot be removed now or in the future. However, looking closer I see there are two apm_oss plugins:
Yea, we are only talking about legacy removal here (src/legacy/core_plugins/apm_oss)
Exporting some uiSettingDefaults
That's #59755 and https://github.com/elastic/kibana/issues/63459 not sure it's a real blocker. we can register them manually
Security
Only here to expose some hacks (x-pack/legacy/plugins/security/public/hacks/legacy.ts) for the legacy apps. Should be good to remove as we no longer have any legacy apps? Or is this still used for management tabs @elastic/kibana-security
Once we don't have any Angular based plugins then we can get rid of this completely. Maintaining /account ---> /security/account redirect isn't critical.
Spaces
Used to register some redirection routes
Not sure if these are still really used now that we don't have any app running in legacy mode? @elastic/kibana-security
Since these redirects don't seem to work right now anyway (likely because Management plugin migrated away from ui/routes, I think it's reasonable to drop legacy links (@legrego can keep me honest here).
expose the replaceInjectedVars in uiExports.
Seems to be used to add the activeSpace var. Not sure if this is still relevant @elastic/kibana-security?
It seems Infra is still using this. I believe they can switch to the contract Spaces KP plugins exposes now.
expose things such as getSpaceId and getActiveSpace on the server
This seems fine to remove once we no longer have any other xpack server-side legacy plugin.
Sounds good to me.
It seems Infra is still using this. I believe they can switch to the contract Spaces KP plugins exposes now.
@elastic/logs-metrics-ui do you have an issue to replace these space injectedVars with the spaces plugin API?
tests_bundle
I have no idea what this is for. I see some karma references, is this only used for karma testing @elastic/kibana-operations?
That's my understanding. @spalger is there anything else this is used for? Can we remove once all Karma test are removed (related: https://github.com/elastic/kibana/issues/71002)?
Yeah, this will go along with karma and the legacy optimizer
@pgayvallet It looks like https://github.com/elastic/kibana/blob/master/src/plugins/home/public/application/components/tutorial/tutorial.js#L206 makes a request to /elasticsearch/_msearch.
@elastic/logs-metrics-ui do you have an issue to replace these space injectedVars with the spaces plugin API?
Yes, we track it in #68142
Not sure I saw this one listed anywhere.
cspconfig is now incore, so I guess this should probably be moved there, but we need a way to accessusageCollectionplugin from within core. Seems related to #56762 (comment)
@elastic/kibana-telemetry any problems with us moving the CSP usage collector directly to the telemetry plugin for the time being?
EDIT: it seems it is also registering proxy routes to ES
https://github.com/elastic/kibana/blob/bf04235dae35452061cc7ea3d86d96c19a58206c/src/legacy/core_plugins/elasticsearch/server/lib/create_proxy.js#L26-L33
Not sure who is consuming these, does anyone have an idea?
I have opened new issues for each usage of these:
https://github.com/elastic/kibana/issues/73992
https://github.com/elastic/kibana/issues/73993
@joshdover seems like the issue in the kibana app section is actually on core UI, can you confirm?
Not sure I saw this one listed anywhere.
cspconfig is now incore, so I guess this should probably be moved there, but we need a way to accessusageCollectionplugin from within core. Seems related to #56762 (comment)@elastic/kibana-telemetry any problems with us moving the CSP usage collector directly to the telemetry plugin for the time being?
@joshdover after reviewing the collector, it looks like it only accesses to core public values. No problem on my end to move it to the _core-but-outside-core_ collectors in the plugin kibana_usage_collection. Or any other plugin owned by the platform team :)
Not sure I saw this one listed anywhere.
cspconfig is now incore, so I guess this should probably be moved there, but we need a way to accessusageCollectionplugin from within core. Seems related to #56762 (comment)@elastic/kibana-telemetry any problems with us moving the CSP usage collector directly to the telemetry plugin for the time being?
No objections here either. I wasn't aware that CSP even had a usage collector :)
@elastic/logs-metrics-ui do you have an issue to replace these space injectedVars with the spaces plugin API?
I removed the getInjectedVars() usage from the infra plugin in #74280, which closes #68142. Is there anything else in the plugin that blocks you in this effort?
@weltenwort Not that I am aware of, thanks Felix
Added #76416 to the list of blockers.
All blockers have been addressed. https://github.com/elastic/kibana/pull/77599 is the final PR that is going to close this issue.
Most helpful comment
@joshdover seems like the issue in the kibana app section is actually on core UI, can you confirm?