-
Notifications
You must be signed in to change notification settings - Fork 916
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
[Feature] Support Multiple Data Source when Import saved objects from uploading files #5712
Comments
There are a few edges cases I can think of and make sure we handle them gracefully:
|
@kgcreative
Both are achievable, option 2 adds more complexity and only allow selecting data source after file is read, and by looking at index pattern management page when multiple data source is enabled, adding a new index pattern requires configure the data source first, thus wanted to hear your suggestion! The The following are screenshots of the new section to pick data source, and it was made to match the style of the import options section, and want to hear your thoughts as well |
Hi @kgcreative, if no concern, we would go with this layout with option 1. |
LGTM -- if we can make the flyout a couple pixels wider so the last "IDs" text isn't all lonely in a second line, it would be ideal, but don't spend too much time on it. |
Thanks @kgcreative ! As discussed, the behavior and layout of the import saved object flyout when multiple data source is disabled would follow the same as above where 1) random ID will be changed to |
LGTM, thank you! Cc: @dagneyb |
Is your feature request related to a problem? Please describe.
When multiple data source enabled, user can add sample data and use the dev tool with one specified data source. Import saved objects accepts uploaded files, but the API does not know the data source. These objects cannot display since the it does not know where to fetch the data.
We want to provide user the ability to import saved objects after selecting one data source. When user import saved object from cluster where not enabled multiple data source feature, the imported saved objects will attach the dataSourceId with the objectId; while user import saved objects from some cluster with multiple data source feature enabled, then the objectId would already contains data source info, for this case, we want to replace the dataSourceId. The id schema are exactly same as when user add sample data and dev tools with multiple data source enabled.
Challenges
There are two modes to import saved objects, one is create new copy, the other is check conflict and override. We need to support both modes and cannot break the existing behavior.
Current Import API support create new copy by using the exact objectId to construct the importIdMap, support check conflict and override by checking if there is anything error and only push overrides to construct final import saved object request.
For these two modes, we need to resolve carefully, below are the detailed approach to support multiple data source when import saved objects.
Describe the solution you'd like
Mode - create new copy
When choosing create new copy, after user select one data source, attach the dataSourceId to the saved objects. The
_
is between dataSourceId and objectId.Mode - check conflict and override
Under this mode, if there is no conflict, import API would not add any object to importIdMap, while when multiple data source enabled and import saved objects, we need to first check if there is dataSourceId existing in the current objectId, we need to:
Additional context
The text was updated successfully, but these errors were encountered: