Skip to content
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

[saved objects] Type validation enhancements #122343

Closed
lukeelmers opened this issue Jan 5, 2022 · 2 comments
Closed

[saved objects] Type validation enhancements #122343

lukeelmers opened this issue Jan 5, 2022 · 2 comments
Labels
enhancement New value added to drive a business result Feature:Saved Objects impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@lukeelmers
Copy link
Member

In #104088 we agreed that for our initial implementation of Saved Objects type validations, we'd stick with validating types during create and bulkCreate operations. This was implemented in #118969

However, in the course of our discussion on the issue, we identified a few possible enhancements to consider for the future:

  • Support for update operations. This is tricky because it means suddenly all fields in a provided schema would need to become optional.
  • Perform validations inside the migration system. Currently they are happening in the SO repository itself.
  • Consider performing validations during each step of migrations. Since validations are currently performed after migrations in create, it means that a migration could fail due to a corrupt object, but instead of getting a useful error message, you'd just get an error from the migration itself. However, this is a departure from how migration functions are currently implemented, so we would need to weigh how we'd approach something like this. More details in [Saved Objects] introduce per-type validation schemas.  #104088 (comment)
@lukeelmers lukeelmers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc enhancement New value added to drive a business result loe:needs-research This issue requires some research before it can be worked on or estimated Feature:Saved Objects impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Jan 5, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@pgayvallet
Copy link
Contributor

We're getting closer to removing the SO http APIs, meaning that most of the SO types should have their own set of APIs and service/business layer, so that kind of low-level validation is no longer really needed (nor should be the recommended approach).

I'm going to close this

@pgayvallet pgayvallet closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Saved Objects impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

3 participants