-
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
Migrate away from browser-side SO client #149098
Labels
Feature:Saved Objects
Meta
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Comments
jloleysens
added
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Meta
Feature:Saved Objects
labels
Jan 18, 2023
Pinging @elastic/kibana-core (Team:Core) |
@jloleysens shouldn't this be closed by #148979? |
@pgayvallet We want to use this public issue as a way to share instructions for migrating away from browser-side SO usage. #148979 just adds a deprecation in the code, perhaps this should be renamed :) |
jloleysens
changed the title
Kibana saved object client deprecation
Migrate away from browser-side SO client
Jan 24, 2023
jloleysens
added a commit
that referenced
this issue
Feb 2, 2023
## Summary Part of preparing HTTP APIs and associated interfaces for versioning: * Add domain-specific interfaces to the saved object management plugin * Add a V1 interface of domain types to `common` * Remove use of deprecated `SavedObject` type from public * Follows on from #148602 Related #149098 Fixes #149495 --------- Co-authored-by: kibanamachine <[email protected]>
6 tasks
5 tasks
@TinaHeiligers I think this is superseded by the 9.0 SO API deprecation, right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Saved Objects
Meta
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Summary
The browser-side implementation of Saved Object (SO) client is being deprecated as part of removing public references to saved object schemas (persistence schemas).
Note to Elastic developers
See this issue.
Requirements per use case
CRUD (including bulk)
The SO client is a convenient shortcut to CRUD operations on any SO type. Consider this usage of a
.create
:must be replaced with the equivalent of:
Querying and Aggs
.find
directly exposes the full ES API to browser-side clients. This is problematic because you need to work directly withtype.attribute.my_field
style APIs to use it.must be replaced with the equivalent of:
Resolve
As part of the multiple spaces readiness migration for 8.0, plugins using saved object id's that could originate from external systems (user input, bookmarks) had to switch to using the resolve API. This ensures that 7.x saved object ids can be "resolved" to 8.x ids, optionally giving users a warning to update old links etc.
.resolve
returns the whole document and this API is therefore not backwards compatible.While each use-case should be considered very carefully, in general, apps should send the old ID to the server and use
.resolve()
on the server. your endpoint should accept the old ID and use.resolve()
on the server.could be replaced with the equivalent of:
Be careful to not leak SO-specific interface details to clients when using this API.
Resources
CC @rudolf @TinaHeiligers
The text was updated successfully, but these errors were encountered: