Constellation is the first Confidential Kubernetes. Constellation shields entire Kubernetes clusters from the (cloud) infrastructure using confidential computing.
GNU Affero General Public License v3.0
903
stars
47
forks
source link
bazel: use go_bin_for_host for all CI scripts #3147
Since we introduced bzlmod, using @io_bazel_rules_go//go as Go binary for CI scripts does not work anymore. Example:
$ bazel run //bazel/ci:govulncheck
Starting local Bazel server and connecting to it...
INFO: Analyzed target //bazel/ci:govulncheck (146 packages loaded, 12854 targets configured).
INFO: Found 1 target...
Target //bazel/ci:govulncheck up-to-date:
bazel-bin/bazel/ci/govulncheck-script.bash
bazel-bin/bazel/ci/govulncheck
INFO: Elapsed time: 4.579s, Critical Path: 0.44s
INFO: 6 processes: 6 internal.
INFO: Build completed successfully, 6 total actions
INFO: Running command line: bazel-bin/bazel/ci/govulncheck
2024/06/05 14:13:47 runfiles: no runfiles found
ERROR: /home/burger/.cache/bazel/_bazel_burger/71bc3bb25a3aa4f6aac591d8b4f36d9e/execroot/_main/bazel-out/k8-opt/bin/bazel/ci/govulncheck: 'submodules=$(${go} list -f '{{.Dir}}' -m)' failed at line 23
ERROR: /home/burger/.cache/bazel/_bazel_burger/71bc3bb25a3aa4f6aac591d8b4f36d9e/execroot/_main/bazel-out/k8-opt/bin/bazel/ci/govulncheck: exit status 1
The //bazel/ci:check target still works because the gocoverage_diff target uses go_bin_for_host, and that seems to provide the right runfiles for the other invocations, too.
Proposed change(s)
Switch the go binary to go_bin_for_host for all scripts.
Context
Since we introduced bzlmod, using
@io_bazel_rules_go//go
as Go binary for CI scripts does not work anymore. Example:The
//bazel/ci:check
target still works because thegocoverage_diff
target usesgo_bin_for_host
, and that seems to provide the right runfiles for the other invocations, too.Proposed change(s)
go_bin_for_host
for all scripts.Checklist