[9.3] [Security Solution] fix alerts page infinite loading state due to data view error (#256983)#257020
Merged
kibanamachine merged 1 commit intoelastic:9.3from Mar 11, 2026
Conversation
…a view error (elastic#256983) ## Summary This PR fixed an issue that we've had for a while now with the new data view manager logic. > [!WARNING] > This PR should not introduce any logic changes or visual changes (other than the added toast when we encounter errors ### Reason Some customer see an issue with the alerts page stuck in an infinite loading state. The issue happens because something is failing within the platform dataview service, which we rely on. In our code, we were wrapping the entire logic of data view initialization within a `try/catch`. When the error was happening in the dataview service, we would not complete the initialization of all dataview, and some of them were staying in a `pristine` status, instead of being changed to `error` or `ready`, which is what the different pages (including the alerts page) is expecting ### Fix We're performing 2 types of fixes: - we're not using the `getAllDataViewLazy` function dataview service anymore as it has some code that communicates with the saved object client, and we noticed some of our customers having errors with conflicting ids in their saved objects, which triggered the flow mentioned above. Instead we're leveraging the `getAllDataViewLazy` function from the dataview service, which returns from the cache. - we're wrapping everywhere we use the `get` function from the dataview service with a `try/catch` to prevent other potential issue - we're adding a UI toast to all those places to let the user know about the error, which will facilitate debugging for us if this was to happen again > [!NOTE] > We're trying to make this available in `9.2.7`, we'll be doing a follow up PR shortly for other try catches we found in the `detection_engine` folder ## What/How to test - add data to a local instance and navigate through the app - make sure the happy path works - load main the Security Solution pages - alerts page - timeline - analyzer - verify interaction with new spaces ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 9b762ae)
2 tasks
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.3:Questions ?
Please refer to the Backport tool documentation