Skip to content

[RAC][Rule Registry] Add functional API test for createLifecycleExector#121465

Merged
simianhacker merged 17 commits intoelastic:mainfrom
simianhacker:issue-113003-followup
Dec 22, 2021
Merged

[RAC][Rule Registry] Add functional API test for createLifecycleExector#121465
simianhacker merged 17 commits intoelastic:mainfrom
simianhacker:issue-113003-followup

Conversation

@simianhacker
Copy link
Copy Markdown
Member

@simianhacker simianhacker commented Dec 16, 2021

Summary

This PR is a follow up to #118245. This adds test to ensure the rule registry can write, read, and the write back objects on the alert as data indices. I've also annotated the lifecycle_executor test with comments about where each part of the Rule Registry is called in Kibana, this should help the next set of engineers understand all the moving parts.

Checklist

@simianhacker simianhacker marked this pull request as ready for review December 17, 2021 17:08
@simianhacker simianhacker added Feature:RAC label obsolete Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Dec 17, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@simianhacker simianhacker added v8.1.0 release_note:skip Skip the PR/issue when compiling release notes labels Dec 17, 2021
mappings: mappingFromFieldMap(
{
testObject: {
type: 'object',
Copy link
Copy Markdown
Contributor

@mgiota mgiota Dec 21, 2021

Choose a reason for hiding this comment

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

Awesome that you test here the object type. Once your PR is merged, I would be curious to test with the recently added flattened type as well.

Copy link
Copy Markdown
Contributor

@mgiota mgiota left a comment

Choose a reason for hiding this comment

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

I happily approve this PR! @simianhacker great stuff!

id,
fields: {
[ALERT_REASON]: 'Test alert is firing',
...state,
Copy link
Copy Markdown
Contributor

@mgiota mgiota Dec 21, 2021

Choose a reason for hiding this comment

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

@simianhacker Can you explain maybe a bit more what you are doing here? Based on this https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts#L102 when calling alertWithLifecycle we pass the fields we want to index. So you index a new key called testObject, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, spreading the state will add the testObject to the index. When I was poking around in different solutions, I noticed that each plugin used alertWithLifecycle to add their additional metadata.

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@simianhacker simianhacker merged commit b149123 into elastic:main Dec 22, 2021
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Dec 22, 2021
@simianhacker simianhacker deleted the issue-113003-followup branch April 17, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:RAC label obsolete release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants