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

[BUG][Discover-next] Discover UI stuck on 'Searching' after deleting index pattern from Index Management #8612

Closed
ananzh opened this issue Oct 16, 2024 · 0 comments · Fixed by #8659
Assignees
Labels
bug Something isn't working discover for discover reinvent

Comments

@ananzh
Copy link
Member

ananzh commented Oct 16, 2024

Describe the bug

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use Discover after deleting an index pattern.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Discover query enhancement
  2. Add some index patterns and indices (e.g. "aaa*" (default) and "test-flat*")
  3. Go to Index Management page
  4. Delete the "aaa*" index pattern
  5. Return to the Discover page
  6. Observe that the "Recently selected data" list still shows the deleted "aaa*" pattern
  7. Attempt to use Discover

Expected behavior
After deleting an index pattern: The "Recently selected data" list in Discover should update to remove the deleted index pattern. Discover should function normally without getting stuck in a "Searching" state. The UI should reflect the current state of available index patterns accurately.

OpenSearch Version
main

Dashboards Version
main

Plugins
security-dashboards

Screenshots
Screenshot 2024-10-16 at 1 52 35 PM

@ananzh ananzh added bug Something isn't working untriaged discover for discover reinvent and removed untriaged labels Oct 16, 2024
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Oct 18, 2024
When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
opensearch-project#8612

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla self-assigned this Oct 18, 2024
@kavilla kavilla linked a pull request Oct 18, 2024 that will close this issue
7 tasks
opensearch-trigger-bot bot pushed a commit that referenced this issue Oct 19, 2024
)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
#8612

Signed-off-by: Kawika Avilla <[email protected]>

