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 breakdownField in getDefaultAppState #3

Conversation

davismcphee
Copy link

Summary

This PR fixes support for breakdownField in getDefaultAppState to ensure it gets set when expected and does not trigger additional data fetching. It does this by splitting getDefaultProfileState into two phases: getPreFetchState and getPostFetchState, which apply default state before and after data fetching respectively.

There are also some related changes to make this work, mainly around Discover's (complicated) state management, and ES|QL mode special handling. I also had to change the way Unified Histogram receives the breakdownField since the current approach was causing a race condition (all the more reason to improve and refactor Unified Histogram).

Copy link
Author

@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.

@tonyghiani CI is passing in the draft PR against main, so these changes should be good to go now: elastic#200854.

@tonyghiani
Copy link
Owner

Thanks a lot Davis, I'll merge this into my PR and address any change left for this to work!

@tonyghiani tonyghiani merged commit 0825111 into tonyghiani:183498-breakown-by-log-level Nov 22, 2024
1 check passed
@davismcphee davismcphee deleted the fix-default-app-state-pr branch November 22, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants