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

[Discover] Fix loading data views in ES|QL mode #199099

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

kertal
Copy link
Member

@kertal kertal commented Nov 6, 2024

Summary

This PR makes sure that data views are loaded so user can view them after switching from ES|QL mode to data view mode.

Looks like it was introduced in #195670

Testing

On your local instance having kibana_sample_data_logs installed

  • Open a link to an ES|QL query link
  • Switch to classic
  • Open the DataView Picker, to see a list of DataViews, before this fix there were none

Checklist

@kertal
Copy link
Member Author

kertal commented Nov 6, 2024

/ci

@jughosta jughosta added v9.0.0 Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.16.0 backport:version Backport to applied version labels v8.17.0 release_note:skip Skip the PR/issue when compiling release notes labels Nov 6, 2024
@kertal kertal marked this pull request as ready for review November 6, 2024 15:51
@kertal kertal requested a review from a team as a code owner November 6, 2024 15:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #14 / serverless search UI Elasticsearch Start [Onboarding Empty State] developer should show the api key in code view

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 809.8KB 809.8KB -3.0B

History

cc @kertal

@kertal kertal requested a review from jughosta November 6, 2024 17:50
Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be fixing the issue. Looks good from my side!

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, thanks for fixing it!

@davismcphee davismcphee merged commit 08b83c5 into elastic:main Nov 6, 2024
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11709446958

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
- Closes elastic#199065

## Summary

This PR makes sure that data views are loaded so user can view them
after switching from ES|QL mode to data view mode.

Looks like it was introduced in
elastic#195670

### Testing

On your local instance having `kibana_sample_data_logs` installed

* Open a link to an ES|QL query
[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))
* Switch to classic
* Open the DataView Picker, to see a list of DataViews, before this fix
there were none

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
(cherry picked from commit 08b83c5)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 6, 2024
- Closes elastic#199065

## Summary

This PR makes sure that data views are loaded so user can view them
after switching from ES|QL mode to data view mode.

Looks like it was introduced in
elastic#195670

### Testing

On your local instance having `kibana_sample_data_logs` installed

* Open a link to an ES|QL query
[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))
* Switch to classic
* Open the DataView Picker, to see a list of DataViews, before this fix
there were none

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
(cherry picked from commit 08b83c5)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 6, 2024
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Discover] Fix loading data views in ES|QL mode
(#199099)](#199099)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Matthias
Wilhelm","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T18:13:33Z","message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","v9.0.0","Team:DataDiscovery","v8.16.0","backport:version","v8.17.0"],"title":"[Discover]
Fix loading data views in ES|QL
mode","number":199099,"url":"https://github.com/elastic/kibana/pull/199099","mergeCommit":{"message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199099","number":199099,"mergeCommit":{"message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Matthias Wilhelm <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 6, 2024
…9206)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Discover] Fix loading data views in ES|QL mode
(#199099)](#199099)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Matthias
Wilhelm","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T18:13:33Z","message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","v9.0.0","Team:DataDiscovery","v8.16.0","backport:version","v8.17.0"],"title":"[Discover]
Fix loading data views in ES|QL
mode","number":199099,"url":"https://github.com/elastic/kibana/pull/199099","mergeCommit":{"message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199099","number":199099,"mergeCommit":{"message":"[Discover]
Fix loading data views in ES|QL mode (#199099)\n\n- Closes
https://github.com/elastic/kibana/issues/199065\r\n\r\n##
Summary\r\n\r\nThis PR makes sure that data views are loaded so user can
view them\r\nafter switching from ES|QL mode to data view
mode.\r\n\r\nLooks like it was introduced
in\r\nhttps://github.com//pull/195670\r\n\r\n###
Testing\r\n\r\nOn your local instance having `kibana_sample_data_logs`
installed\r\n\r\n* Open a link to an ES|QL
query\r\n[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))\r\n*
Switch to classic\r\n* Open the DataView Picker, to see a list of
DataViews, before this fix\r\nthere were none\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Julia Rechkunova
<[email protected]>\r\nCo-authored-by: Julia Rechkunova
<[email protected]>","sha":"08b83c55f64bc250a4b6d5909cfc2e46003e9751"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Matthias Wilhelm <[email protected]>
mgadewoll pushed a commit to mgadewoll/kibana that referenced this pull request Nov 7, 2024
- Closes elastic#199065

## Summary

This PR makes sure that data views are loaded so user can view them
after switching from ES|QL mode to data view mode.

Looks like it was introduced in
elastic#195670

### Testing

On your local instance having `kibana_sample_data_logs` installed

* Open a link to an ES|QL query
[link](http://localhost:5601/xot/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(),dataSource:(dataViewId:e3465e67bdeced2befff9f9dca7ecf9c48504cad68a10efd881f4c7dd5ade28a,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc))))
* Switch to classic
* Open the DataView Picker, to see a list of DataViews, before this fix
there were none

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.16.0 v8.17.0 v9.0.0
Projects
None yet
5 participants