-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][API testing] Move and restructures Rule execution logic #170765
[Security Solution][API testing] Move and restructures Rule execution logic #170765
Conversation
…ructure-rule_execution_test
…ructure-rule_execution_test
…om/WafaaNasr/kibana into move-structure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
…ructure-rule_execution_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you for doing this! Left a few comments
@@ -20,7 +20,6 @@ | |||
}, | |||
"settings": { | |||
"index": { | |||
"refresh_interval": "1s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why did we remove refresh_interval
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! The refresh_interval
is not a valid config in Serverless, and We found out that we don't even need for ESS either since out tests don't valid against that fields
return { | ||
...svlSharedConfig.getAll(), | ||
services: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the same as just services,
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes true, I added it in case we want to pass additional services for the Security
const config = getService('config'); | ||
const isServerless = config.get('serverless'); | ||
const dataPathBuilder = new EsArchivePathBuilder(isServerless); | ||
const path = dataPathBuilder.getPath('auditbeat/hosts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we rename path
to auditbeatPath
? I think it will be more descriptive this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure
expect(previewAlerts.length).eql(maxSignals * 3); | ||
const shellSignals = previewAlerts.filter((alert) => alert._source?.[ALERT_DEPTH] === 2); | ||
expect(previewAlerts.length).eql(maxAlerts * 3); | ||
const shellalerts = previewAlerts.filter((alert) => alert._source?.[ALERT_DEPTH] === 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellAlerts
?
const config = getService('config'); | ||
const isServerless = config.get('serverless'); | ||
const dataPathBuilder = new EsArchivePathBuilder(isServerless); | ||
const path = dataPathBuilder.getPath('auditbeat/hosts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here, maybe auditbeatPath
will be more descriptive
...detections_response/default_license/rule_execution_logic/execution_logic/machine_learning.ts
Show resolved
Hide resolved
…om/WafaaNasr/kibana into move-structure-rule_execution_test
…ructure-rule_execution_test
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @WafaaNasr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ftr_configs.yml
Summary
Following the initial work in this #166755
Addresses part of [Security Solution] Restructure API integration tests into meaningful groups that run in parallel on CI #151902 for rule execution logic
Moved the utility files associated with rule execution logic to the new directory
security_solution_api_integration
. Files not actively used in the previous folder were moved, while duplicate files remained in their original positions.Updated the CodeOwner file for the newly moved tests
Old/new group details, decisions, and execution time are mentioned in thisdocument
Added new
Alert
archive for version8.8.0
Resolved the issue with the
query.ts
test where the execution logic is executed last, encompassing the "query" test because it was unloading the alerts document and led to failures in subsequent tests.For
Alert As Data
in Serverless the alert ancestor will be a data-stream however in ESS will be.internal.alerts-security.alerts-default-000001'