-
Notifications
You must be signed in to change notification settings - Fork 894
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] Default data source that isn't local breaks Discover and dashboards #7129
Comments
Local cluster is very confused concept in MDS. we suggest to hide it when enable MDS.
|
triaging issue..
i do see this problem
I don't see this problem, here is what i did
POST /a/_doc
{
"cluster": "local"
}
POST /a/_doc
{
"cluster": "remote"
}
i'm on commit |
Enables the editor to let plugins to mount their own data source component to the data source container. Issue partially resolved: opensearch-project#7129 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
* [Discover-next] add datasource container Enables the editor to let plugins to mount their own data source component to the data source container. Issue partially resolved: #7129 Signed-off-by: Kawika Avilla <kavilla414@gmail.com> * Changeset file for PR #7157 created/updated --------- Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit e1c5cfd) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* [Discover-next] add datasource container Enables the editor to let plugins to mount their own data source component to the data source container. Issue partially resolved: #7129 * Changeset file for PR #7157 created/updated --------- (cherry picked from commit e1c5cfd) Signed-off-by: Kawika Avilla <kavilla414@gmail.com> 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>
…pensearch-project#7164) * [Discover-next] add datasource container Enables the editor to let plugins to mount their own data source component to the data source container. Issue partially resolved: opensearch-project#7129 * Changeset file for PR opensearch-project#7157 created/updated --------- (cherry picked from commit e1c5cfd) Signed-off-by: Kawika Avilla <kavilla414@gmail.com> 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>
Describe the bug
Discover plugin and Dashboards plugin is based on the current context. The current context has the data source being the local cluster (or the one it started up with). When Discover loads it will retrieve the index patterns from the local cluster.
These index patterns can have references to other data sources but the index patterns that were created and have no external data source ref will still be based on the local cluster.
Then switching the default data source so now the local cluster is not the default cluster. Then any index patterns, that were created with no reference, that are selected will eventually make to the deciding the client with no data source id so it will go with the default client which is NOT the local cluster that has the saved index pattern.
Any search calls that are sourced from the local cluster and did not expect that the default client can be swapped out should break and crash.
Any thing added to a dashboard that doesn't include the data source will break if the default client is not the local client.
Users are stuck because there doesn't seem to be a clear way to set the default data source to the local cluster:
So I would have to delete all my external data sources added.
The Discover plugin data source selector bases off a default Index in Advanced Settings:
This again is based on the default cluster, if the user swaps the default cluster, Discover will do it's initial call to get that value so if the default data source does not have any clue about that ID because it was autopopulated based on a different data source then Discover will crash.
We can add data source selectors every where, but the problem is shared URLs have no context about the data source ref.
If you go into Discover and click "Share", we will save it with the index pattern which will have the data source ref. But if the default cluster is not the local cluster then there is no reference to that for any EXISTING shared URLs for example:
Could be bookmarked by users but if some admin updated the default data source to not be the data source that index pattern was originally created then ALL the previous shared urls are broken.
Other information
I would be wary about now pushing down the data source into the search source, instead of referencing it based on the index pattern. Because that could be a lot of work and could break a lot of things.
There appears to be some race condition where I can try to create an index pattern or datasource before the default client is established which kicks me in a state where it thinks I have data but not an index pattern
The text was updated successfully, but these errors were encountered: