-
Notifications
You must be signed in to change notification settings - Fork 515
[Security Rules] Integrate security_detection_engine OOM testing pipeline #15829
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 Rules] Integrate security_detection_engine OOM testing pipeline #15829
Conversation
e55d865 to
cd9fc1a
Compare
cd9fc1a to
88cbc88
Compare
1af6780 to
96ff986
Compare
9f42d25 to
1a5982e
Compare
Ideally it should be possible to prevent the cleanup steps in the triggered pipeline from cancelling. I've explored the possibilities but it may time to figure out a proper solution. So it will be a follow up PR when there is time to address this task. |
44a27e0 to
687f98b
Compare
|
I've addressed your comments. Could you have a look? It seems the last build failed due to unrelated to this PR resons. |
I just wanted to clarify my suggestion. AFAIK Buildkite jobs run in a Kibernetes environment. For example elastic/integrations pipelines already use Go and Ubuntu images. Consequently it opens up a possibility to build a custom image with elastic-package from a standard Go image and use it for Buildklite jobs/steps requiring elastic-package. |
Ah! Now I know what you meant @maximpn Not all steps in CI run in a kubernetes environment. There are steps that run on VMs, for instance all the steps testing the packages. Not sure about moving But I see that there could be other advantages of using a custom base image for those steps, having some software installed. |
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.
You could create manually those PRs in the backport branches.
Or, I saw that in some other PRs it was used mergify to create those PRs: #13856 (comment)
I don't know if there would be conflicts if they are created by mergify.
23ecd78 to
099bd2f
Compare
|
I've applied your suggestion and got rid of |
mrodm
left a comment
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.
LGTM!
Just a minor comment to avoid an error in bash.
FYI @elastic/ecosystem this PR introduces a way to add custom steps or tests to each package in CI, that could be used in other packages too.
I agree that could be interesting to remove the build of elastic-package, but maybe the easiest path is to download the binaries from the release page. I would keep the code to build from source too because this is useful to test elastic-package and package-spec branches, but by default I agree that it could be interesting to use the pre-built binaries.
Nice, this is great. |
099bd2f to
5d55d01
Compare
|
/test |
💔 Build Failed
Failed CI Steps
History
cc @maximpn |
mrodm
left a comment
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.
Thanks @maximpn !
Partially addresses: elastic/kibana#188090
Summary
This PR integrates Prebuilt Rules OOM testing Buildkite pipeline into the Pull Request Buildkite pipeline.
Details
Pull Request Builkite pipeline script have been extended in a generic way to support custom package checker scripts located under
<repo-root>/.buildkite/scripts/packages/<package-name>.sh. It allows to run any custom verification and testing logic specific to a package.This PR adds
.buildkite/scripts/packages/security_detection_engine.shscript file. This script runs only for security_detection_engine package and triggers the Prebuilt Rules Out-Of-Memory testing pipeline. The triggered pipeline performs e2e testing to reveal potential blockers due to Kibana Out-Of-Memory instance failures when performing actions upon the package (installing the package, review prebuilt rules available in the package, installing prebuilt rules from the package etc.).Tested stack versions
For now
.buildkite/scripts/packages/security_detection_engine.shtriggers Prebuilt Rules OOM testing Buildkite pipeline against compatible minor versions under development. The decision is made based on Kibana's versions.json. While compatibility is determined viaconditions.kibana.versionfield in the package'smanifest.yml.For example
conditions.kibana.versionhas^9.2.0restriction and we have9.2.2and9.3.0under development. It means the OOM tests will run against9.2.2-SNAPSHOTand9.3.0-SNAPSHOT.We consider extending the testing surface to the latest release patch versions after collecting more data in the CI runs.
Affected teams
@elastic/threat-research-and-detection-engineering,
FYI this PR will affect security_detection_engine package release process. Every PR containing changes to the security_detection_engine package will trigger Prebuilt Rules OOM testing ECH Buildkite pipeline.
Further improvements
cancel_intermediate_builds: trueconfiguration at the Integrations PR Buildkite build. Pushing a fresh commit cancels the currently running PR build leading to cancelling the triggered build. Eventually the clean up steps in the triggered build can't execute and clean up resources in the cloud.docker.elastic.co. elastic-package installation is a complex process requiring a chain on installations GVM -> Go -> elastic-package. And it takes in average 3 minutes per each integration (integrations build in parallel). On top of that Prebuilt Rules OOM testing Buildkite pipeline has to install elastic-package as well. It sums up to 6 minutes which could be reduced.