-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Core] Move Saved objects files to core #38771
Conversation
3596fbd
to
0b7a0df
Compare
💚 Build Succeeded |
Pinging @elastic/kibana-platform |
💚 Build Succeeded |
b59a1ca
to
514e79b
Compare
💚 Build Succeeded |
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.
Changes for spaces
and encrypted_saved_objects
LGTM!
src/core/server/server.api.md
Outdated
delete(type: string, id: string, options?: SavedObjectsBaseOptions): Promise<{}>; | ||
// (undocumented) | ||
errors: { | ||
isSavedObjectsClientError: typeof import("./lib/errors").isSavedObjectsClientError; |
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.
1 nit: not really useful typings
2 expose the same things as a class property and class static property can be confusing for customers
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've addressed this by creating a
SavedObjectsErrorHelpers
class so that the type documentation is better. - Because of the way I type
SavedObjectsClientContract
the staticerrors
property isn't included in the type. So when I remove thepublic errors
there's a lot of type errors even though this should technically resolve to the static function. I can probably fix this by creating aSavedObjectsClientContract
interface and duplicating the types from the class. However, becauseSavedObjectsErrorHelpers
is just static functions, I've been thinking of removing these convenienceerrors
properties and instead let consumers rather importSavedObjectsErrorHelpers
directly. Because this is a breaking API change, I'd prefer to do this in a separate PR.
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.
LGTM, based on the assumption that this is just type/file changes.
💔 Build Failed |
💔 Build Failed |
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.
👍 on green CI
💚 Build Succeeded |
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects * Fix SavedObject import references after moving files to core * First pass at SavedObjects api docs * Expose and import all saved object types through core/server * Don't expose SavedObjectsManagement from core and fix imports * Improve typings for SavedObject error helpers * Fix type errors after master merge * Fix SavedObjectErrorHelpers tests
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects * Fix SavedObject import references after moving files to core * First pass at SavedObjects api docs * Expose and import all saved object types through core/server * Don't expose SavedObjectsManagement from core and fix imports * Improve typings for SavedObject error helpers * Fix type errors after master merge * Fix SavedObjectErrorHelpers tests
* Move src/legacy/server/saved_objects -> src/core/server/saved_objects * Fix SavedObject import references after moving files to core * First pass at SavedObjects api docs * Expose and import all saved object types through core/server * Don't expose SavedObjectsManagement from core and fix imports * Improve typings for SavedObject error helpers * Fix type errors after master merge * Fix SavedObjectErrorHelpers tests
Summary
This is the first phase of exposing Saved Objects client from Core.
src/legacy/server/saved_objects/
->src/core/server/saved_objects
.src/core/server
src/core/server/saved_objects
to ease the migration.