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] Hide local cluster would break index management page and should use default data source instead #1041

Closed
BionIT opened this issue Apr 17, 2024 · 6 comments
Labels
bug Something isn't working v2.14.0

Comments

@BionIT
Copy link

BionIT commented Apr 17, 2024

What is the bug?
Setting the following in yaml config

data_source.enabled: true
data_source.hideLocalCluster: true

would see the following
Screenshot 2024-04-17 at 10 35 17 AM

I think it is due to the url query param is using empty data source id as input, on first time page load, since data source id is not available until the data source component is mounted, thus we can avoid having it in the url on first load, and once the component is loaded, then the data source id can be added to the url.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Enabled data source plugin, and set data_source.hideLocalCluster: true in the yaml
  2. Go to index management
  3. See error

What is the expected behavior?
Default data source is introduced in opensearch-project/OpenSearch-Dashboards#6276, and the data source component will acquire the default data source as the top choice if no valid action option is passed in. The data source chosen by the data source component should be the one that gets rendered

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@BionIT BionIT added bug Something isn't working untriaged labels Apr 17, 2024
@BionIT BionIT changed the title [BUG] [BUG] Hide local cluster would break index management page and should use default data source instead Apr 17, 2024
@BionIT
Copy link
Author

BionIT commented Apr 17, 2024

@RamakrishnaChilaka thanks for fixing the routing issue! Could you take a look at this one as well?

@RamakrishnaChilaka
Copy link
Collaborator

RamakrishnaChilaka commented Apr 18, 2024

@BionIT, we are getting [] empty array from onSelectedDataSources callback. I think this most likely a bug in the core, can you please check this ? DataSourceId is not part of the URL on the first load Lu..

@BionIT
Copy link
Author

BionIT commented Apr 18, 2024

@RamakrishnaChilaka could you check what is the actionOption input pass into the selectable when the yaml config is turned on and off?

I noticed that in future playground, the page forces to use local cluster while default cluster exists. Check the link to index management https://future.playground.opensearch.org/app/opensearch_index_management_dashboards#/index-policies and then check security plugin page https://future.playground.opensearch.org/app/security-dashboards-plugin which shows the current default data source on initial load

@RamakrishnaChilaka
Copy link
Collaborator

Updating our offline discussion,

ActiveOption needs to be undefined, for the MDS picker to choose a new datasource. Therefore, we are passing activeOption as undefined, for the first load, as we were passing empty dataSourceId in the activeOption on the first load, MDS picker wasn't giving back the default dataSource. This was also causing the page to break, when localCluster is undefined.

Issue is fixed in #1042

@BionIT
Copy link
Author

BionIT commented Apr 18, 2024

Awesome, 👍

@RamakrishnaChilaka
Copy link
Collaborator

Closing, as #1042 is merged and verified by testing locally. Kindly, reopen if you find it is not fixed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.14.0
Projects
None yet
Development

No branches or pull requests

2 participants