* Changeset file for PR #8659 created/updated

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 4808094)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AMoo-Miki pushed a commit that referenced this issue Oct 19, 2024
) (#8664)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
#8612



* Changeset file for PR #8659 created/updated

---------



(cherry picked from commit 4808094)

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Oct 19, 2024
Also:
* Fix some React errors

Signed-off-by: Miki <[email protected]>

---------

Fix random big number during loading in query editor result (opensearch-project#8650)

* Fix random big number during loading in query editor result

Signed-off-by: abbyhu2000 <[email protected]>

* Changeset file for PR opensearch-project#8650 created/updated

* Fix initial loading number

Signed-off-by: abbyhu2000 <[email protected]>
(cherry picked from commit a7414f0)

---------

[bug] address different issues with dataset selector (opensearch-project#8665)

* [bug] address some issues with dataset selector

Moved the dataset selector back to the search bar and access it by ref in the sidebar.

Avoid out of sync issue.
* update the logic for ensuring index pattern
* dont add ability to open button
* empty state but missing data set selector button
* fix tests
* add back styling

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit e23f332)

---------

[bug] Discover UI stuck on searching after deleting index pattern (opensearch-project#8659)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
opensearch-project#8612

(cherry picked from commit 4808094)

---------

[Discover]Sample Queries and Saved Queries in No Results Page (opensearch-project#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Miki <[email protected]>

* Changeset file for PR opensearch-project#8616 created/updated

* Update styling

Signed-off-by: Miki <[email protected]>

(cherry picked from commit 9da1b77)

---------

Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View (opensearch-project#8613)

* Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View

This PR primarily addresses the scenario when no index patterns (general) is available in the Discover view.
Instead of redirecting users to the index management page, it introduces a new "No Index Patterns" panel.
This panel provides users with the option to open a data selector and add index patterns
directly from the Discover view, improving the user experience for new or empty deployments.

To achieve, we move the selectedDataset state from ConnectedDatasetSelector to the app container's
state management. This allows the AdvancedSelector, opened from the AppContainer, to update
the dataset state effectively. Key changes include:

* Implementing NoIndexPatternsPanel and AdvancedSelector components.
* Refactoring dataset state management in AppContainer and Sidebar.
* Modifying DiscoverCanvas to conditionally render NoIndexPatternsPanel.
* Updating ConnectedDatasetSelector to use shared state and dataset change handling.

* Update design of no data selected
* use i18n
* fix comments
* Update design of no data selected
* fix lint error

Signed-off-by: Anan Zhuang <[email protected]>

(cherry picked from commit 6659139)

---------

Update Discover appearance (opensearch-project#8651)

* Update Discover appearance

Signed-off-by: Miki <[email protected]>

(cherry picked from commit 17103ba)

---------

Move DatasetSelector from data plugin queryString comp to DataExplorer (opensearch-project#8598)

* Move DatasetSelector to DataExplorer
* Style Disover after moving DatasetSelector to DataExplorer
* fix the test by adding the getUpdates$ method to the mock queryString object

Signed-off-by: Anan Zhuang <[email protected]>

(cherry picked from commit 923cce8)
sejli pushed a commit to sejli/OpenSearch-Dashboards that referenced this issue Oct 21, 2024
…ensearch-project#8659)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
opensearch-project#8612

Signed-off-by: Kawika Avilla <[email protected]>

* Changeset file for PR opensearch-project#8659 created/updated

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this issue Oct 22, 2024
…, #8650, #8668  (#8670)

* Fix No data selected appearance (#8668)

Also:
* Fix some React errors

Signed-off-by: Miki <[email protected]>

---------

Fix random big number during loading in query editor result (#8650)

* Fix random big number during loading in query editor result

Signed-off-by: abbyhu2000 <[email protected]>

* Changeset file for PR #8650 created/updated

* Fix initial loading number

Signed-off-by: abbyhu2000 <[email protected]>
(cherry picked from commit a7414f0)

---------

[bug] address different issues with dataset selector (#8665)

* [bug] address some issues with dataset selector

Moved the dataset selector back to the search bar and access it by ref in the sidebar.

Avoid out of sync issue.
* update the logic for ensuring index pattern
* dont add ability to open button
* empty state but missing data set selector button
* fix tests
* add back styling

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit e23f332)

---------

[bug] Discover UI stuck on searching after deleting index pattern (#8659)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
#8612

(cherry picked from commit 4808094)

---------

[Discover]Sample Queries and Saved Queries in No Results Page (#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Miki <[email protected]>

* Changeset file for PR #8616 created/updated

* Update styling

Signed-off-by: Miki <[email protected]>

(cherry picked from commit 9da1b77)

---------

Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View (#8613)

* Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View

This PR primarily addresses the scenario when no index patterns (general) is available in the Discover view.
Instead of redirecting users to the index management page, it introduces a new "No Index Patterns" panel.
This panel provides users with the option to open a data selector and add index patterns
directly from the Discover view, improving the user experience for new or empty deployments.

To achieve, we move the selectedDataset state from ConnectedDatasetSelector to the app container's
state management. This allows the AdvancedSelector, opened from the AppContainer, to update
the dataset state effectively. Key changes include:

* Implementing NoIndexPatternsPanel and AdvancedSelector components.
* Refactoring dataset state management in AppContainer and Sidebar.
* Modifying DiscoverCanvas to conditionally render NoIndexPatternsPanel.
* Updating ConnectedDatasetSelector to use shared state and dataset change handling.

* Update design of no data selected
* use i18n
* fix comments
* Update design of no data selected
* fix lint error

Signed-off-by: Anan Zhuang <[email protected]>

(cherry picked from commit 6659139)

---------

Update Discover appearance (#8651)

* Update Discover appearance

Signed-off-by: Miki <[email protected]>

(cherry picked from commit 17103ba)

---------

Move DatasetSelector from data plugin queryString comp to DataExplorer (#8598)

* Move DatasetSelector to DataExplorer
* Style Disover after moving DatasetSelector to DataExplorer
* fix the test by adding the getUpdates$ method to the mock queryString object

Signed-off-by: Anan Zhuang <[email protected]>

(cherry picked from commit 923cce8)

* Resolve merge errors from manual backports

Signed-off-by: Miki <[email protected]>

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discover for discover reinvent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants