Skip to content

[CI] Refactor script to run integration tests #2768

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

Merged
merged 15 commits into from
Jul 25, 2025

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Jul 23, 2025

This PR applies a refactor in .buildkite/scripts/integration_tests.sh to simplify how to set a new target to test all the packages in a given folder independently.

It also ensures that in Serverless pipeline just is installed the required tools once.

Author's checklist

@mrodm mrodm self-assigned this Jul 23, 2025
@mrodm
Copy link
Contributor Author

mrodm commented Jul 23, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 23, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 23, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

/test

@mrodm mrodm marked this pull request as ready for review July 24, 2025 10:16
@mrodm mrodm requested a review from a team as a code owner July 24, 2025 10:16
@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

Comment on lines +81 to +82
target=${TARGET#"test-check-packages-"}
package_folder="${target}.${PACKAGE}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added as part of the package folder the target that it is running.

If it is required to add with-logstash target to be run in parallel steps, there is a package that would be duplicated. system_benchmark is located twice in with-logstash and benchmarks folders.

That makes me think that if we create two packages with the same folder name in the the folders as:

  • test/packages/parallel/mypackage
  • test/packages/false_positives/mypackage

Logs from both executions would be uploaded to the same folder:
buildkite/elastic-package/PR-1234-456/insecure-logs/mypackage

Adding the target this would become:

  • buildkite/elastic-package/PR-1234-456/insecure-logs/parallel.mypackage
  • buildkite/elastic-package/PR-1234-456/insecure-logs/false-positivies.mypackage

Not added the full target name (test-check-packages-parallel or test-check-packages-false-positives) to be easier to find the files in the UI.

@mrodm
Copy link
Contributor Author

mrodm commented Jul 24, 2025

test serverless

@elastic-vault-github-plugin-prod

@mrodm
Copy link
Contributor Author

mrodm commented Jul 25, 2025

test serverless

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@elastic-vault-github-plugin-prod

Comment on lines -113 to -119
test_each_package=false
case "${TARGET}" in
"${PARALLEL_TARGET}" | "${FALSE_POSITIVES_TARGET}" | "${LOGSTASH_TARGET}")
test_each_package=true
;;
esac
if [[ "${test_each_package}" == "true" ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified this code to call directly make target with the corresponding variables.
This would help to set up a new target to run in parallel their test packages.

@@ -7,6 +7,8 @@ GO_VERSION=$(cat .go-version)
export GO_VERSION

export SERVERLESS=${SERVERLESS:-"false"}
export UPLOAD_SAFE_LOGS=${UPLOAD_SAFE_LOGS:-"0"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default, logs are not uploaded to the private bucket.

@mrodm mrodm merged commit c51201c into elastic:main Jul 25, 2025
3 checks passed
@mrodm mrodm deleted the refactor-integration-tests branch July 25, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants