Skip to content

[9.3] [Security Solution] Unlock prebuilt rules upgrade due to deprecated lastRun.outcomeMsg (#251164)#251394

Merged
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-251164
Feb 3, 2026
Merged

[9.3] [Security Solution] Unlock prebuilt rules upgrade due to deprecated lastRun.outcomeMsg (#251164)#251394
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-251164

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

…astRun.outcomeMsg (elastic#251164)

**Addresses:** elastic#177852

## Summary

This PR introduces `lastRun.outcomeMsg` from `string` to `string[]` migration on rule update in Alerting Framework. It unlocking prebuilt rule upgrade workflow for customers migrated from 7.x stack version.

## Details

Some time ago Alerting Framework migrated `lastRun.outcomeMsg` from `string` to `string[]`. At that moment usual migrations were deprecated due to Serverless and model version migration wasn't ready yet. This migration went smoothly thanks to the according changes to the codebase. However, the changes didn't cover customers upgrading from `7.x` stack version and having something written to `lastRun.outcomeMsg`.

This PR makes change only to `rulesClient.update()` method to migrate `lastRun.outcomeMsg` before it gets written to the new saved object.

Looking through the code it seems another methods aren't impacted. For example, rule duplication doesn't copy over `lastRun` field.

(cherry picked from commit 3a2f3fd)
@kibanamachine kibanamachine merged commit 64d90fa into elastic:9.3 Feb 3, 2026
17 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants