admin管理员组文章数量:1289635
I have a github action runner that is cut off from reaching other domains than company internal ones due to security reasons.
On the other hand the official bazel central registry is mirrored into our company domain so that dependency resolution and building generally works.
I am now initiating following bazel query within my github workflow:
bazel query 'somepath(//components/..., //applications/...)' --notool_deps --noshow_progress --noimplicit_deps
which leads to not being able to have coverage related source be downloaded:
Download from /bazel_coverage_output_generator/releases/coverage_output_generator-v2.8.zip failed: class java.ConnectException Connection refused
At the same time I have seen that any cc_test rule being present underneath the queried folders leads to bazel trying to download coverage_output_generator sources (even if those do not have any dependencies).
Generally my possible workarounds could be
- Deactivate coverage for the query only
- Provide alternative sources for downloading needed coverage_output_generator sources
There was an bazel issue in former bazel versions that obviously got fixed and looks a bit like the situation described above, but it is unclear what to configure / exactly is needed to have this automatism be deactivated:
Anyone an idea what the reason here could be or how to handle this ?
I have a github action runner that is cut off from reaching other domains than company internal ones due to security reasons.
On the other hand the official bazel central registry is mirrored into our company domain so that dependency resolution and building generally works.
I am now initiating following bazel query within my github workflow:
bazel query 'somepath(//components/..., //applications/...)' --notool_deps --noshow_progress --noimplicit_deps
which leads to not being able to have coverage related source be downloaded:
Download from https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.8.zip failed: class java.ConnectException Connection refused
At the same time I have seen that any cc_test rule being present underneath the queried folders leads to bazel trying to download coverage_output_generator sources (even if those do not have any dependencies).
Generally my possible workarounds could be
- Deactivate coverage for the query only
- Provide alternative sources for downloading needed coverage_output_generator sources
There was an bazel issue in former bazel versions that obviously got fixed and looks a bit like the situation described above, but it is unclear what to configure / exactly is needed to have this automatism be deactivated:
https://github/bazelbuild/bazel/issues/15088
Anyone an idea what the reason here could be or how to handle this ?
Share Improve this question asked Feb 20 at 17:44 efendiefendi 113 bronze badges1 Answer
Reset to default 0Although there might be a better solution, you can do (2) pretty easily. Start by configuring the --experimental_downloader_config flag, for example, I have this in my .bazelrc:
$ grep downloader .bazelrc
# configure downloader to always point to artifactory (instead of maven central)
common --experimental_downloader_config=tools/bazel_downloader.cfg
and then the file itself is like iptable rules:
$ cat tools/bazel_downloader.cfg
<..snipped..>
# Bazel Mirror
rewrite mirror.bazel.build/(.+) artifacts.example/mirror.bazel.build/$1
You can setup a specific mirror for a specific file too by playing with regexes in that file.
See more in Aspect's blog
本文标签: Initiate a bazel query without having coverage being activated for cctest rulesStack Overflow
版权声明:本文标题:Initiate a bazel query without having coverage being activated for cc_test rules - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741416241a2377528.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论