opensearch-project / OpenSearch-Dashboards

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

[BUG] Incomplete Saved Object Query From DataSource Selector #7261

Open derek-ho opened 1 month ago

derek-ho commented 1 month ago

Describe the bug

The data source selector query is wrong/incomplete. This leads to missing fields and inability to filter datasources.

To Reproduce

The query sent by the data source selector is filtering on

fields=id&fields=title&fields=auth.type&fields=dataSourceVersion&fields=installedPlugins&per_page=10000&type=data-source

Which leads to the same saved object to be returned as

{
    "type": "data-source",
    "id": "fa529a40-438a-11ef-9a4f-372f52117890",
    "attributes": {
        "installedPlugins": [],
        "auth": {
            "type": "sigv4"
        },
        "title": "test-serverless",
        "dataSourceVersion": ""
    },
    "references": [],
    "migrationVersion": {
        "data-source": "2.4.0"
    },
    "updated_at": "2024-07-16T15:49:25.603Z",
    "version": "WzE3MSwxXQ==",
    "score": 0
}

Thus, AOSS data sources cannot be filtered out from the data source selector. Since this is a common requirement for plugins, the fields necessary to filter out AOSS should be returned.

Expected behavior

ds.attributes.auth.credentials?.service

Should be returned, so AOSS can be filtered out OpenSearch Version Please list the version of OpenSearch being used.

Dashboards Version Please list the version of OpenSearch Dashboards being used.

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

BionIT commented 1 month ago

@ZilongX could you help with this? I think the ask is to add dataSourceEngineType to the response so that plugins can filter based on service type

BionIT commented 1 month ago

@derek-ho do you want to contribute?

dblock commented 3 weeks ago

[Catch All Triage - 1, 2, 3]