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]MDS - Transfer data from MDS enabled data source to MDS disabled data source, hit auth failure #6115

Closed
Tracked by #5872
yujin-emma opened this issue Mar 12, 2024 · 13 comments
Assignees
Labels
backport 2.x bug Something isn't working multiple datasource multiple datasource project v2.14.0

Comments

@yujin-emma
Copy link
Contributor

Describe the bug

I have some saved objects exported with data source, when imported to the default cluster, hit the auth failure

To Reproduce
Steps to reproduce the behavior:

  1. Go to Add sample data to some data source ( not local cluster )
  2. Go to saved object
  3. Select the saved object just added and export
  4. Click import button, import the saved objects just exported to local cluster, choose "Checking for existing objects and automatically override "
  5. Click the newly imported saved objects
  6. Dashboards or viz failed to load the data
  7. Go back to the datasource, click on the data source at step1, click "Test connection", hit failing to connect error

Expected behavior
Import from MDS to non MDS should work as normal
OpenSearch Version
2.12
Dashboards Version
2.12
Plugins

N/A
Screenshots

Screenshot 2024-03-11 at 16 56 36

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@yujin-emma yujin-emma added bug Something isn't working untriaged labels Mar 12, 2024
@yujin-emma yujin-emma self-assigned this Mar 12, 2024
@yujin-emma
Copy link
Contributor Author

Data source object maintain credentials, it should not be exportable as saved object. Therefore, asking user to update the password to reset the auth method is the expected behavior. There is no need to fix the import api

@yujin-emma
Copy link
Contributor Author

Right now, we can import/export data source saved objects. From user friendly perspective, we need to give warning to user that data source object cannot work after export/import. @kgcreative Could we add warning on the UX

@kgcreative
Copy link
Member

I think data source objects should not be exportable. Instead, when exporting, we should remove the reference to the data source from all the saved objects. This will also make MDS enabled exports backward compatible with MDS disabled clusters. We might need an additional option on import to associate saved index patterns with existing data sources.

@seraphjiang
Copy link
Member

data source objects should not be exportable.

+1

We might need to clarify this in official doc. 🙏

@yujin-emma
Copy link
Contributor Author

+1 on excluding the data source object when exporting saved object

@yujin-emma
Copy link
Contributor Author

To resolve this issue, we might need to do the following:

  1. Add warning on UX to let customer know the data source saved object is not exportable
  2. In parallel with 1, in export api, the data source object should be filtered out
  3. In the same time, update official doc, if customer hit the issue above, explain the reason and let them update the auth info

@kgcreative
Copy link
Member

When we show a list of objects, we should also omit the data source object type, and also exclude from "all related objects" export view.

@yujin-emma
Copy link
Contributor Author

Hi, @kgcreative , just wonder how can we display the warning when we do not import/export data source object from UI. I am thinking where and when we display the warning, or can we fix it by the api side, and update the doc

@yujin-emma
Copy link
Contributor Author

Found this quick config: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/server/saved_objects/data_source.ts#L21

importableAndExportable: true,

where help filter out all data source objects both on UI and api side, not sure if this can quick help resolve this issue and make the behavior consistent both on UI and api side

@kgcreative @BionIT @zengyan-amazon

@yujin-emma
Copy link
Contributor Author

Behavior:

importableAndExportable: true,

isImportableAndExportable

importableAndExportable:false,

when make the importableAndExportable to false, saved object page will not show data source object, they are not exportable

isImportableAndExportableFalse

@yujin-emma
Copy link
Contributor Author

Offline synced with @zengyan-amazon , data source objects should be same as other saved objects, it is importable and exportable, we should update doc to let customer know they need to update creds when they hit the auth failure, current export behavior is expected.
At the same time, when customer import data source object to dataSourceEnable=false cluster ( local cluster ), should fail early and throw error

@yujin-emma
Copy link
Contributor Author

issue to track the import change for throwing out error when user try to import data source object to non-MDS cluster: #6394

At the same time, when customer import data source object to dataSourceEnable=false cluster ( local cluster ), should fail early and throw error

@yujin-emma
Copy link
Contributor Author

@yujin-emma , please work on backport the code change for 2.14

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

No branches or pull requests

4 participants