-
Notifications
You must be signed in to change notification settings - Fork 127
Skip by default compareResults in pipeline tests for serverless #1521
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
Skip by default compareResults in pipeline tests for serverless #1521
Conversation
| var geoIPKeys = []string{ | ||
| "as", | ||
| "geo", | ||
| "client.as", | ||
| "client.geo", | ||
| "destination.as", | ||
| "destination.geo", | ||
| "host.geo", // not defined host.as in ECS | ||
| "observer.geo", // not defined observer.as in ECS | ||
| "server.as", | ||
| "server.geo", | ||
| "source.as", | ||
| "source.geo", | ||
| "threat.enrichments.indicateor.as", | ||
| "threat.enrichments.indicateor.geo", | ||
| "threat.indicateor.as", | ||
| "threat.indicateor.geo", | ||
| // packages using geo fields in nested objects | ||
| "netskope.alerts.user.geo", | ||
| "netskope.events.user.geo", | ||
| } | ||
|
|
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.
Removed since in this PR it is removed the comparison of documents with the samples.
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.
👍
| ) | ||
|
|
||
| var ( | ||
| serverlessEnableCompareResults = environment.WithElasticPackagePrefix("SERVERLESS_PIPELINE_TEST_ENABLE_COMPARE_RESULTS") |
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.
Add somewhere a TODO comment mentioning that this is a temporary workaround till we have something better for deterministic geoip in serverless.
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.
Updated the TODO message here: 6b35523
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.
👍
| ) | ||
|
|
||
| var ( | ||
| serverlessEnableCompareResults = environment.WithElasticPackagePrefix("SERVERLESS_PIPELINE_TEST_ENABLE_COMPARE_RESULTS") |
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 am thinking now that maybe we should leave this enabled by default, so when running locally, by default we see the errors. And we can disable in the CI jobs where we want to use this. WDYT?
| serverlessEnableCompareResults = environment.WithElasticPackagePrefix("SERVERLESS_PIPELINE_TEST_ENABLE_COMPARE_RESULTS") | |
| serverlessEnableCompareResults = environment.WithElasticPackagePrefix("SERVERLESS_PIPELINE_TEST_DISABLE_COMPARE_RESULTS") |
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.
Ok, agreed
That would make the default behavior to run those comparison and the exception disable them. It makes sense for me. I'll change it.
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.
👍
💚 Build Succeeded
History
cc @mrodm |
This PR skips the compare results function for serverless by default. This function is in charge of comparing the documents received by elasticsearch with the samples. The issue is in Serverless, since there are fields related to Geo IP database that cannot be checked properly.
It also adds a new environment variable ELASTIC_PACKAGE_SERVERLESS_PIPELINE_TEST_ENABLE_COMPARE_RESULTS. This new environment variable can be defined to force to run this
compareResultsfunction.When
elastic-package test pipelineis executed with a local stack, there are no changes. The complete pipeline tests are run.Examples to execute with this new environment variable: