Skip to content

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

Merged
ymao1 merged 3 commits intoelastic:mainfrom
ymao1:alerting/222127
Jun 5, 2025
Merged

[Response Ops][Alerting] Fixing issue with setting cancelAlertsOnRuleTimeout=false in kibana config#222263
ymao1 merged 3 commits intoelastic:mainfrom
ymao1:alerting/222127

Conversation

@ymao1
Copy link
Contributor

@ymao1 ymao1 commented Jun 2, 2025

Fixing #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.
@ymao1 ymao1 self-assigned this Jun 2, 2025
@ymao1 ymao1 added release_note:fix Feature:Alerting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.0.3 v8.18.3 labels Jun 2, 2025
@ymao1 ymao1 requested review from js-jankisalvi and pmuellr June 2, 2025 19:20
@ymao1 ymao1 marked this pull request as ready for review June 2, 2025 19:27
@ymao1 ymao1 requested a review from a team as a code owner June 2, 2025 19:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@ymao1
Copy link
Contributor Author

ymao1 commented Jun 3, 2025

@elasticmachine merge upstream

ruleType.cancelAlertsOnRuleTimeout =
ruleType.cancelAlertsOnRuleTimeout ?? this.config.cancelAlertsOnRuleTimeout;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we need to add ruleTypeRegistry.validate and move all these checks to there but not concern of this PR.

Copy link
Contributor

@ersin-erdal ersin-erdal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Tested locally works as expected

Copy link
Contributor

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ymao1
Copy link
Contributor Author

ymao1 commented Jun 4, 2025

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @ymao1

@ymao1 ymao1 merged commit 69690c9 into elastic:main Jun 5, 2025
10 checks passed
@ymao1 ymao1 deleted the alerting/222127 branch June 5, 2025 01:58
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0

https://github.com/elastic/kibana/actions/runs/15456666813

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 5, 2025
…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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19
9.0 Backport failed because of merge conflicts

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 222263

Questions ?

Please refer to the Backport tool documentation

@ymao1
Copy link
Contributor Author

ymao1 commented Jun 5, 2025

💚 All backports created successfully

Status Branch Result
9.0
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

ymao1 added a commit to ymao1/kibana that referenced this pull request Jun 5, 2025
…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 added a commit to ymao1/kibana that referenced this pull request Jun 5, 2025
…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 added a commit that referenced this pull request Jun 5, 2025
…sOnRuleTimeout=false` in kibana config (#222263) (#222799)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Response Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config
(#222263)](#222263)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ying
Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2025-06-05T01:58:47Z","message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Alerting","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana
config","number":222263,"url":"https://github.com/elastic/kibana/pull/222263","mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222263","number":222263,"mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/222729","number":222729,"state":"OPEN"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
ymao1 added a commit that referenced this pull request Jun 5, 2025
…tsOnRuleTimeout=false` in kibana config (#222263) (#222800)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Response Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config
(#222263)](#222263)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ying
Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2025-06-05T01:58:47Z","message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Alerting","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana
config","number":222263,"url":"https://github.com/elastic/kibana/pull/222263","mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222263","number":222263,"mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/222729","number":222729,"state":"OPEN"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
kibanamachine added a commit that referenced this pull request Jun 5, 2025
…tsOnRuleTimeout=false` in kibana config (#222263) (#222729)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Response Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config
(#222263)](#222263)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ying
Mao","email":"ying.mao@elastic.co"},"sourceCommit":{"committedDate":"2025-06-05T01:58:47Z","message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Alerting","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v9.0.3","v8.18.3"],"title":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana
config","number":222263,"url":"https://github.com/elastic/kibana/pull/222263","mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222263","number":222263,"mergeCommit":{"message":"[Response
Ops][Alerting] Fixing issue with setting
`cancelAlertsOnRuleTimeout=false` in kibana config (#222263)\n\nFixing
https://github.com/elastic/kibana/issues/222127\n\n## Summary\n\nFixes
issue that causes Kibana to bootloop
when\n`xpack.alerting.cancelAlertsOnRuleTimeout` is set to `false` in
the\nkibana config.\n\nMoves the check for incompatible
`cancelAlertsOnRuleTimeout` and\n`autoRecoverAlerts` rule type config to
the plugin setup code because we\nmutate some of these values before
registering. So now the check\nactually checks the values set by the
rule type in the code. Then we\nproceed with merging some of these
values with the Kibana config.\nBecause there are issues with lifecycle
rule types when\n`cancelAlertsOnRuleTimeout` is set to false, we log a
warning when we\nsee this override in the config and ignore the setting
for lifecycle\nrule types. Persistent rule types (detection rules) will
still respect\nthis config override if set.\n\nThere will be a followup
issue to deprecate this config for 9.10 and\n8.19. This PR is to address
the immediate bug.\n\n## To Verify\n1. Set
`xpack.alerting.cancelAlertsOnRuleTimeout: false` in the Kibana\nconfig
and start Kibana.\n2. Verify Kibana starts up correctly with no
errors.\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"69690c9bc58a1114ea7b56782dddae3c0b9caf46"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ying Mao <ying.mao@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
pmuellr pushed a commit to pmuellr/kibana that referenced this pull request Jun 11, 2025
…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>
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Alerting release_note:fix Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.18.3 v8.19.0 v9.0.3 v9.1.0

5 participants