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

[Meta] Index Patterns Everywhere #90076

Closed
1 task
stephmilovic opened this issue Feb 2, 2021 · 4 comments
Closed
1 task

[Meta] Index Patterns Everywhere #90076

stephmilovic opened this issue Feb 2, 2021 · 4 comments
Labels
discuss Feature:Data Views Data Views code and UI - index patterns before 8.0 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

Comments

@stephmilovic
Copy link
Contributor

stephmilovic commented Feb 2, 2021

Closed in favor of #113440

As I began work on Index pattern "pattern list” support (comma delimited list of index patterns) #87851 , it became apparent that in order to make enhancements to Kibana Index Patterns (KIP), first we would need to sync across how we are using KIP by making 2 pre-requisite changes. Otherwise, implementing the change causes a lot of downstream changes.

1. All Kibana apps should use the IndexPatternsService to access index patterns, not the saved objects API

For example, many apps are directly accessing KIP via the saved objects api rather than using the IndexPatternsService . If these apps were using the IndexPatternsService , everyone gets index pattern updates for free via rather than updating their saved object requests. Perhaps an important spot to update is the Saved Objects API documentation, which uses type: 'index-pattern' as an example!

2. The IndexPatternsService is currently being called both client side and server side.

  • The IndexPatternsService should not be called by the index pattern server routes
  • The IndexPatternsService methods should be updated to be like the getFieldsForWildcard, which makes a server-side call to do the work. All the logic from IndexPatternsService should be moved to server-side file IndexPatternsFetcher.
  • The routes that reference client-side IndexPatternsService should be changed to reference the new methods in server-side IndexPatternsFetcher

Once these 2 issues are handled, something like the patternList update becomes easy to implement. Reference this PR for the code.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@ppisljar
Copy link
Member

ppisljar commented Feb 3, 2021

lets have a sync about this proposals. I completely agree with 1. but I am not sure i understand 2. correctly.

our plan regarding server/client side index patterns goes mostly like this:

  • all calls to elasticsearch should be made from server side
  • as much as possible of actual code/logic should exist only on the server
  • server should expose public API (to be consumed by other plugins) as well as REST API (to be consumed by client side and other software outside of kibana when necesarry)
  • client side API should be just a wrapper around REST API mimicking the same interface we have on public interface on the server

@ryankeairns
Copy link
Contributor

The UI side of this needs some design work, up front, since this is a critical piece of the user experience. This change will affect many applications and seems somewhat complex. The @elastic/kibana-design team can assist.

@exalate-issue-sync exalate-issue-sync bot 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 loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Apr 26, 2021
@petrklapka petrklapka added 1 and removed 1 labels May 6, 2021
@mattkime
Copy link
Contributor

closing in favor of #113440 - we'll work out the improved definition over there.

@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:Data Views Data Views code and UI - index patterns before 8.0 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
Projects
None yet
Development

No branches or pull requests

6 participants