opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 895 forks source link

[BUG] [Discover] index pattern fetch error in discover dataset modal #8891

Open raintygao opened 3 hours ago

raintygao commented 3 hours ago

Describe the bug

image When clicking left index pattern item in discover dataset modal, it will use find to get all index patterns and use bulk_get to get all reference data sources in returned index patterns. If one of these data sources is dissociated with current workspace, non dashboard admin user wouldn't have access to this object and bulk_get request would fail because of ACL which would cause the modal always be in loading state.

image Index pattern list page uses find to find all available data sources and uses response to match index pattern reference for data source connection state, so it will work normally in this case.

For availability, discover dataset modal should use find to get data sources instead of bulk_get to keep consistent with index pattern page.

To Reproduce Steps to reproduce the behavior:

  1. Use dashboard admin to create a workspace, associate data source and create index patterns.
  2. Dissociate the data source.
  3. Non dashboard admin user would see this error when in discover data set modal.

Expected behavior Discover data set modal should display currently available index patterns for all kinds users.

raintygao commented 3 hours ago

cc @ashwin-pc @kavilla