Skip to content
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

Remove the legacy types from the platform public contract #77997

Closed
mshustov opened this issue Sep 21, 2020 · 4 comments
Closed

Remove the legacy types from the platform public contract #77997

mshustov opened this issue Sep 21, 2020 · 4 comments
Assignees
Labels
Feature:Legacy Removal Issues related to removing legacy Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc technical debt Improvement of the software architecture and operational architecture

Comments

@mshustov
Copy link
Contributor

Having removed the legacy plugin discovery we've got rid of the last pieces of the Legacy plugin system. We can clean up our public API from the legacy types added to ensure BWC with the legacy plugin system.
See kibana.d.ts, src/core/server/index.ts, src/core/public/index.ts.

@mshustov mshustov added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Sep 21, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@rudolf rudolf added the Feature:Legacy Removal Issues related to removing legacy Kibana label Dec 3, 2020
@mshustov mshustov mentioned this issue Apr 1, 2021
1 task
@lukeelmers lukeelmers added the technical debt Improvement of the software architecture and operational architecture label Jul 6, 2021
@lukeelmers lukeelmers added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 29, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Oct 29, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Nov 9, 2021
@TinaHeiligers TinaHeiligers self-assigned this Nov 23, 2021
@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Nov 23, 2021

@mshustov There's no direct export of any deprecated legacy types in src/core/server/index.ts or src/core/public/index.ts. Do we need to dig into each type grouping and remove legacy types from there?
e.g
We still have LegacyRequest in ensureRawRequest that wasn't handled in #109243.
Similarly, we're still using LegacyRequest in:

  1. ensureRawRequest
  2. AuthHeadersStorage
  3. AuthStateStorage
  4. BasePath

There are others that have been marked as deprecated and from digging through, I've come up with the following list to remove, keep and ones I'm not sure about:

Could you add a check to those that are in the right category please? Those that aren't right, we can discuss as a team. cc @elastic/kibana-core

To Remove:

From src/core/server/*:

From in src/core/public/*:

To keep:

  • SavedObjectsImportFailure.title —> sharing saved objects functionality
  • SavedObjectsImportSuccess.createNewCopy —> sharing saved objects functionality
  • UiSettingsParams.metric? —> using the ‘old’ ui_metric usage counters that we haven’t yet removed

Unknown

Should these be removed or do we need to keep them?

@mshustov
Copy link
Contributor Author

There's no direct export of any deprecated legacy types in src/core/server/index.ts or src/core/public/index.ts.

Then we can close the issue. We are interested in removing unused legacy types from public API mostly.

Do we need to dig into each type grouping and remove legacy types from there?
Should these be removed or do we need to keep them?

We need to come up with a plan to remove deprecated API eventually but it's not the highest priority right now. You can create a new issue listing your findings from To Remove section to track the deprecated API and their usage across the codebase.

Similarly, we're still using LegacyRequest in:

We need to reference Hapi.Request in the codebase. Probably we should remove substitute LegacyRequest type with Hapi.Requst to remove this ambiguity.

@TinaHeiligers
Copy link
Contributor

I've created follow up issues to address the specific tasks from #77997 (comment). Closing this issue as there aren't any legacy types exported from the public core API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Legacy Removal Issues related to removing legacy Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

5 participants