Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maps][geo containment alert] fix boundaries are not re-fetched when …
…query changes (#157408) Fixes #157068 and #157066 <img width="800" alt="Screen Shot 2023-05-11 at 10 16 31 AM" src="https://github.com/elastic/kibana/assets/373691/3ee3b573-f3f9-497f-afef-1927f43681a7"> Throwing errors provides better user feedback when alerting rules encounter problems. PR updates tracking containment rule to throw when: * No tracking containment boundaries are found. Prior to this PR, entity containment search request would throw because "filters" was undefined. Root cause of #157068 * Throw when entity containment search request throws. Prior to this PR, entity containment search request failure was just logged as server warning. PR updates boundaries cache to refresh whenever any parameters change that result in boundary filters needing to be updated, resolving #157066 PR defines common type "RegisterRuleTypesParams" for registerBuiltInRuleTypes parameter to avoid duplicate type definitions for the same thing. PR also cleans up some tech debt in tracking containment rule * "alert" name replaced with "rule" some time ago. PR renames "alert_type" to "rule_type". * Breaks types defined in "alert_type" into separate "types" file * Breaks "geoContainment.ts" and "geoContainment.test.ts" files into separate files, "executor.ts", "lib/get_entities_and_generate_alerts", and "lib/transform_results.ts" * Renames type "GeoContainmentParams" to "GeoContainmentRuleParams" * Renames type "GeoContainmentExtractedParams" to "GeoContainmentExtractedRuleParams" * Renames type "GeoContainmentState" to "GeoContainmentRuleState" * Renames type "GeoContainmentInstanceState" to "GeoContainmentAlertInstanceState" * Renames type "GeoContainmentInstanceContext" to "GeoContainmentAlertInstanceContext" * Renames type "GeoContainmentAlertType" to "GeoContainmentRuleType" --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
- Loading branch information