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] Test Connection is not working for multi data source #5924

Closed
Tracked by #5752
bandinib-amzn opened this issue Feb 22, 2024 · 2 comments
Closed
Tracked by #5752

[BUG] Test Connection is not working for multi data source #5924

bandinib-amzn opened this issue Feb 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working multiple datasource multiple datasource project v2.13.0

Comments

@bandinib-amzn
Copy link
Member

bandinib-amzn commented Feb 22, 2024

Describe the bug

After introducing the change in PR #5895, Test connection is no longer working.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Create data source
  2. Enter title, endpoint, credentials.
  3. Click on 'Test connection'
  4. See error

Expected behavior
Test connection should be successful for correct credentials and endpoint.

OpenSearch Version
N/A

Dashboards Version
N/A

Plugins

N/A

Screenshots

Screenshot 2024-02-22 at 10 58 01 AM
@bandinib-amzn
Copy link
Member Author

This is due to missing customApiSchemaRegistryPromise while calling dataSourceServiceSetup.getDataSourceClient in https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/server/routes/test_connection.ts#L62-L72

Argument of type '{ savedObjects: SavedObjectsClientContract; cryptography: CryptographyServiceSetup; dataSourceId: string | undefined; testClientDataSourceAttr: DataSourceAttributes; request: OpenSearchDashboardsRequest<...>; authRegistry: IAuthenticationMethodRegistery; }' is not assignable to parameter of type 'DataSourceClientParams'.
  Property 'customApiSchemaRegistryPromise' is missing in type '{ savedObjects: SavedObjectsClientContract; cryptography: CryptographyServiceSetup; dataSourceId: string | undefined; testClientDataSourceAttr: DataSourceAttributes; request: OpenSearchDashboardsRequest<...>; authRegistry: IAuthenticationMethodRegistery; }' but required in type 'DataSourceClientParams'.

cc: @BionIT

@BionIT
Copy link
Collaborator

BionIT commented Feb 27, 2024

This is due to missing customApiSchemaRegistryPromise while calling dataSourceServiceSetup.getDataSourceClient in https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/server/routes/test_connection.ts#L62-L72

Argument of type '{ savedObjects: SavedObjectsClientContract; cryptography: CryptographyServiceSetup; dataSourceId: string | undefined; testClientDataSourceAttr: DataSourceAttributes; request: OpenSearchDashboardsRequest<...>; authRegistry: IAuthenticationMethodRegistery; }' is not assignable to parameter of type 'DataSourceClientParams'.
  Property 'customApiSchemaRegistryPromise' is missing in type '{ savedObjects: SavedObjectsClientContract; cryptography: CryptographyServiceSetup; dataSourceId: string | undefined; testClientDataSourceAttr: DataSourceAttributes; request: OpenSearchDashboardsRequest<...>; authRegistry: IAuthenticationMethodRegistery; }' but required in type 'DataSourceClientParams'.

cc: @BionIT

@bandinib-amzn yeah, I had a PR to fix it - no one reviewed yet https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5944/files

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

No branches or pull requests

2 participants