buchgr / bazel-remote

A remote cache for Bazel
https://bazel.build
Apache License 2.0
595 stars 154 forks source link

Bump rules_go and gazelle #607

Closed bu3 closed 1 year ago

bu3 commented 1 year ago

I tried to bump rules_go and gazelle to the most recent versions but I could not build it because of a toolchain issue. I think it's because of my Mac M1.

This is the error I see but it might be working on your machine or CI:

➜  bazel-remote git:(bump-tooling) docker/push_to_dockerhub
INFO: Build option --incompatible_enable_cc_toolchain_resolution has changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel_fmangione/5371a928ee6ff673886a72c10660bfcb/external/io_bazel_rules_go/BUILD.bazel:86:17: While resolving toolchains for target @io_bazel_rules_go//:cgo_context_data: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
ERROR: Analysis of target '//:push_to_dockerhub_amd64' failed; build aborted:
INFO: Elapsed time: 0.975s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 9781 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 9781 targets configured)
    Fetching @com_github_google_go_containerregistry; Restarting.
    Fetching @com_github_pkg_errors; Restarting.
    Fetching @bazel_gazelle_go_repository_config; Restarting.
    Fetching @local_config_cc; Building xcode-locator
    Fetching @bazel_gazelle_go_repository_tools; fetching
    Fetching @com_github_slok_go_http_metrics; Restarting.
    Fetching @com_github_grpc_ecosystem_go_grpc_prometheus; Restarting.
    Fetching @com_github_prometheus_client_golang; Restarting. ... (12 fetches)

It seems to be fine on the PR CI build

mostynb commented 1 year ago

Thanks- I don't think this will change the distroless base image, but the upgrade itself is fine. Rebased (because rules_docker was already upgraded) and landed on the tip of master.

It's not possible to build the docker images on mac, unfortunately (that requires a linux machine).