Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Aug 13, 2024

Follows #1718

Force to fail rally_benchmark_malformed_template test package by updating the template.ndjson file as suggested in the README.md:

There is a syntax error in `_dev/benchmark/rally/logs-benchmark/template.ndjson`

This PR also adds the corresponding expected errors.

@mrodm mrodm self-assigned this Aug 13, 2024
package_name_manifest=$(cat "$package_root/manifest.yml" | yq -r '.name')
local expected_errors_file="${package_root%/}.expected_errors"
local result_tests="build/test-results/${package_name}-*.xml"
local result_tests="build/test-results/${package_name_manifest}-*.xml"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test results file names are using the package name defined in the manifest. Example:
build/test-results/rally_benchmarks-static-1723556393923280393.xml

{
"@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.999999Z07:00" }}",
"data_stream.type": "logs",
data_stream.type": "logs",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it was this file, elastic-package test static did not detect any failure.

With this change, I tried to force a failure here (as mentioned in the README.md of the package).

Copy link
Contributor Author

@mrodm mrodm Aug 13, 2024

Choose a reason for hiding this comment

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

Since #2012 , default version in elastic-package is 8.15.0. I think this file can be removed now.

I would keep the logic to add the custom Elastic stack version, in case it is needed for another test package. Probably here it can be used: #1811

WDYT?

@mrodm mrodm marked this pull request as ready for review August 13, 2024 16:04
@mrodm mrodm requested a review from a team as a code owner August 13, 2024 16:04
@mrodm mrodm requested a review from flash1293 August 13, 2024 16:04
@mrodm mrodm enabled auto-merge (squash) August 14, 2024 16:38
@mrodm mrodm merged commit d5f5955 into elastic:main Aug 14, 2024
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm deleted the add-expected-errors-benchmark-package branch August 14, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants