-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --{no,}autodetect_server_javabase. #12542
Add --{no,}autodetect_server_javabase. #12542
Conversation
We want bazel to fail to start instead of falling back to a host JRE/JDK. We are using a hermetic JDK and the embedded JRE, so there should be no need to use anything from the host. We've debugged enough cases so far where the host installed JDK was buggy and causing random crashes on specific machines. Fixes: bazelbuild#12451
It should be pretty easy to make the test pass, but can you confirm the approach looks sane? |
Yes, it's ok. Mind also adding a test for it? This will ensure that somebody else won't break the feature later. There are integration tests in //src/test/shell/integration. statup_options or java_integration_test should get you started, but there is no integration test on //src:bazel_nojdk, so you'll need to set it up. |
Sure, done. That was surprisingly easy. Tested both normal and nojdk bazel with --autodetect_server_javabase and --noautodetect_server_javabase. |
FATAL: The install_base directory '/var/lib/buildkite-agent/bazeltest/install_base' contains a different Bazel version (found aa41a738151267f7716fdef640010dd7 but this binary is 8dc389309eace6214919196718842380). Remove it or specify a different --install_base.
Nice implementation, thanks for your effort! Sorry for the delay. |
This is the upstream rc6 branch with two cherry-picks: Fix a couple of bugs with Incompatible Target Skipping bazelbuild/bazel#12560 Add --{no,}autodetect_server_javabase bazelbuild/bazel#12542 This patch also uses the new --noautodetect_server_javabase flag. Change-Id: I7a397e4a9f17b942d0f81c7affb829d2de385a30
We want bazel to fail to start instead of falling back to a host JRE/JDK. We are using a hermetic JDK and the embedded JRE, so there should be no need to use anything from the host. We've debugged enough cases so far where the host installed JDK was buggy and causing random crashes on specific machines. Fixes: #12451 Closes #12542. PiperOrigin-RevId: 347411720
We want bazel to fail to start instead of falling back to a host JRE/JDK. We are using a hermetic JDK and the embedded JRE, so there should be no need to use anything from the host. We've debugged enough cases so far where the host installed JDK was buggy and causing random crashes on specific machines. Fixes: bazelbuild#12451 Closes bazelbuild#12542. PiperOrigin-RevId: 347411720
We want bazel to fail to start instead of falling back to a host
JRE/JDK. We are using a hermetic JDK and the embedded JRE, so there
should be no need to use anything from the host. We've debugged enough
cases so far where the host installed JDK was buggy and causing random
crashes on specific machines.
Fixes: #12451