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][Meta] Issues with Discover <> UnifiedHistogram sync affecting the chart, total hits and extra fetches #201129

Open
jughosta opened this issue Nov 21, 2024 · 5 comments
Assignees
Labels
Meta Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@jughosta jughosta added Meta Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Nov 21, 2024
@elasticmachine
Copy link
Contributor

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

@davismcphee
Copy link
Contributor

Just leaving a couple of notes with some thoughts:

That said, in general Unified Histogram can and should be simplified since it's become hard to manage with all the feature additions (plus we don't have a plan to make it a shared component anymore, so we don't really need to structure it as such).

@kertal
Copy link
Member

kertal commented Nov 22, 2024

As far as I can tell, there weren't any challenges in #186642 (comment) caused by Discover <> Unified Histogram syncing (unless I just can't find the comment thread since there's many). If the challenge being referred to is #186642 (comment), then this issue was unrelated to Discover or Unified Histogram, and was a bug in the Lens embeddable causing multiple fetches as my comment here demonstrates: #186642 (comment).

During implementation also this bug was surfacing: #184600
And the cause of it was, that when there was a change of data view id, the props given to the lens embeddable were containing old and new data view id. Then there was another similar issue, where I now cannot find the comment in the PR 🦕 , where the interaction between props that were passed in and the Lens embeddable caused another failure. So I think there were related challenges to the syncing, but it's in this case more a issue

I think we should generalize this issue, which for now is a collection of work around the Histogram which should lead to refactoring, iterate in a doc to flesh out what we gonna do.

@jughosta
Copy link
Contributor Author

If we have to spend hours debugging Discover <> UnifiedHistogram <> Lens communication, then to me it looks like a sign that there is a problem in the current approach. It increases the risk of bugs and slows feature development in that area.

@davismcphee
Copy link
Contributor

@kertal Thanks for confirming, that one definitely does sound like a syncing issue between Discover <> Unified Histogram then if the wrong props were being passed to Lens. I also agree with generalizing the issue and thinking broadly about what we can do to make it easier to use Unified Histogram and the Lens embeddable in Discover.

If we have to spend hours debugging Discover <> UnifiedHistogram <> Lens communication, then to me it looks like a sign that there is a problem in the current approach. It increases the risk of bugs and slows feature development in that area.

100% agree with this and your bullet points, so I think we're on the same page about needing to refactor. Mainly I'm just trying to highlight that I think the issues run deeper than Discover <> Unified Histogram syncing, and the Lens embeddable is a key component here that should be looked at too. If we can try to address the issues at each layer, I feel we'll have the best chance of simplifying all the interactions here.

@kertal kertal self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta 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

No branches or pull requests

4 participants