-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
unified search - iindex_pattern => data view type improvement #129506
unified search - iindex_pattern => data view type improvement #129506
Conversation
Pinging @elastic/kibana-app-services (Team:AppServicesSv) |
x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx
Outdated
Show resolved
Hide resolved
Pinging @elastic/fleet (Team:Fleet) |
...ic/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx
Outdated
Show resolved
Hide resolved
…ch_bar.tsx Co-authored-by: Nicolas Chaulet <[email protected]>
…/agent_details_page/components/agent_logs/query_bar.tsx Co-authored-by: Nicolas Chaulet <[email protected]>
@@ -57,7 +58,7 @@ export const LogsToolbar = () => { | |||
<QueryStringInput | |||
disableLanguageSwitcher={true} | |||
iconType="search" | |||
indexPatterns={[derivedDataView]} | |||
indexPatterns={[derivedDataView as DataView]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this pretty risky? If the QueryStringInput
requires a full DataView
instance from now on, is there a way to provide one without all the overhead of persisting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the QueryStringInput requires a full DataView instance from now on, is there a way to provide one without all the overhead of persisting it?
dataViews.create
will create an instance without persisting.
We're working to remove all instances of faked data view instances. Is this happening in the infra code? Perhaps a new issue needs to be created to address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that derived data view is "fake". But if data views can now be created without persistence we can replace that. But let's do that separately 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx
👍
@@ -110,7 +111,7 @@ export const QueryBar = memo<QueryBarComponentProps>( | |||
dateRangeFrom={dateRangeFrom} | |||
dateRangeTo={dateRangeTo} | |||
filters={filters} | |||
indexPatterns={indexPatterns} | |||
indexPatterns={indexPatterns as DataView[]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK indexPatterns
uses only 3 class members from the DataView
: id
, title
, and fields
. Could we have a fitted version of DataView
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattkime, I misplaced my comment, It should be related to x-pack/plugins/observability/public/pages/alerts/components/alerts_search_bar.tsx
. Sorry about that
@@ -47,7 +48,7 @@ export function AlertsSearchBar({ | |||
|
|||
return ( | |||
<SearchBar | |||
indexPatterns={compatibleIndexPatterns} | |||
indexPatterns={compatibleIndexPatterns as DataView[]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok as far as the prop indexPatterns
exposed by SearchBar
is the same type DataView
https://github.com/elastic/kibana/pull/129506/files#diff-c82e1b8d881f115132594175097c24185f00063c492eb44af979776de2218f53R42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkanout Its the responsibility of the owners of x-pack/plugins/observability
to determine this is okay or to explain why its not. If its not okay we can review options to resolve the issue or leave this alone for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@XavierM, it would be helpful to get your inputs here, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this one as the DataView
type is used in both places. Later on, If the type needs to be changed, it will be handled in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infra
changes LGTM. we'll improve the fake data view creation separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppServices changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable Observability changes LGTM.
@@ -47,7 +48,7 @@ export function AlertsSearchBar({ | |||
|
|||
return ( | |||
<SearchBar | |||
indexPatterns={compatibleIndexPatterns} | |||
indexPatterns={compatibleIndexPatterns as DataView[]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this one as the DataView
type is used in both places. Later on, If the type needs to be changed, it will be handled in a different PR.
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: |
Summary
Use DataView class instead of IIndexPattern interface. IIndexPattern is ambiguous between the data view class instance and the serialized version of the data view.
Part of #107220