-
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
Deprecates SavedObjectType migrations and schemas in favor of modelVersions #176970
Deprecates SavedObjectType migrations and schemas in favor of modelVersions #176970
Conversation
A documentation preview will be available soon. Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
/ci |
Pinging @elastic/kibana-core (Team:Core) |
otherwise there will be no validating when importing objects_ | ||
|
||
For implementation examples, refer to <<saved-objects-service-use-case-examples, Use-case examples>>. | ||
=== Use-case examples |
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 think if you want to link to this section, you need an anchor, for example:
=== Use-case examples | |
[[saved-objects-service-use-case-examples]] | |
=== Use-case examples |
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.
oops,
Thanks!
@@ -0,0 +1,761 @@ | |||
[[saved-objects-service-use-case-examples]] |
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.
These should be on a different page but we can't nest off of a nested page.
@@ -0,0 +1,761 @@ | |||
[[saved-objects-service-use-case-examples]] | |||
=== Use-case examples |
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.
These examples come from the modelVersions.md
doc
@@ -70,6 +70,7 @@ export interface SavedObjectsType<Attributes = any> { | |||
mappings: SavedObjectsTypeMappingDefinition; | |||
/** | |||
* An optional map of {@link SavedObjectMigrationFn | migrations} or a function returning a map of {@link SavedObjectMigrationFn | migrations} to be used to migrate the type. | |||
* @deprecated Use {@link SavedObjectsType.modelVersions | modelVersions} instead. |
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.
Deprecates legacy properties to make it clear that going forward, changes have to be defined with new model versions.
@@ -177,7 +179,7 @@ export interface SavedObjectsType<Attributes = any> { | |||
modelVersions?: SavedObjectsModelVersionMap | SavedObjectsModelVersionMapProvider; | |||
|
|||
/** | |||
* Allows to opt-in to the new model version API. | |||
* Allows to opt-in to the model version API. |
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.
The model version API won't be "new" for long.
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.
Great work @TinaHeiligers ! I did not do a deep review of the documented content also not very familiar with all asciidoc features but this LGTM! Thanks for addressing this issue!
docs/developer/architecture/core/saved-objects-service.asciidoc
Outdated
Show resolved
Hide resolved
modelVersions: { ... }, | ||
// ...other optional properties | ||
}; | ||
} |
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 above suggestion is accepted, also do this and de-indent content
} |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: |
…rsions (elastic#176970) fix elastic#176776 Saved objects `modelVersions` support BWC and ZDT and replace `SavedObjectsType.schemas` and `SavedObjectsType.migrations` properties. This PR marks these two properties as deprecated. The public facing docs have also been updated to the "new" way of implementing saved object changes. ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
fix [#178060](#178060) Updates the internal developer docs for transitions to new model versions. The end-user docs were updated in #176970 --------- Co-authored-by: Jean-Louis Leysens <[email protected]>
fix #176776
Saved objects
modelVersions
support BWC and ZDT and replaceSavedObjectsType.schemas
andSavedObjectsType.migrations
properties.This PR marks these two properties as deprecated.
The public facing docs have also been updated to the "new" way of implementing saved object changes.
Checklist
Delete any items that are not applicable to this PR.