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

[Dashboard][Lens][Visualize] Session is reset when cancelling editing embeddable #115515

Closed
flash1293 opened this issue Oct 19, 2021 · 6 comments
Closed
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

flash1293 commented Oct 19, 2021

Kibana version: master

Describe the bug: Editing a visualization from a dashboard retains the session to avoid sending requests to Elasticsearch. This works fine if the visualization is saved, but on using the "Cancel" button in Lens the session gets reset

Steps to reproduce:

  1. Go to dashboard with a Lens(Visualize/Maps/any embeddable) panel
  2. Edit Lens panel (session is reused)
  3. Hit cancel
  4. Dashboard loads with new session

Expected behavior:
Dashboard should load with the same session

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Oct 19, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors (Team:VisEditors)

@flash1293 flash1293 added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Oct 19, 2021
@mbondyra mbondyra self-assigned this Dec 15, 2021
@mbondyra mbondyra changed the title [Lens] Session is reset when cancelling editing Lens chart [Dashboard][Lens][Visualize] Session is reset when cancelling editing embeddable Dec 16, 2021
@mbondyra mbondyra added the Feature:Dashboard Dashboard related features label Dec 16, 2021
@mbondyra
Copy link
Contributor

mbondyra commented Dec 16, 2021

I investigated a bit in this issue and the problem is that currently dashboard takes preserved searchSessionId from the incomingEmbeddable.searchSessionId. So we have 2 cases when cancelling:

  1. When creating a new visualisation from the dashboard and cancelling, the saved object doesn't exist so there's no incomingEmbeddable to take the data from
  2. When editing existing visualization, we could pass the incomingEmbeddable (we don't at the moment)

The problem is not Lens specific, but happens for Visualize/Maps and all the embeddables so firstly it would make sense to come up with the API how to pass the searchSessionId to the dashboard in case of cancelling. @ThomThomson, any thoughts?

@mbondyra mbondyra removed their assignment Dec 16, 2021
@ThomThomson
Copy link
Contributor

I think that when the session sharing feature was initially architected, the decision to place it inside incomingEmbeddable was made because the searchSessionId exists on the embeddable input already. Is that correct @flash1293?

It seems to me that the session sharing feature should be totally separated from the concept of incomingEmbeddable, because traveling around between different apps doesn't necessarily mean that you're building an embeddable. This will be even more the case when we start adding ways to view a visualize or lens config without even being in edit mode.

I think the best way forward is either

A: to build a section within the stateTransferService which explicitly handles searchSessionId sharing, or
B: to build a completely separate system (outside of the embeddable plugin) for sharing search sessions, by storing the activeSessionId in the session storage.

I would more likely lean towards option B because it's better to be explicit for these things. Either way, I don't think this is a VisEditors project, and should most likely be on the roadmap for @elastic/kibana-presentation and @elastic/kibana-app-services

@flash1293
Copy link
Contributor Author

flash1293 commented Dec 17, 2021

Agree with everything here @ThomThomson - I don't think the issue is severe enough to be worth a quick-n-dirty fix.

@flash1293
Copy link
Contributor Author

Blocked on #121543

@stratoula
Copy link
Contributor

This is not happening with the inline editing and the issue which would unblock thhis got closed so I am closing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Lens impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants