[CM] Soften response validation #167152
Labels
Feature:Content Management
User generated content (saved objects) management
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
Team:SharedUX
Team label for AppEx-SharedUX (formerly Global Experience)
We started using content management for backward-compatibility reasons in appex analytics saved objects
Apart from other things the content management validate the responses against the schema, for example, for Discover's
search
:kibana/src/plugins/saved_search/common/content_management/v1/cm_services.ts
Lines 21 to 67 in e4a088c
In case the response doesn't match the schema Discover and other appex analytics content storages throw an error:
kibana/packages/kbn-content-management-utils/src/saved_object_content_storage.ts
Lines 187 to 189 in 304cb25
We added schemas and response validation, but there are ways for saved objects to get into the system in a “unexpected” format, for example, we recently fixed a bug with discover's search
sort
field #166886. We fixed that particular bug, but there might be other similar bugs that are hard to find.We agreed we should keep the validation error in dev and write warning in console in prod. Here is a possible approach we could take: #166919
cc @davismcphee
The text was updated successfully, but these errors were encountered: