-
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
[ILM] Relax POST policy route validation #84203
[ILM] Relax POST policy route validation #84203
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
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.
Hi @jloleysens , I agree that maintaining the schema is not providing as much benefit as it costs the effort. Our (de)serialization logic with unit tests should be enough to confirm that the object has the correct structure. And ES does the validation on its end as well.
nit: comment on line 26 is not needed anymore.
Thanks for the review @yuliacech ! I am going to update the comment to capture the decision we made here so I will probably leave the link to the endpoint docs, but just state that we are intentionally not deeply validating the object structure. |
* relax policy post route validation * update comment
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
After implementing #83077 I noticed that on instances of Kibana that did not know about the shrink action we are unable to update a policy through UI because of server-side validation. The thinking behind #83077 was that we want to preserve any values users may have configured through the ES API (even if Kibana does not know about it).
It seems that the simplest way to do this for now is to relax our server side policy validation. We can rely on ES to validate the policy configuration instead. The UI has control over fields it know about, the rest we pass back unaltered to ES.
Additionally, by relaxing our server-side validation we have less of a maintenance burden in case ES adds ILM policy features we have/will not support.