Skip to content

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

Merged
kibanamachine merged 2 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-251164
Feb 3, 2026
Merged

[8.19] [Security Solution] Unlock prebuilt rules upgrade due to deprecated lastRun.outcomeMsg (#251164)#251391
kibanamachine merged 2 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-251164

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

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)
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #1 / scripts/generate_plugin builds a generated plugin into a viable archive
  • [job] [logs] Jest Integration Tests #1 / scripts/generate_plugin builds a generated plugin into a viable archive

cc @maximpn

@kibanamachine kibanamachine merged commit b61ceb3 into elastic:8.19 Feb 3, 2026
13 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.

3 participants