Last active
March 22, 2023 21:58
-
-
Save layus/57fd0aeba78a9a67e8e684379f829e4d to your computer and use it in GitHub Desktop.
MWE script for https://github.com/bazelbuild/bazel/issues/17853
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ bazel --version | |
+ grep ' 6\.' | |
bazel 6.1.0- (@non-git) | |
+ rm -rfI rules_docker | |
rm: remove 1 argument recursively? rm: remove write-protected regular file 'rules_docker/.git/objects/pack/pack-34e03951efa33983b924464a798f092ea34cf8ee.pack'? rm: remove write-protected regular file 'rules_docker/.git/objects/pack/pack-34e03951efa33983b924464a798f092ea34cf8ee.idx'? + git clone https://github.com/bazelbuild/rules_docker | |
Cloning into 'rules_docker'... | |
+ cd rules_docker/testing/examples | |
+ echo 'build --@io_bazel_rules_docker//transitions:enable=no' | |
+ bazel info | |
Starting local Bazel server and connecting to it... | |
bazel-bin: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/execroot/dockerfile_examples/bazel-out/k8-fastbuild/bin | |
bazel-genfiles: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/execroot/dockerfile_examples/bazel-out/k8-fastbuild/bin | |
bazel-testlogs: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/execroot/dockerfile_examples/bazel-out/k8-fastbuild/testlogs | |
character-encoding: file.encoding = ISO-8859-1, defaultCharset = ISO-8859-1 | |
command_log: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/command.log | |
committed-heap-size: 616MB | |
execution_root: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/execroot/dockerfile_examples | |
gc-count: 5 | |
gc-time: 16ms | |
install_base: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/install/45c014013c5af1bac1ecec9c9f2f293f | |
java-home: /nix/store/nj63n10xspj10kljp2gcmsdgzbmh1zbz-openjdk-headless-11.0.18+10/lib/openjdk | |
java-runtime: OpenJDK Runtime Environment (build 11.0.18+0-adhoc..source) by Oracle Corporation | |
java-vm: OpenJDK 64-Bit Server VM (build 11.0.18+0-adhoc..source, mixed mode) by Oracle Corporation | |
max-heap-size: 8206MB | |
output_base: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd | |
output_path: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/execroot/dockerfile_examples/bazel-out | |
package_path: %workspace% | |
release: release 6.1.0- (@non-git) | |
repository_cache: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/cache/repos/v1 | |
server_log: /home/gmaudoux/.cache/bazel/_bazel_gmaudoux/5319b83986a16ef380b315dbc79063cd/java.log.gmaudoux-ul1.gmaudoux.log.java.20230322-225529.533661 | |
server_pid: 533661 | |
used-heap-size: 77MB | |
workspace: /tmp/tmp.fg3mJk6Jlw/rules_docker/testing/examples | |
+ bazel config | |
Loading: | |
Available configurations: | |
35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 k8-fastbuild | |
++ bazel config | |
++ grep k8-fastbuild | |
++ cut -f 1 -d ' ' | |
Loading: | |
+ broken=35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 | |
+ bazel build basic:basic_alpine | |
Loading: | |
Loading: | |
Loading: 0 packages loaded | |
Analyzing: target //basic:basic_alpine (2 packages loaded, 0 targets configured) | |
INFO: Analyzed target //basic:basic_alpine (106 packages loaded, 7316 targets configured). | |
INFO: Found 1 target... | |
[5 / 30] [Prepa] BazelWorkspaceStatusAction stable-status.txt | |
Target //basic:basic_alpine up-to-date: | |
bazel-bin/basic/basic_alpine-layer.tar | |
INFO: Elapsed time: 1.295s, Critical Path: 0.04s | |
INFO: 1 process: 1 internal. | |
INFO: Build completed successfully, 1 total action | |
+ bazel config | |
Loading: | |
Available configurations: | |
35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 k8-fastbuild | |
3c4c3b2bcd8b005ff8da92ce6ecb035770923a070123efaccd89848658c6763c k8-opt (host) | |
5793f9f7c8ef4eb075ae11d9f3554a3033c548ddff334910d7f78c670a9e8bc5 k8-fastbuild-ST-5f994f96b8a3 | |
fa475d3290dbaded7fccd77bd668035af52bd6627d9d31c2c33f43c1e960ce7b k8-opt-exec-2B5CBBC6-ST-5f994f96b8a3 (exec) | |
fbc5f06cd53b78c3585ac415111e6b880252ea576a9194cd446055ae569426b3 k8-fastbuild | |
++ bazel config | |
++ grep 'k8-fastbuild$' | |
++ grep -v 35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 | |
++ cut -f 1 -d ' ' | |
Loading: | |
+ correct=fbc5f06cd53b78c3585ac415111e6b880252ea576a9194cd446055ae569426b3 | |
+ bazel config 35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 fbc5f06cd53b78c3585ac415111e6b880252ea576a9194cd446055ae569426b3 | |
Loading: | |
INFO: Displaying diff between configs 35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 and fbc5f06cd53b78c3585ac415111e6b880252ea576a9194cd446055ae569426b3 | |
Displaying diff between configs 35b359cc93737e29d23dbcb63da937a873960f757b8c95ffff6e4f60270c3a90 and fbc5f06cd53b78c3585ac415111e6b880252ea576a9194cd446055ae569426b3 | |
FragmentOptions user-defined { | |
@io_bazel_rules_docker//transitions:enable: null, false | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -xe | |
bazel --version | grep " 6\." || { echo "This was only tested with bazel 6.0 and 6.2"; false; } | |
rm -rfI rules_docker | |
git clone https://github.com/bazelbuild/rules_docker | |
cd rules_docker/testing/examples | |
echo "build --@io_bazel_rules_docker//transitions:enable=no" >> .bazelrc | |
bazel info | |
bazel config | |
broken=$(bazel config | grep "k8-fastbuild" | cut -f 1 -d " ") | |
bazel build basic:basic_alpine | |
bazel config | |
correct=$(bazel config | grep 'k8-fastbuild$' | grep -v "$broken" | cut -f 1 -d " ") | |
bazel config "$broken" "$correct" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment