From 8db92777a303c24c0d1a501306c2ea8f8556d7df Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 06:04:01 +0000 Subject: [PATCH 1/9] Envoy Update to d3110f4 (May 9, 2022) Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- .bazelrc | 14 +++++++++----- .bazelversion | 2 +- bazel/repositories.bzl | 4 ++-- ci/run_envoy_docker.sh | 3 +++ source/client/stream_decoder.cc | 2 +- test/stream_decoder_test.cc | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.bazelrc b/.bazelrc index 4b3650860..4ce9141a3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -27,7 +27,7 @@ build --incompatible_strict_action_env build --host_force_python=PY3 build --java_runtime_version=remotejdk_11 build --tool_java_runtime_version=remotejdk_11 -#build --platform_mappings="" # unique +build --platform_mappings="" # unique # silence absl logspam. build --copt=-DABSL_MIN_LOG_LEVEL=4 @@ -219,9 +219,9 @@ build:rbe-toolchain-asan --linkopt -fuse-ld=lld build:rbe-toolchain-asan --action_env=ENVOY_UBSAN_VPTR=1 build:rbe-toolchain-asan --copt=-fsanitize=vptr,function build:rbe-toolchain-asan --linkopt=-fsanitize=vptr,function -build:rbe-toolchain-asan --linkopt=-L/opt/llvm/lib/clang/12.0.1/lib/linux -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a +build:rbe-toolchain-asan --linkopt='-L/opt/llvm/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu' +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone.a +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a build:rbe-toolchain-msan --linkopt=-L/opt/libcxx_msan/lib build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib @@ -295,7 +295,7 @@ build:remote-clang-cl --config=rbe-toolchain-clang-cl # Docker sandbox # NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/main/toolchains/rbe_toolchains_config.bzl#L8 -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:a37d5f539f04b44e284953b4a075826ead117279 +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:6fff5a6c67db843ddabde4533e24cab6122c7011 build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker @@ -329,6 +329,10 @@ build:docker-tsan --config=rbe-toolchain-tsan build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com +# Build Event Service +build:google-bes --bes_backend=grpcs://buildeventservice.googleapis.com +build:google-bes --bes_results_url=https://source.cloud.google.com/results/invocations/ + # Fuzz builds # Shared fuzzing configuration. diff --git a/.bazelversion b/.bazelversion index 864f3a11f..6cc5a6454 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.0.0-pre.20220414.2 +6.0.0-pre.20220421.3 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 8a463d838..541974a0a 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "69135f81b18b6653d80ecac34669427d3dd75306" -ENVOY_SHA = "45b06e53ef251165690a82acee55c41b6ae34e87d58ab2f005cec3dcb72e9249" +ENVOY_COMMIT = "d3110f49cf4b14e7aa05388ec2ddc052c402381c" # May 9, 2022 +ENVOY_SHA = "90cb3c5e8d6f3632edc7a26e6443937dfff03a7c3c13ffbc47516e93110e3518" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad" diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh index 3fc11855c..9d502183e 100755 --- a/ci/run_envoy_docker.sh +++ b/ci/run_envoy_docker.sh @@ -15,6 +15,7 @@ read -ra ENVOY_DOCKER_OPTIONS <<< "${ENVOY_DOCKER_OPTIONS:-}" export HTTP_PROXY="${http_proxy:-}" export HTTPS_PROXY="${https_proxy:-}" export NO_PROXY="${no_proxy:-}" +export GOPROXY="${go_proxy:-}" if is_windows; then [[ -z "${IMAGE_NAME}" ]] && IMAGE_NAME="envoyproxy/envoy-build-windows2019" @@ -73,6 +74,7 @@ docker run --rm \ -e HTTP_PROXY \ -e HTTPS_PROXY \ -e NO_PROXY \ + -e GOPROXY \ -e BAZEL_STARTUP_OPTIONS \ -e BAZEL_BUILD_EXTRA_OPTIONS \ -e BAZEL_EXTRA_TEST_OPTIONS \ @@ -80,6 +82,7 @@ docker run --rm \ -e ENVOY_STDLIB \ -e BUILD_REASON \ -e BAZEL_REMOTE_INSTANCE \ + -e GOOGLE_BES_PROJECT_ID \ -e GCP_SERVICE_ACCOUNT_KEY \ -e NUM_CPUS \ -e ENVOY_RBE \ diff --git a/source/client/stream_decoder.cc b/source/client/stream_decoder.cc index a86bef120..67764d5df 100644 --- a/source/client/stream_decoder.cc +++ b/source/client/stream_decoder.cc @@ -183,7 +183,7 @@ void StreamDecoder::setupForTracing() { uuid_generator.set(*headers_copy, true); uuid_generator.setTraceReason(*headers_copy, Envoy::Tracing::Reason::ClientForced); active_span_ = http_tracer_->startSpan(config_, *headers_copy, stream_info_, tracing_decision); - active_span_->injectContext(*headers_copy); + active_span_->injectContext(*headers_copy, /*upstream=*/nullptr); request_headers_.reset(headers_copy.release()); // We pass in a fake remote address; recently trace finalization mandates setting this, and will // segfault without it. diff --git a/test/stream_decoder_test.cc b/test/stream_decoder_test.cc index 05c4293c5..6e3e4961b 100644 --- a/test/stream_decoder_test.cc +++ b/test/stream_decoder_test.cc @@ -135,7 +135,7 @@ TEST_F(StreamDecoderTest, LatencyIsMeasured) { const Envoy::Tracing::Decision) -> Envoy::Tracing::Span* { EXPECT_EQ(Envoy::Tracing::OperationName::Egress, config.operationName()); auto* span = new Envoy::Tracing::MockSpan(); - EXPECT_CALL(*span, injectContext(_)); + EXPECT_CALL(*span, injectContext(_, _)); EXPECT_CALL(*span, setTag(_, _)).Times(12); EXPECT_CALL(*span, finishSpan()); return span; From 672ee985a1fdb43457ddfd98503e9e0c0a7a1432 Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 18:02:02 +0000 Subject: [PATCH 2/9] fix integration test. There are now only two default ciphers: 1 RSA, 1 DSA. To achieve the same result as the previous test, we need nighthawk to have certs for both encryptions. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- .../nighthawk_https_origin_dsa.yaml | 58 +++++++++++++ test/integration/test_integration_basics.py | 84 +++++++++++++++---- 2 files changed, 125 insertions(+), 17 deletions(-) create mode 100644 test/integration/configurations/nighthawk_https_origin_dsa.yaml diff --git a/test/integration/configurations/nighthawk_https_origin_dsa.yaml b/test/integration/configurations/nighthawk_https_origin_dsa.yaml new file mode 100644 index 000000000..9917cfbcb --- /dev/null +++ b/test/integration/configurations/nighthawk_https_origin_dsa.yaml @@ -0,0 +1,58 @@ +admin: + access_log: + - name: envoy.access_loggers.file + typed_config: + '@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog + path: $tmpdir/nighthawk-test-server-admin-access.log + profile_path: $tmpdir/nighthawk-test-server.prof + address: + socket_address: { address: $server_ip, port_value: 0 } +static_resources: + listeners: + - address: + socket_address: + address: $server_ip + port_value: 0 + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + generate_request_id: false + codec_type: AUTO + stat_prefix: ingress_http + route_config: + name: local_route + virtual_hosts: + - name: service + domains: + - "*" + http_filters: + - name: dynamic-delay + - name: test-server + typed_config: + "@type": type.googleapis.com/nighthawk.server.ResponseOptions + response_body_size: 10 + v3_response_headers: + - { header: { key: "x-nh", value: "1" } } + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + dynamic_stats: false + transport_socket: + name: tls + typed_config: + "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + common_tls_context: + tls_certificates: + - certificate_chain: + inline_string: | + @inject-runfile:nighthawk/external/envoy/test/config/integration/certs/server_ecdsacert.pem + private_key: + inline_string: | + @inject-runfile:nighthawk/external/envoy/test/config/integration/certs/server_ecdsakey.pem +layered_runtime: + layers: + - name: static_layer + static_layer: + envoy.reloadable_features.no_extension_lookup_by_name: false diff --git a/test/integration/test_integration_basics.py b/test/integration/test_integration_basics.py index a736114d0..d0fc8896c 100644 --- a/test/integration/test_integration_basics.py +++ b/test/integration/test_integration_basics.py @@ -367,7 +367,7 @@ def test_h3_quic_with_custom_upstream_bind_configuration(quic_test_server_fixtur asserts.assertCounterEqual(counters, "upstream_cx_http3_total", 1) -def _do_tls_configuration_test(https_test_server_fixture, cli_parameter, use_h2): +def _do_tls_configuration_test(https_test_server_fixture, cli_parameter, use_h2, ciphers): """Test with different ciphers. For a given choice of (--tls-context, --transport-socket) x (H1, H2), @@ -377,6 +377,7 @@ def _do_tls_configuration_test(https_test_server_fixture, cli_parameter, use_h2) https_test_server_fixture: pytest.fixture that controls a test server and client cli_parameter: string, --tls-context or --transport-socket use_h2: boolean, whether to pass --h2 + ciphers: list[string], list of ciphers to use with TLS """ if cli_parameter == "--tls-context": json_template = "{common_tls_context:{tls_params:{cipher_suites:[\"-ALL:%s\"]}}}" @@ -386,10 +387,7 @@ def _do_tls_configuration_test(https_test_server_fixture, cli_parameter, use_h2) "\"@type\":\"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext\",", "common_tls_context:{tls_params:{cipher_suites:[\"-ALL:%s\"]}}}}") - for cipher in [ - "AES128-GCM-SHA256", - "ECDHE-RSA-AES256-GCM-SHA384", - ]: + for cipher in ciphers: parsed_json, _ = https_test_server_fixture.runNighthawkClient( (["--protocol", "http2"] if use_h2 else []) + [ "--duration", "10", "--termination-predicate", "benchmark.http_2xx:0", cli_parameter, @@ -402,30 +400,82 @@ def _do_tls_configuration_test(https_test_server_fixture, cli_parameter, use_h2) @pytest.mark.parametrize('server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin.yaml"]) -def test_https_h1_tls_context_configuration(https_test_server_fixture): - """Test that specifying tls cipher suites works with the h1 pool.""" - _do_tls_configuration_test(https_test_server_fixture, "--tls-context", use_h2=False) +def test_https_h1_tls_context_configuration_rsa(https_test_server_fixture): + """Test that specifying RSA compatible tls cipher suites works with the h1 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--tls-context", + use_h2=False, + ciphers=["ECDHE-RSA-AES256-GCM-SHA384"]) @pytest.mark.parametrize('server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin.yaml"]) -def test_https_h1_transport_socket_configuration(https_test_server_fixture): - """Test that specifying tls cipher suites via transport socket works with the h1 pool.""" - _do_tls_configuration_test(https_test_server_fixture, "--transport-socket", use_h2=False) +def test_https_h1_transport_socket_configuration_rsa(https_test_server_fixture): + """Test that specifying RSA compatible tls cipher suites via transport socket works with the h1 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--transport-socket", + use_h2=False, + ciphers=["ECDHE-RSA-AES256-GCM-SHA384"]) @pytest.mark.parametrize('server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin.yaml"]) -def test_https_h2_tls_context_configuration(https_test_server_fixture): - """Test that specifying tls cipher suites works with the h2 pool.""" - _do_tls_configuration_test(https_test_server_fixture, "--tls-context", use_h2=True) +def test_https_h2_tls_context_configuration_rsa(https_test_server_fixture): + """Test that specifying RSA compatible tls cipher suites works with the h2 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--tls-context", + use_h2=True, + ciphers=["ECDHE-RSA-AES256-GCM-SHA384"]) @pytest.mark.parametrize('server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin.yaml"]) -def test_https_h2_transport_socket_configuration(https_test_server_fixture): - """Test that specifying tls cipher suites via transport socket works with the h2 pool.""" - _do_tls_configuration_test(https_test_server_fixture, "--transport-socket", use_h2=True) +def test_https_h2_transport_socket_configuration_rsa(https_test_server_fixture): + """Test that specifying RSA compatible tls cipher suites via transport socket works with the h2 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--transport-socket", + use_h2=True, + ciphers=["ECDHE-RSA-AES256-GCM-SHA384"]) + + +@pytest.mark.parametrize( + 'server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin_dsa.yaml"]) +def test_https_h1_tls_context_configuration_dsa(https_test_server_fixture): + """Test that specifying DSA comptible tls cipher suites works with the h1 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--tls-context", + use_h2=False, + ciphers=["ECDHE-ECDSA-AES256-GCM-SHA384"]) + + +@pytest.mark.parametrize( + 'server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin_dsa.yaml"]) +def test_https_h1_transport_socket_configuration_dsa(https_test_server_fixture): + """Test that specifying DSA comptible tls cipher suites via transport socket works with the h1 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--transport-socket", + use_h2=False, + ciphers=["ECDHE-ECDSA-AES256-GCM-SHA384"]) + + +@pytest.mark.parametrize( + 'server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin_dsa.yaml"]) +def test_https_h2_tls_context_configuration_dsa(https_test_server_fixture): + """Test that specifying DSA comptible tls cipher suites works with the h2 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--tls-context", + use_h2=True, + ciphers=["ECDHE-ECDSA-AES256-GCM-SHA384"]) + + +@pytest.mark.parametrize( + 'server_config', ["nighthawk/test/integration/configurations/nighthawk_https_origin_dsa.yaml"]) +def test_https_h2_transport_socket_configuration_dsa(https_test_server_fixture): + """Test that specifying DSA comptible tls cipher suites via transport socket works with the h2 pool.""" + _do_tls_configuration_test(https_test_server_fixture, + "--transport-socket", + use_h2=True, + ciphers=["ECDHE-ECDSA-AES256-GCM-SHA384"]) @pytest.mark.parametrize('server_config', From f6b600307708ecaa50838c4640874cd6e071cd1a Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 18:29:39 +0000 Subject: [PATCH 3/9] fix format. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- bazel/repositories.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 541974a0a..9d88bf5fe 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,6 +1,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "d3110f49cf4b14e7aa05388ec2ddc052c402381c" # May 9, 2022 +ENVOY_COMMIT = "d3110f49cf4b14e7aa05388ec2ddc052c402381c" # May 9, 2022 ENVOY_SHA = "90cb3c5e8d6f3632edc7a26e6443937dfff03a7c3c13ffbc47516e93110e3518" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 From dcc072d7c64be9e6d810932aebc3ca223c1bce2c Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 18:53:54 +0000 Subject: [PATCH 4/9] Remove unnecessary date comment. Change order of update to make more sense. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- MAINTAINERS.md | 4 ++-- bazel/repositories.bzl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index f44cd6517..cbaae3f24 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -76,10 +76,10 @@ important maintenance task. When performing the update, follow this procedure: 1. Run `ci/do_ci.sh test`. Sometimes the dependency update comes with changes that break our build. Include any changes required to Nighthawk to fix that in the same PR. -1. Create a PR with a title like `Update Envoy to 9753819 (Jan 24th 2021)`, - describe all performed changes in the PR's description. 1. If the PR ends up modifying any c++ files, execute `ci/do_ci.sh fix_format` to reformat the files and avoid a CI failure. 1. Execute `tools/update_cli_readme_documentation.sh --mode fix` to regenerate the portion of our documentation that captures the CLI help output. This will prevent a CI failure in case any flags changed in the PR or upstream. +1. Create a PR with a title like `Update Envoy to 9753819 (Jan 24th 2021)`, + describe all performed changes in the PR's description. diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 9d88bf5fe..12c66cb12 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,6 +1,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "d3110f49cf4b14e7aa05388ec2ddc052c402381c" # May 9, 2022 +ENVOY_COMMIT = "d3110f49cf4b14e7aa05388ec2ddc052c402381c" ENVOY_SHA = "90cb3c5e8d6f3632edc7a26e6443937dfff03a7c3c13ffbc47516e93110e3518" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 From 7cb5d85813dbd9d3970a811094f019193a89e4af Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 21:28:37 +0000 Subject: [PATCH 5/9] test if clang version is the issue. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- .bazelrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index 4ce9141a3..35478bf63 100644 --- a/.bazelrc +++ b/.bazelrc @@ -219,9 +219,9 @@ build:rbe-toolchain-asan --linkopt -fuse-ld=lld build:rbe-toolchain-asan --action_env=ENVOY_UBSAN_VPTR=1 build:rbe-toolchain-asan --copt=-fsanitize=vptr,function build:rbe-toolchain-asan --linkopt=-fsanitize=vptr,function -build:rbe-toolchain-asan --linkopt='-L/opt/llvm/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu' -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone.a -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a +build:rbe-toolchain-asan --linkopt=-L/opt/llvm/lib/clang/12.0.1/lib/linux # unique +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a # unique +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a # unique build:rbe-toolchain-msan --linkopt=-L/opt/libcxx_msan/lib build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib From 16bfca50283b99384e5d0c5845346f443eab84f2 Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 21:46:43 +0000 Subject: [PATCH 6/9] View AZP clang directories Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- .bazelrc | 6 +++--- ci/run_clang_tidy.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index 35478bf63..4ce9141a3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -219,9 +219,9 @@ build:rbe-toolchain-asan --linkopt -fuse-ld=lld build:rbe-toolchain-asan --action_env=ENVOY_UBSAN_VPTR=1 build:rbe-toolchain-asan --copt=-fsanitize=vptr,function build:rbe-toolchain-asan --linkopt=-fsanitize=vptr,function -build:rbe-toolchain-asan --linkopt=-L/opt/llvm/lib/clang/12.0.1/lib/linux # unique -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a # unique -build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a # unique +build:rbe-toolchain-asan --linkopt='-L/opt/llvm/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu' +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone.a +build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a build:rbe-toolchain-msan --linkopt=-L/opt/libcxx_msan/lib build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib diff --git a/ci/run_clang_tidy.sh b/ci/run_clang_tidy.sh index b0ddfad08..67859f711 100755 --- a/ci/run_clang_tidy.sh +++ b/ci/run_clang_tidy.sh @@ -92,6 +92,7 @@ function filter_excludes() { function run_clang_tidy() { echo "Running clang_tidy with NUM_CPUS: ${NUM_CPUS:-0}." + tree ${LLVM_PREFIX}/share/clang/ python3 "${LLVM_PREFIX}/share/clang/run-clang-tidy.py" \ -clang-tidy-binary="${CLANG_TIDY}" \ -clang-apply-replacements-binary="${CLANG_APPLY_REPLACEMENTS}" \ From b18d4cfc688cb4a62f1858e24618e9672578cfc8 Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 21:58:05 +0000 Subject: [PATCH 7/9] fix tree command. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- ci/run_clang_tidy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_clang_tidy.sh b/ci/run_clang_tidy.sh index 67859f711..158a1257a 100755 --- a/ci/run_clang_tidy.sh +++ b/ci/run_clang_tidy.sh @@ -92,7 +92,7 @@ function filter_excludes() { function run_clang_tidy() { echo "Running clang_tidy with NUM_CPUS: ${NUM_CPUS:-0}." - tree ${LLVM_PREFIX}/share/clang/ + ls ${LLVM_PREFIX}/share/clang/ python3 "${LLVM_PREFIX}/share/clang/run-clang-tidy.py" \ -clang-tidy-binary="${CLANG_TIDY}" \ -clang-apply-replacements-binary="${CLANG_APPLY_REPLACEMENTS}" \ From a604838e9ec8ad42f206626185172b30fb1c60ef Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 22:15:22 +0000 Subject: [PATCH 8/9] try and find the file since its not in the expected directory. Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- ci/run_clang_tidy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_clang_tidy.sh b/ci/run_clang_tidy.sh index 158a1257a..63dbc3e88 100755 --- a/ci/run_clang_tidy.sh +++ b/ci/run_clang_tidy.sh @@ -92,7 +92,7 @@ function filter_excludes() { function run_clang_tidy() { echo "Running clang_tidy with NUM_CPUS: ${NUM_CPUS:-0}." - ls ${LLVM_PREFIX}/share/clang/ + find ${LLVM_PREFIX} -name *tidy.py python3 "${LLVM_PREFIX}/share/clang/run-clang-tidy.py" \ -clang-tidy-binary="${CLANG_TIDY}" \ -clang-apply-replacements-binary="${CLANG_APPLY_REPLACEMENTS}" \ From 4ee25555b39ec04bf9a9765f638936785de409fb Mon Sep 17 00:00:00 2001 From: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> Date: Tue, 10 May 2022 23:06:59 +0000 Subject: [PATCH 9/9] Disable clang_tidy CI target Signed-off-by: tomjzzhang <4367421+tomjzzhang@users.noreply.github.com> --- .azure-pipelines/pipelines.yml | 35 +++++++++++++++++----------------- ci/run_clang_tidy.sh | 1 - 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml index 5b2802e32..4e4aca454 100644 --- a/.azure-pipelines/pipelines.yml +++ b/.azure-pipelines/pipelines.yml @@ -44,22 +44,23 @@ stages: parameters: ciTarget: $(CI_TARGET) -- stage: clang_tidy - dependsOn: ["check"] - pool: "x64-large" - jobs: - - job: clang_tidy - displayName: "do_ci.sh" - strategy: - maxParallel: 1 - matrix: - clang_tidy: - CI_TARGET: "clang_tidy" - timeoutInMinutes: 120 - steps: - - template: bazel.yml - parameters: - ciTarget: $(CI_TARGET) +# TODO(#849): Renable target when file issue is resolved. +# - stage: clang_tidy +# dependsOn: ["check"] +# pool: "x64-large" +# jobs: +# - job: clang_tidy +# displayName: "do_ci.sh" +# strategy: +# maxParallel: 1 +# matrix: +# clang_tidy: +# CI_TARGET: "clang_tidy" +# timeoutInMinutes: 120 +# steps: +# - template: bazel.yml +# parameters: +# ciTarget: $(CI_TARGET) - stage: test_gcc dependsOn: ["check"] @@ -118,7 +119,7 @@ stages: - stage: release dependsOn: - - "clang_tidy" + # - "clang_tidy" - "test_gcc" - "sanitizers" - "coverage" diff --git a/ci/run_clang_tidy.sh b/ci/run_clang_tidy.sh index 63dbc3e88..b0ddfad08 100755 --- a/ci/run_clang_tidy.sh +++ b/ci/run_clang_tidy.sh @@ -92,7 +92,6 @@ function filter_excludes() { function run_clang_tidy() { echo "Running clang_tidy with NUM_CPUS: ${NUM_CPUS:-0}." - find ${LLVM_PREFIX} -name *tidy.py python3 "${LLVM_PREFIX}/share/clang/run-clang-tidy.py" \ -clang-tidy-binary="${CLANG_TIDY}" \ -clang-apply-replacements-binary="${CLANG_APPLY_REPLACEMENTS}" \