bazel-remote icon indicating copy to clipboard operation
bazel-remote copied to clipboard

Bazel 5.2.0 not support

Open Smile-Autra opened this issue 3 years ago • 4 comments

When upgrade to the latest version of bazel. Bazel remote seems not to work. Bazel can only put but can not get. When use bazel 5.1.1 bazel remote works again. More strange, bazel 5.2.0 can use the cache of 5.1.1. It seems that the artifact put by bazel 5.2 has problem.

Smile-Autra avatar Jun 15 '22 04:06 Smile-Autra

Hi, I am unable to reproduce this with the bazel-remote build and bazel 5.2.0 - I'm able to populate the cache, then bazel clean and building again gives cache hits. Could you share your bazel-remote config and the bazel flags that you're using?

mostynb avatar Jun 15 '22 20:06 mostynb

Thanks for reply. We use the following script to run a container:

docker run -d -u 1000:1000 --name bazel_cache --restart=unless-stopped -v /work/bazel_cache:/data 
	-p 9090:8080 -p 9092:9092 buchgr/bazel-remote-cache --max_size=300 --storage_mode=uncompressed

bazelrc config:

build --repository_cache=/xx/repository_cache
# Enable bazel remote cache
build --remote_cache=http://host.docker.internal:9090
build --spawn_strategy=standalone
build --cxxopt="-std=c++17"
build --host_cxxopt="-std=c++17"

Smile-Autra avatar Jun 16 '22 03:06 Smile-Autra

Are you able to reproduce this issue when building //:bazel-remote in this repository?

https://bazel.build/docs/remote-caching-debug suggests checking for warnings in the build logs, possibly with --verbose_failures to get more info.

And https://bazel.build/docs/remote-execution-caching-debug#caching-across-machines suggests using --execution_log_binary_file=/tmp/exec1.log though --execution_log_json_file=/tmp/exec1.json might be easier to examine. Could you try building a small target that you expect cache hits for with bazel 5.1.1 and 5.2.0 and compare the .json files to see if there are any obvious problems?

mostynb avatar Jun 16 '22 20:06 mostynb

OK, I will do later

Smile-Autra avatar Jun 17 '22 07:06 Smile-Autra

Closing for now due to lack of feedback.

mostynb avatar Sep 01 '22 16:09 mostynb