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

[Alerting][7.x] Update rules detail page to use new saved object resolve API when necessary #108074

Closed
chrisronline opened this issue Aug 10, 2021 · 1 comment · Fixed by #108091
Assignees
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

Comments

@chrisronline
Copy link
Contributor

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 call savedObjectsClient.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 and action are hidden types. We will need a new route that either simply calls savedObjectsClient.resolve() or the route itself can call savedObjectsClient.get(), handle the 400, then return savedObjectsClient.resolve().

See the PoC PR for more insight into how this might work.

@chrisronline chrisronline added Feature:Alerting loe:medium Medium Level of Effort Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesManagement Issues related to the Rules Management UX labels Aug 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@ymao1 ymao1 self-assigned this Aug 10, 2021
@gmmorris gmmorris added technical debt Improvement of the software architecture and operational architecture estimate:small Small Estimated Level of Effort labels Aug 13, 2021
@gmmorris gmmorris removed the loe:medium Medium Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants