Skip to content

[9.0] [Response Ops][Alerting] Fixing issue with setting cancelAlertsOnRuleTimeout=false in kibana config (#222263)#222799

Merged
ymao1 merged 2 commits intoelastic:9.0from
ymao1:backport/9.0/pr-222263
Jun 5, 2025
Merged

[9.0] [Response Ops][Alerting] Fixing issue with setting cancelAlertsOnRuleTimeout=false in kibana config (#222263)#222799
ymao1 merged 2 commits intoelastic:9.0from
ymao1:backport/9.0/pr-222263

Conversation

@ymao1
Copy link
Contributor

@ymao1 ymao1 commented Jun 5, 2025

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…eTimeout=false` in kibana config (elastic#222263)

Fixing elastic#222127

## Summary

Fixes issue that causes Kibana to bootloop when
`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in the
kibana config.

Moves the check for incompatible `cancelAlertsOnRuleTimeout` and
`autoRecoverAlerts` rule type config to the plugin setup code because we
mutate some of these values before registering. So now the check
actually checks the values set by the rule type in the code. Then we
proceed with merging some of these values with the Kibana config.
Because there are issues with lifecycle rule types when
`cancelAlertsOnRuleTimeout` is set to false, we log a warning when we
see this override in the config and ignore the setting for lifecycle
rule types. Persistent rule types (detection rules) will still respect
this config override if set.

There will be a followup issue to deprecate this config for 9.10 and
8.19. This PR is to address the immediate bug.

## To Verify
1. Set `xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana
config and start Kibana.
2. Verify Kibana starts up correctly with no errors.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 69690c9)

# Conflicts:
#	x-pack/platform/plugins/shared/alerting/server/rule_type_registry.test.ts
#	x-pack/platform/plugins/shared/alerting/server/test_utils/index.ts
@ymao1 ymao1 added the backport This PR is a backport of another PR label Jun 5, 2025
@ymao1 ymao1 enabled auto-merge (squash) June 5, 2025 11:57
@ymao1 ymao1 requested a review from kibanamachine as a code owner June 5, 2025 11:57
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@ymao1 ymao1 merged commit 828470d into elastic:9.0 Jun 5, 2025
9 checks passed
@ymao1 ymao1 deleted the backport/9.0/pr-222263 branch June 5, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

3 participants