Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Security Solution][Detections] Fix a bug in siem-detection-engine-rule-status Saved Object migration to SO references (#115355) #115486

Merged
merged 4 commits into from
Oct 19, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

…le-status Saved Object migration to SO references (elastic#115355)

**Ticket:** elastic#107068
**Follow-up after:** elastic#114585

## Summary

The existing migration function `legacyMigrateRuleAlertIdSOReferences` that migrates `alertId` fields to SO references array did not include all the other attributes of a `siem-detection-engine-rule-status` doc being migrated to the resulting doc.

This PR includes a fix and an integration test for that.

## Run the test

To run the test, in one terminal execute:

```
cd ${KIBANA_HOME} && node scripts/functional_tests_server --config x-pack/test/detection_engine_api_integration/security_and_spaces/config.ts
```

In another terminal execute:

```
cd ${KIBANA_HOME} && node scripts/functional_test_runner --config x-pack/test/detection_engine_api_integration/security_and_spaces/config.ts --include=x-pack/test/detection_engine_api_integration/security_and_spaces/tests/migrations.ts
```

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
@spong
Copy link
Member

spong commented Oct 19, 2021

@elasticmachine merge upstream

@banderror
Copy link
Contributor

@elasticmachine merge upstream

@FrankHassanabad
Copy link
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor Author

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @banderror

@kibanamachine kibanamachine merged commit 361ba92 into elastic:7.x Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants