bazel-contrib / bazel-lib

Common useful functions for writing BUILD files and Starlark macros/rules
Apache License 2.0
141 stars 91 forks source link

chore: bump to Bazel 7.3.1 #914

Closed gregmagolan closed 3 months ago

aspect-workflows[bot] commented 3 months ago

Test

4 test targets passed

Targets
//lib/tests/copy_to_directory:case_22_test [k8-fastbuild]    233ms
//lib/tests/copy_to_directory_bin_action:test [k8-fastbuild] 208ms
//lib/tests/jq:check_stamped [k8-fastbuild]                  363ms
//lib/tests/yq:check_stamped [k8-fastbuild]                  360ms

Total test execution time was 1s. 217 tests (98.2%) were fully cached saving 31s.


Test

e2e/copy_action

All tests were cache hits

1 test (100.0%) was fully cached saving 59ms.


Test

e2e/copy_to_directory

All tests were cache hits

6 tests (100.0%) were fully cached saving 750ms.


Test

e2e/coreutils

All tests were cache hits

4 tests (100.0%) were fully cached saving 742ms.


Test

e2e/external_copy_to_directory

All tests were cache hits

1 test (100.0%) was fully cached saving 59ms.


Test

e2e/smoke

All tests were cache hits

6 tests (100.0%) were fully cached saving 1s.


Buildifier      Format      Gazelle

gregmagolan commented 3 months ago

Getting strange failures on GitHub Actions ephemeral runners compiling tools/cpp/runfiles/runfiles.cc on attempted bumps to 7.2.1 and 7.3.1:

(04:00:05) ERROR: /home/runner/work/bazel-lib/bazel-lib/e2e/copy_action/~/.cache/xdg-cache/bazel/_bazel_runner/62e983f9dcfd129cff412924cb4ab3e8/external/bazel_tools/tools/cpp/runfiles/BUILD:3:11: Compiling ~/.cache/xdg-cache/bazel/_bazel_runner/62e983f9dcfd129cff412924cb4ab3e8/external/bazel_tools/tools/cpp/runfiles/runfiles.cc failed: (Exit 1): gcc failed: error executing CppCompile command (from target //~/.cache/xdg-cache/bazel/_bazel_runner/62e983f9dcfd129cff412924cb4ab3e8/external/bazel_tools/tools/cpp/runfiles:runfiles) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF ... (remaining 16 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
~/.cache/xdg-cache/bazel/_bazel_runner/62e983f9dcfd129cff412924cb4ab3e8/external/bazel_tools/tools/cpp/runfiles/runfiles.cc:17:10: fatal error: tools/cpp/runfiles/runfiles.h: No such file or directory
   17 | #include "tools/cpp/runfiles/runfiles.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Attempted bump to 7.2.0 had different strange failure:

(04:08:45) ERROR: /home/runner/work/bazel-lib/bazel-lib/e2e/copy_action/~/.cache/xdg-cache/bazel/_bazel_runner/install/78ccbcf59b0fe2de7bbdccc470af78df/rules_java/java/BUILD:29:12: no such package 'java/common': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
 - /home/runner/work/bazel-lib/bazel-lib/e2e/copy_action/java/common and referenced by '//~/.cache/xdg-cache/bazel/_bazel_runner/install/78ccbcf59b0fe2de7bbdccc470af78df/rules_java/java:core_rules'
(04:08:44) ERROR: /home/runner/work/bazel-lib/bazel-lib/e2e/copy_action/~/.cache/xdg-cache/bazel/_bazel_runner/install/78ccbcf59b0fe2de7bbdccc470af78df/embedded_tools/tools/BUILD:75:10: no such package 'tools/sh': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
 - /home/runner/work/bazel-lib/bazel-lib/e2e/copy_action/tools/sh and referenced by '//~/.cache/xdg-cache/bazel/_bazel_runner/install/78ccbcf59b0fe2de7bbdccc470af78df/embedded_tools/tools:bzl_srcs'
gregmagolan commented 3 months ago

Getting strange failures on GitHub Actions ephemeral runners compiling tools/cpp/runfiles/runfiles.cc on attempted bumps to 7.2.1 and 7.3.1

Resolved by not setting XDG_CACHE_HOME env.

Setting XDG_CACHE_HOME breaks the build as of Bazel 7.2.0 due to

Bazel on Linux and BSD now respects the XDG_CACHE_HOME environment variable instead of assuming that ~/.cache/bazel is writable. (#21817)

https://github.com/bazelbuild/bazel/releases/tag/7.2.0

See https://bazelbuild.slack.com/archives/CA31HN1T3/p1718650523156059 for more details.