-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[One Discover] Breakdown by log.level for logs sources #200584
[One Discover] Breakdown by log.level for logs sources #200584
Conversation
/ci |
/ci |
/ci |
/ci |
…tch_all promise is resolved when no results are found
I opened a PR against this branch with fixes for the Discover issues here: tonyghiani#3. cc @jughosta since it would be great to get your review on this after the PR merges to evaluate my changes. I also left some comments in the PR for reference. |
[Discover] Fix `breakdownField` in `getDefaultAppState`
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
@davismcphee @jughosta the changes you applied fixed the initialization of the breakdown field 👌 Screen.Recording.2024-11-22.at.14.27.04.mov |
@tonyghiani Thanks for raising this, I was surprised to see it since I didn't think there should be an impact from these changes. Turns out this is actually an issue in The good news is the Lens embeddable refactor is merging soon, so I rebased these commits on it to test locally, and confirmed it doesn't have the bug: data_view_2.mp4Now I just need to figure out when the bug was merged to |
Ok I looked into it more and it's not an issue with the embeddable itself. It's because the embeddable is being unmounted and remounted here, which triggers an additional fetch, but it gets cancelled quickly so no request is actually sent: kibana/src/plugins/unified_histogram/public/chart/histogram.tsx Lines 233 to 235 in 0963369
It looks like it was merged a couple of days ago in #200687, so still unrelated to this PR. And that code was removed in the embeddable refactor which explains why I didn't see it there. cc @kertal, looks like the flaky test fix might have had some unintended effects. This is actually a good example of how manual control over Lens fetches would make our lives easier 😄 |
@davismcphee I see thanks! I'll wait for the work the lens embeddable to be merged and check for a last round if everything works correctly! |
Yes, I think we should even consider to remove this "fix" of the backport, treat the occacional race condition and the one condition that we can reliably reproduce it, as a known issue. it's resolved in with the Lens embeddable 🥳 the interaction between Discover state <> Unified Histogram <> Lens embeddable produces unwanted side effects like in this case, that are resolved with #186642, and another argument for making our lives easier by gaining manual control over Lens embeddable data fetching 👍 |
@davismcphee the lens refactor is merged and I can confirm the glitch on the data fetching is gone, it looks good now! There were no additional change on my side, let me know whether we are good to go with this 👌 |
LGTM too 👍 |
@tonyghiani Nice! It LGTM too, I just want to clarify a product question in Slack before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we're all in agreement from the product side to move forward, so in that case I'd say let's get this merged 👍 great work @tonyghiani!
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @tonyghiani |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12064927627 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## 📓 Summary Closes elastic#183498 This work sets the Breakdown selector for the Histogram to the `log.level` field once a logs data source is resolved. It also applies to ES|QL queries, the change is applied/removed on each source change. --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: Davis McPhee <davis.mcphee@elastic.co> (cherry picked from commit ac6025e) # Conflicts: # src/plugins/discover/public/application/main/state_management/discover_data_state_container.ts # src/plugins/discover/public/application/main/state_management/utils/change_data_view.ts
#202105) # Backport This will backport the following commits from `main` to `8.x`: - [[One Discover] Breakdown by log.level for logs sources (#200584)](#200584) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Antonio Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2024-11-28T08:12:47Z","message":"[One Discover] Breakdown by log.level for logs sources (#200584)\n\n## 📓 Summary\r\n\r\nCloses #183498 \r\n\r\nThis work sets the Breakdown selector for the Histogram to the\r\n`log.level` field once a logs data source is resolved.\r\nIt also applies to ES|QL queries, the change is applied/removed on each\r\nsource change.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"ac6025eaa1b5e0e733bab0110b60928e27ee6860","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","Team:obs-ux-logs","Project:OneDiscover"],"number":200584,"url":"https://github.com/elastic/kibana/pull/200584","mergeCommit":{"message":"[One Discover] Breakdown by log.level for logs sources (#200584)\n\n## 📓 Summary\r\n\r\nCloses #183498 \r\n\r\nThis work sets the Breakdown selector for the Histogram to the\r\n`log.level` field once a logs data source is resolved.\r\nIt also applies to ES|QL queries, the change is applied/removed on each\r\nsource change.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"ac6025eaa1b5e0e733bab0110b60928e27ee6860"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200584","number":200584,"mergeCommit":{"message":"[One Discover] Breakdown by log.level for logs sources (#200584)\n\n## 📓 Summary\r\n\r\nCloses #183498 \r\n\r\nThis work sets the Breakdown selector for the Histogram to the\r\n`log.level` field once a logs data source is resolved.\r\nIt also applies to ES|QL queries, the change is applied/removed on each\r\nsource change.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by: Davis McPhee <davis.mcphee@elastic.co>","sha":"ac6025eaa1b5e0e733bab0110b60928e27ee6860"}}]}] BACKPORT-->
## 📓 Summary Closes elastic#183498 This work sets the Breakdown selector for the Histogram to the `log.level` field once a logs data source is resolved. It also applies to ES|QL queries, the change is applied/removed on each source change. --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
📓 Summary
Closes #183498
This work sets the Breakdown selector for the Histogram to the
log.level
field once a logs data source is resolved.It also applies to ES|QL queries, the change is applied/removed on each source change.