elastic / kibana

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

[meta] Remove 7 to 8 deprecated Core API's #142915

Closed TinaHeiligers closed 1 month ago

TinaHeiligers commented 2 years ago
Deprecated Core API's that need to be removed: target version domain package priority
8.8 application-browser TBD
8.8 application-browser mocks TBD
8.8 core-apps-browser-internal TBD
8.8 core-elasticsearch-server-internal TBD
8.8 core-http-browser-internal TBD
8.8 core-metrics-server-internal TBD
8.8 core-saved-objects-migration-server-internal TBD
8.8 core-saved-objects-server-internal TBD
8.8 core-status-server-internal TBD
8.8 core-usage-data-server-internal TBD
elasticmachine commented 2 years ago

Pinging @elastic/kibana-core (Team:Core)

pgayvallet commented 2 years ago

Some comments:

This is about onAppLeave and AppLeaveHandler. AFAIK this can't be removed until we find a proper replacement (see https://github.com/elastic/kibana/issues/132600)

It's about process on the Ops stats (OpsMetrics.process). This is surfacing to public APIs via the stats endpoints, so can we really remove this? Not sure who followed this point, @lukeelmers maybe?

It's about the legacy config exposure. We don't have a replacement for that yet (see https://github.com/elastic/kibana/issues/119862)

This is about the req and res shorthands on IHttpFetchError. Should use request and response instead. Depending on how many consumers are using these properties, it should be fairly easy to remove.

it's about SavedObjectsMigrationLogger.warning, deprecated in favor of .warn. Removal should be low risk and usages easily identified by the typescript checker, likely.

It's about SavedObjectAttributes that is deprecated in favor of just not using it. @rudolf any idea of the effort to remove the remaining usages in the code base?

rudolf commented 2 years ago

It's about SavedObjectAttributes that is deprecated in favor of just not using it. @rudolf any idea of the effort to remove the remaining usages in the code base?

I suspect it should be fairly easy for someone who knows the plugins (e.g. the owners) to remove this type. I don't think Core can do this, because often SavedObjectAttributes hides the fact that there isn't an existing type that actually fully describe the saved object type and for us to come up with such a type could be difficult.

TinaHeiligers commented 1 year ago

Additional deprecations for which we do not have a definitive action yet:

TinaHeiligers commented 1 year ago

147723 implements the following changes:

target version domain package notes
-- application-browser blocked by https://github.com/elastic/kibana/issues/132600: Deprecation replaced with remarks
-- application-browser mocks blocked by https://github.com/elastic/kibana/issues/132600: Deprecation replaced with remarks
-- core-apps-browser-internal process on the Ops stats (OpsMetrics.process) surfacing to public APIs via the stats endpoints, cannot remove: replaced deprecation with remarks
-- core-status-server-internal process on the Ops stats (OpsMetrics.process) surfacing to public APIs via the stats endpoints, cannot remove: replaced deprecation with remarks
-- core-metrics-server-internal process on the Ops stats (OpsMetrics.process) surfacing to public APIs via the stats endpoints, cannot remove: replaced deprecation with remarks
-- core-usage-data-server-internal process on the Ops stats (OpsMetrics.process) surfacing to public APIs via the stats endpoints, cannot remove: replaced deprecation with remarks
-- core-elasticsearch-server-internal blocked by https://github.com/elastic/kibana/issues/119862. no remove-by version target, leaving as is
removed core-saved-objects-migration-server-internal removed deprecated logger.warning & migrated log level to warn where needed
-- core-saved-objects-server-internal Core cannot remove the type. Removal dependent on consumer type-safety requirements

Still todo: core-http-browser-internal

TinaHeiligers commented 7 months ago

Penciling in myself to see this issue through, pending availability

TinaHeiligers commented 7 months ago

refers to new meta issue for 8 to 9 deprecations