-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Expose savedObject import / export utility methods #58882
Expose savedObject import / export utility methods #58882
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together so quickly! The changes LGTM from a Spaces perspective - this looks like it'll suit my needs perfectly.
supportedTypes: string[]; | ||
/** if specified, will import in given namespace */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the default otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if unspecified, it will import as a non-namespaced object. updated comment.
overwrite: boolean; | ||
/** client to use to perform the import operation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: {@link SavedObjectsClientContract | saved objects client }?
src/core/server/index.ts
Outdated
@@ -229,6 +229,9 @@ export { | |||
SavedObjectsType, | |||
SavedObjectMigrationMap, | |||
SavedObjectMigrationFn, | |||
getSortedObjectsForExport, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional:
getSortedObjectsForExport
doesn't return saved objects, but a stream of them.
importSavedObjects
doesn't accept saved objects, but a stream of them.
what if we reflect this fact in the naming?
exportToStream
/importFromStream
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @restrry's feedback, but don't have anything more to add.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* add getImportExportObjectLimit to so setup * expose static method for so import / export * improve functions naming * fix mocked reference
Summary
Fix #58854
getImportExportObjectLimit
method to SOsetup
apigetSortedObjectsForExport
,importSavedObjects
andresolveImportErrors
fromsrc/core/server
Checklist
Delete any items that are not applicable to this PR.