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

[ES|QL] Dataviews(except adhoc dataviews) disappear from side bar when user switches from try ES|QL to classic mode after saving the histogram or viz to a dashboard #199065

Closed
bhavyarm opened this issue Nov 5, 2024 · 6 comments · Fixed by #199099
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. regression Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Nov 5, 2024

Kibana version: 8.16.0 BC3

Browser version: chrome latest

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: If user switches to classic mode in discover after playing in es|ql and adding in the viz to a dashboard, Kibana only displays adhoc dataview for the last es|ql query in classic mode.

Steps to reproduce:

  1. Open Discover and check your dataviews. Make sure you have a couple of dataviews. Check to make sure discover classic is working
  2. Click on Try in ES|QL. Play with your query and then save the resulting viz to a new dashboard or an existing dashboard - you can either save the dashboard or leave it in edit mode
  3. Click on Discover from sidenav - you are in es|ql mode
  4. Click on classic mode and say you are ok with discarding the state
  5. Only adhoc dataview from previous es|ql query is displayed. None of the other dataviews get listed.

Please make sure you are saving the es|ql viz to a new dashboard or a different existing dashboard when you are trying to reproduce.

Screenshots (if relevant):
https://github.com/user-attachments/assets/3778bc69-7757-4f1e-af0f-995b073d4d4d

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:ESQL ES|QL related features in Kibana labels Nov 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula stratoula added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:ESQL ES|QL related features in Kibana labels Nov 6, 2024
@elasticmachine
Copy link
Contributor

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

@stratoula
Copy link
Contributor

This is a regression but something in the Discover code I think. I moved it to the team to investigate

@stratoula stratoula added regression Feature:ES|QL ES|QL related features in Kibana labels Nov 6, 2024
@kertal
Copy link
Member

kertal commented Nov 6, 2024

Confirmed, thx for reporting. It's even easier to reproduce, with your local instance having kibana_sample_data_logs

  1. Open a link to an ES|QL query link
  2. Switch to classic

No data views available:

Image

@kertal
Copy link
Member

kertal commented Nov 6, 2024

Ok, I know why this is happening, and by looking at it I already prepared a draft PR for it: #199099

@kertal kertal added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Nov 6, 2024
@stratoula
Copy link
Contributor

Thanx Matthias 🙌

@kertal kertal self-assigned this Nov 6, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue 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 issue 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)
mgadewoll pushed a commit to mgadewoll/kibana that referenced this issue 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
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Feature:ES|QL ES|QL related features in Kibana impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. regression Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants