From 243de82cc6b7bb7ac7639c65c19147509674b487 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Wed, 4 Sep 2024 16:58:45 +0200 Subject: [PATCH] [CI] Enable failed test collection on ES-intake triggered serverless verification runs (#191937) ## Summary Currently, failed runs on https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote that were triggered by the ES Serverless pipeline's downstream, are not collecting failures. This makes it harder to grasp what set of tests failed. I think we originally disabled this reporting not to muddy our stats based on runs on various ES Serverless versions - however, with this, it's really hard to get an overview on which tests are failing for a run, so I'd like to get the failed suites to be displayed on the job. With this change - if I'm not mistaken - we'll generate the annotation on the Buildkite job, but we won't report to ci-stats or create github issues. ### In short What we have: Screenshot 2024-09-02 at 18 28 45 What I'd like: Screenshot 2024-09-02 at 18 29 14 Tested in: https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1962 --- .buildkite/scripts/lifecycle/post_command.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh index 47e118a402408..26578f9b9cce1 100755 --- a/.buildkite/scripts/lifecycle/post_command.sh +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -36,12 +36,15 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then buildkite-agent artifact upload '.es/**/*.hprof' buildkite-agent artifact upload 'data/es_debug_*.tar.gz' - if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]] && \ - # Skip when triggered from elasticsearch's validation pipeline - [[ $BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG != 'elasticsearch-serverless-intake' ]] - then - echo "--- Run Failed Test Reporter" - node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml' + if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then + if [[ $BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG == 'elasticsearch-serverless-intake' ]]; then + echo "--- Run Failed Test Reporter (only junit)" + node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml'\ + --no-github-update --no-index-errors + else + echo "--- Run Failed Test Reporter" + node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml' + fi fi if [[ -d 'target/test_failures' ]]; then