Skip to content

Commit

Permalink
wasm: re-enable envoy wasm coverage build by disabling rust coverage …
Browse files Browse the repository at this point in the history
…build (#36337)

I’ve been explored other solutions to
#24164 (comment)
over the past few days, and here is the final fix, and I think we don't
need rust coverage as whole at current stage.

Commit Message: re-enable envoy wasm coverage build by disabling rust
coverage build
Additional Description:
Risk Level: no
Fix:  #24164
Testing:
Docs Changes:

---------

Signed-off-by: Boteng Yao <[email protected]>
  • Loading branch information
botengyao authored Sep 27, 2024
1 parent 39851cd commit e3ed5a7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 0 additions & 9 deletions bazel/envoy_select.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ def envoy_select_wasm_cpp_tests(xs):
def envoy_select_wasm_rust_tests(xs):
return select({
"@envoy//bazel:wasm_disabled": [],
# TODO(phlax): re-enable once issues with llvm profiler are resolved
# (see https://github.com/envoyproxy/envoy/issues/24164)
"@envoy//bazel:coverage_build": [],
"//conditions:default": xs,
})

Expand All @@ -162,9 +159,6 @@ def envoy_select_wasm_v8(xs):
"@envoy//bazel:wasm_wamr": [],
"@envoy//bazel:wasm_wasmtime": [],
"@envoy//bazel:wasm_disabled": [],
# TODO(phlax): re-enable once issues with llvm profiler are resolved
# (see https://github.com/envoyproxy/envoy/issues/24164)
"@envoy//bazel:coverage_build": [],
"//conditions:default": xs, # implicit default (v8)
})

Expand All @@ -175,9 +169,6 @@ def envoy_select_wasm_v8_bool():
"@envoy//bazel:wasm_wamr": False,
"@envoy//bazel:wasm_wasmtime": False,
"@envoy//bazel:wasm_disabled": False,
# TODO(phlax): re-enable once issues with llvm profiler are resolved
# (see https://github.com/envoyproxy/envoy/issues/24164)
"@envoy//bazel:coverage_build": False,
"//conditions:default": True, # implicit default (v8)
})

Expand Down
12 changes: 12 additions & 0 deletions bazel/rules_rust.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@
# These rules are not supposed to be depended on by other rust targets, and
# as such they shouldn't provide a CrateInfo. However, one may still want to
# write a rust_test for them, so we provide the CrateInfo wrapped in a provider

--- rust/private/rustc.bzl
+++ rust/private/rustc.bzl
@@ -1043,7 +1043,7 @@ def construct_arguments(

if toolchain.llvm_cov and ctx.configuration.coverage_enabled:
# https://doc.rust-lang.org/rustc/instrument-coverage.html
- rustc_flags.add("--codegen=instrument-coverage")
+ pass

if toolchain._experimental_link_std_dylib:
rustc_flags.add("--codegen=prefer-dynamic")
1 change: 0 additions & 1 deletion test/per_file_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ declare -a KNOWN_LOW_COVERAGE=(
"source/extensions/filters/http/grpc_json_transcoder:94.2" # TODO(#28232)
"source/extensions/filters/http/ip_tagging:88.2"
"source/extensions/filters/http/kill_request:91.7" # Death tests don't report LCOV
"source/extensions/filters/http/wasm:1.3" # Disabled due to issue (#24164)
"source/extensions/filters/listener/original_src:92.1"
"source/extensions/filters/network/mongo_proxy:96.1"
"source/extensions/filters/network/sni_cluster:88.9"
Expand Down

0 comments on commit e3ed5a7

Please sign in to comment.