-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Provision automatic test runs for ruby/java unit tests and integration tests with fips mode #17029
Conversation
This commit shows a proposed pattern for running automated tests for logstash in FIPS mode. It uses a new identifier in gradle for conditionally setting properties to configure fips mode. The tests are run in a container representative of the base image the final artifacts will be built from.
This commit moves test setup/config under x-pack dir.
CODEREVIEW: What do we want to do about the failing license checks while we figure out how we want to manage the bcfips deps? |
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.
I approve merging this to the feature branch, and have left one suggestion to more tightly-group the gradle bits together.
logstash-core/build.gradle
Outdated
@@ -124,6 +124,20 @@ tasks.register("javaTests", Test) { | |||
exclude '/org/logstash/plugins/factory/PluginFactoryExtTest.class' | |||
exclude '/org/logstash/execution/ObservedExecutionTest.class' | |||
|
|||
if (runTestsInFIPSMode) { |
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.
I think these test config modifications can live inside of x-pack:
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.
this seems great! I just cherry-picked that commit to see how it does in CI. Thanks so much!
I'm ok with skipping the license checking in the feature branch, at least until we have the packaging story in place - I don't think it's really buying us a whole bunch at this point |
@robbavey is there a pattern for skipping those other than just deleting those steps on this branch? |
@donoghuc I believe you can add a https://buildkite.com/resources/changelog/11-skipped-jobs-are-now-hidden-by-default/ https://buildkite.com/docs/pipelines/configure/step-types/command-step |
|
💔 Build Failed
Failed CI StepsHistory
|
OK this is in good shape. I'm going to get this merged. We may want to split the integration tests as they take 40 mins. |
Release notes
[rn:skip]
What does this PR do?
Add pipeline steps for performing tests under fips mode. For the ruby/java unit tests and the integration tests we now run the tests in a docker environment configured for FIPS. Additionally gradle has been configured with a new option to ensure additional java properties are injected at test time. This in particular (managing injection of properties directly) will likely change over time, for now the emphasis is just getting automate testing in place so we can start burning down test failures related to running in FIPS mode.
How to test this PR locally
Buildkite build https://buildkite.com/elastic/logstash-exhaustive-tests-pipeline/builds/1266
Related issues
This is a POC for solving https://github.com/elastic/ingest-dev/issues/4954