From 39eb2169674a3c68753e643e0a51d2de821f559f Mon Sep 17 00:00:00 2001 From: Vihang Mehta Date: Wed, 22 Jun 2022 10:15:28 -0700 Subject: [PATCH] Fix bazel coverage build on Jenkins Summary: Coverage runs were getting `nobuild_runfile_links` from a expansion of `remote_download_minimal`. This happens to cause issues. So explicitly set `build_runfile_links` for coverage runs. See https://github.com/bazelbuild/bazel/issues/4685#issuecomment-1145338038 Test Plan: Ran the coverage build, most of the failures go away. Reviewers: zasgar, michelle, jamesbartlett Reviewed By: jamesbartlett Signed-off-by: Vihang Mehta Differential Revision: https://phab.corp.pixielabs.ai/D11654 GitOrigin-RevId: d469d5dfbfbc4df8d7adce36b459fb5d813a9e0e --- .bazelrc | 3 +-- ci/jenkins.bazelrc | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index b744483ca40..cda34554db2 100644 --- a/.bazelrc +++ b/.bazelrc @@ -7,6 +7,7 @@ build --host_action_env=CLANG_COMPILER_VERSION=14.0_0 build --remote_download_minimal test --remote_download_minimal run --remote_download_toplevel +coverage --build_runfile_links build:clang --action_env=CC build:clang --host_action_env=CC @@ -202,8 +203,6 @@ coverage --instrument_test_targets coverage --define PL_COVERAGE=true coverage --copt -DPL_COVERAGE coverage --test_tag_filters=-requires_root,-requires_bpf,-no_coverage,-disabled,-no_gcc -# Uploading to BES from the coverage build seems to fail on jenkins. -coverage --experimental_build_event_upload_strategy=local # Use stable GIT build tag by default. build --define BUNDLE_VERSION={STABLE_BUILD_TAG} diff --git a/ci/jenkins.bazelrc b/ci/jenkins.bazelrc index 51a3d19c411..87995a65667 100644 --- a/ci/jenkins.bazelrc +++ b/ci/jenkins.bazelrc @@ -44,3 +44,6 @@ test --local_cpu_resources=14 build --jobs 16 test --jobs 16 + +# Uploading to BES from the coverage build seems to fail on jenkins. +coverage --experimental_build_event_upload_strategy=local