fips: Make build bazel hermetic#39728
Conversation
|
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to |
Signed-off-by: Ryan Northey <ryan@synca.io>
89bfc89 to
11e7abc
Compare
ggreenway
left a comment
There was a problem hiding this comment.
I tried building this locally and got error
ERROR: /build/.cache/bazel/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/boringssl_fips/BUILD.bazel:131:8: configurable attribute "exec_properties" in @@boringssl_fips//:build doesn't match this configuration. Would a default condition help?
Conditions checked:
//bazel:engflow_rbe_x86_64
//bazel:engflow_rbe_aarch64
To see a condition's definition, run: bazel query --output=build <condition label>.
This instance of @@boringssl_fips//:build has configuration identifier 54cb9a0. To inspect its configuration, run: bazel config 54cb9a0.
command: bazel build --config=clang --test_output=errors --@envoy//source/extensions/wasm_runtime/v8:enabled=false --define boringssl=fips //:envoy
|
now i see why it was working for me (sometimes) ... we add the env iff its a libc++ - so that was never gonna work by itself - adding a flag/setting to control this ... |
|
k, i think the conditionality should be fixed i tested this with both libc++ and libstc++ assuming our stdlib flags work correctly - which i think they do in this case - then this should work now for both libc++/libstdc++ whats not tested is the arm build - iirc we do have some downstream arm fips builders so it might be worth adding some ci at some point to check it works as expected - altho thinking about it - if you (@ggreenway) are testing this directly with macos/arm then i guess that is at least getting tested locally |
3b0d02a to
c7a1f67
Compare
Signed-off-by: Ryan Northey <ryan@synca.io>
|
/lgtm deps |
[This PR](#39728) moved the Go dependency in FIPS builds to a Bazel `http_archive`. Once that was done, Bazel's `filegroup` doesn't seem to be dealing so well with non-UTF-8 characters present in a file name in Go's test suite, causing the build to fail. ``` #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: error reading file '@@fips_go_linux_amd64//:test/fixedbugs/issue27836.dir/Þmain.go': /build/top/BUILD/envoy/build/bazel_root/base/external/fips_go_linux_amd64/test/fixedbugs/issue27836.dir/Þmain.go (No such file or directory) #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: 1 input file(s) are in error #23 171.2 Target //distribution/binary:release failed to build ``` It's not fully understood what circumstances cause Bazel to behave like that, but it seems reasonable to remove the `test` directory from the exports. Once a bug is filed to the Bazel project I'll update the PR with the issue number. Signed-off-by: Gustavo <grnmeira@gmail.com>
[This PR](envoyproxy#39728) moved the Go dependency in FIPS builds to a Bazel `http_archive`. Once that was done, Bazel's `filegroup` doesn't seem to be dealing so well with non-UTF-8 characters present in a file name in Go's test suite, causing the build to fail. ``` envoyproxy#23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: error reading file '@@fips_go_linux_amd64//:test/fixedbugs/issue27836.dir/Þmain.go': /build/top/BUILD/envoy/build/bazel_root/base/external/fips_go_linux_amd64/test/fixedbugs/issue27836.dir/Þmain.go (No such file or directory) envoyproxy#23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: 1 input file(s) are in error envoyproxy#23 171.2 Target //distribution/binary:release failed to build ``` It's not fully understood what circumstances cause Bazel to behave like that, but it seems reasonable to remove the `test` directory from the exports. Once a bug is filed to the Bazel project I'll update the PR with the issue number. Signed-off-by: Gustavo <grnmeira@gmail.com>
[This PR](#39728) moved the Go dependency in FIPS builds to a Bazel `http_archive`. Once that was done, Bazel's `filegroup` doesn't seem to be dealing so well with non-UTF-8 characters present in a file name in Go's test suite, causing the build to fail. ``` #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: error reading file '@@fips_go_linux_amd64//:test/fixedbugs/issue27836.dir/Þmain.go': /build/top/BUILD/envoy/build/bazel_root/base/external/fips_go_linux_amd64/test/fixedbugs/issue27836.dir/Þmain.go (No such file or directory) #23 170.8 ERROR: /build/top/BUILD/envoy/build/bazel_root/base/external/boringssl_fips/BUILD.bazel:70:8: Executing genrule @@boringssl_fips//:build failed: 1 input file(s) are in error #23 171.2 Target //distribution/binary:release failed to build ``` It's not fully understood what circumstances cause Bazel to behave like that, but it seems reasonable to remove the `test` directory from the exports. Once a bug is filed to the Bazel project I'll update the PR with the issue number. Signed-off-by: Gustavo <grnmeira@gmail.com>
No description provided.