Skip to content
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

[Buildkite] Skip install package command in serverless builds for some packages #9686

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ create_kind_cluster() {
kind create cluster --config "${WORKSPACE}/kind-config.yaml" --image "kindest/node:${K8S_VERSION}"
}


delete_kind_cluster() {
echo "--- Delete kind cluster"
kind delete cluster || true
Expand Down Expand Up @@ -410,7 +409,6 @@ is_package_excluded() {
return 1
}


is_supported_capability() {
if [ "${SERVERLESS_PROJECT}" == "" ]; then
return 0
Expand Down Expand Up @@ -755,6 +753,19 @@ build_zip_package() {
return 0
}

skip_installation_step() {
local package=$1
if ! is_serverless ; then
return 1
fi

if [[ "$package" == "security_detection_engine" ]]; then
return 0
fi

return 1
Comment on lines +762 to +766
Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine-ish for now as this package is an outlier in terms of size and impact on memory usage. We'll have to monitor whether the duplicate installations for all other packages still impact memory enough to cause an occasional OOM on QA projects.

}

install_package() {
local package=$1
echo "Install package: ${package}"
Expand Down Expand Up @@ -814,10 +825,13 @@ run_tests_package() {
fi
fi

echo "--- [${package}] test installation"
if ! install_package "${package}" ; then
return 1
if ! skip_installation_step "${package}" ; then
echo "--- [${package}] test installation"
if ! install_package "${package}" ; then
Copy link
Member

Choose a reason for hiding this comment

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

Could we keep this test for some package in serverless? I would like to keep testing this command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I've added the logic to just skip one package for now here 01e0cb3

return 1
fi
fi

echo "--- [${package}] run test suites"
if is_serverless; then
if ! test_package_in_serverless "${package}" ; then
Expand Down