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

Move src/legacy/server/index_patterns to data plugin (server) #44190

Closed
5 tasks done
lukeelmers opened this issue Aug 27, 2019 · 5 comments
Closed
5 tasks done

Move src/legacy/server/index_patterns to data plugin (server) #44190

lukeelmers opened this issue Aug 27, 2019 · 5 comments
Assignees
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:NP Migration

Comments

@lukeelmers
Copy link
Member

lukeelmers commented Aug 27, 2019

  • Remove any direct calls to _fields_for_wildcard and _fields_for_time_pattern routes and replace with usages of IndexPatternsService (server), or index_patterns_api_client (client).
  • Convert errors.js to TS
  • Convert resolve_time_pattern.js to TS
  • Update routes to register with core.http & convert to TS
  • [ ] Leave behind legacy indexPatternsServiceFactory for backwards compatibility, and instead look into whether we can replace this by providing a scoped instance of IndexPatternsService via the handler context pattern, available in the core.context service
  • Delete src/legacy/server/index_patterns as it should no longer be in use anywhere in Kibana (and of course triple check that this is correct).

Part of #43438

@lukeelmers lukeelmers added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppArch Feature:NP Migration labels Aug 27, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@sainthkh
Copy link
Contributor

sainthkh commented Nov 8, 2019

Most of the TODOs are done. One thing left is half of the last TODO "whether we can replace this by providing a scoped instance of IndexPatternsService via the handler context pattern, available in the core.context service."

I left that out because currently we cannot be sure that is necessary for plugins and services.

@lizozom
Copy link
Contributor

lizozom commented Nov 18, 2019

@sainthkh I think there are also a few calls for the _fields_for_wildcard API left.
Or am I missing something?

@sainthkh
Copy link
Contributor

@lizozom You're right. There's only one case left in x-pack/rollup. It's calling the API directly inside the server-side code.

It can be removed when we can import IndexPatternsFetcher from data plugin. Because IndexPatternsFetcher depends on ElasticSearch, I guess it is hard to do that now. (As far as I know, there is nothing like public/legacy.ts in server-side of kibana. Right?)

Note: When you search _fields_for_wildcard, there are other results. They don't have to be changed because they're for IndexPatternsAPIClient or integration tests.

@lukeelmers
Copy link
Member Author

There's only one case left in x-pack/rollup. It's calling the API directly inside the server-side code.

It can be removed when we can import IndexPatternsFetcher from data plugin

Now that #55606 is merged, I believe we can safely remove src/legacy/server/index_patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:NP Migration
Projects
None yet
Development

No branches or pull requests

6 participants