[Alerting][7.x] Update rules detail page to use new saved object resolve API when necessary #108074
Labels
estimate:small
Small Estimated Level of Effort
Feature:Alerting/RulesManagement
Issues related to the Rules Management UX
Feature:Alerting
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
technical debt
Improvement of the software architecture and operational architecture
Relates to #100067
When we load a rule on the rule detail page, we need to ensure we are properly calling the new
savedObjectsClient.resolve()
API which will return not only the saved object, but also information about how the saved object ID resolved due to the migration happening across all saved objects. This will ensure that users loading the page with an outdated ID will still see the appropriate rule instead of an error page. The nice thing here is the security team has provided reusable client code that makes this super easy.An important detail here is that the security team is adding telemetry to how often
savedObjects.resolve()
is called (so they eventually know when we can safely remove it) and we need to only call this API when we need to. This means we will have to callsavedObjectsClient.get()
first and if that returns a 400 not found, then we call the new.resolve()
API.Either way, we'll need to add a new HTTP route because we cannot leverage the saved objects client in the browser because
alert
andaction
are hidden types. We will need a new route that either simply callssavedObjectsClient.resolve()
or the route itself can callsavedObjectsClient.get()
, handle the 400, then returnsavedObjectsClient.resolve()
.See the PoC PR for more insight into how this might work.
The text was updated successfully, but these errors were encountered: