Skip to content

Commit

Permalink
[skip-ci][buildkite] use --force-install on bare metal machine (#178814)
Browse files Browse the repository at this point in the history
## Summary

While running performance tests we are using bare metal machines and
`yarn kbn bootstrap` consistently
[fails](https://buildkite.com/elastic/kibana-single-user-performance/builds/12895#018e414b-b246-4c0f-b818-fdd96f42518e),
though it works when we retry with `--force-install` flag

<img width="1198" alt="image"
src="https://github.com/elastic/kibana/assets/10977896/f4597fcd-ccd2-4a6d-a4c8-53906dc65b07">

Though it is more expensive operation, running `yarn kbn bootstrap
--force-install` for the first attempt should save us around 50s.

With PR:
<img width="1205" alt="Screenshot 2024-03-18 at 17 08 36"
src="https://github.com/elastic/kibana/assets/10977896/5b916e86-f4c7-4ade-992f-e985c430b397">
Validated in pipeline
https://buildkite.com/elastic/kibana-single-user-performance/builds/12926#018e522b-496a-44dc-8c9f-88b98d7512fe
  • Loading branch information
dmlemeshko authored Mar 18, 2024
1 parent cc30563 commit 6fe62d0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,30 @@
set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

is_test_execution_step

.buildkite/scripts/bootstrap.sh
run_bootstrap() {
echo "Running yarn kbn bootstrap --force-install"
yarn kbn bootstrap --force-install
}

echo "--- yarn install and boostrap"
if ! run_bootstrap; then
echo "--- bootstrap failed, trying again in 15 seconds"
sleep 15

# Most bootstrap failures will result in a problem inside node_modules that does not get fixed on the next bootstrap
# So, we should just delete node_modules in between attempts
rm -rf node_modules

run_bootstrap
fi

if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then
check_for_changed_files 'yarn kbn bootstrap'
fi

# These tests are running on static workers so we have to make sure we delete previous build of Kibana
rm -rf "$KIBANA_BUILD_LOCATION"
Expand Down

0 comments on commit 6fe62d0

Please sign in to comment.