-
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
Java_tools tests don't pass on windows #12244
Comments
Would it be an option to temporarily disable this test on Windows to not delay releasing new Let's face it: we do not really care about Windows OS, don't we? |
How can I reproduce this? Where is java-tools-binaries-java coming from? |
Sorry I don't have a short reproduction. The toolchain is effectively executing
@philwo Do you have any easy way to manually test on windows? |
That gets me started, thanks. |
Managed to follow the test file and run the same commands as for the On the windows testing VM, this passes, and is able to build singlejar and ijar and build the requested deploy jar. I'm not sure what's different between the playground with my environment, and the actual test VM. |
I see: my version is using |
Although note that I checked with cquery, not query, so it's correctly using configured target semantics:
|
Also, I can't run the
|
I think the perl error is from trying to write out the test XML and failing (see https://cs.opensource.google/bazel/bazel/+/master:src/test/shell/unittest.bash;drc=784385700a425632348e5bcad1b1555b35569da6;l=587). |
This is the standard Windows GCE VM image, and it does not appear to have perl but I don't actually know where it would be. |
PS Did you notice there is one suspicious backslash in the original output |
That is definitely worrying but if I can't reproduce the error I have no way to figure out where it's coming from. |
@meteorcloudy has rebuilt the testing VM, I'm trying again |
I can now run the test and see the failure. I can't reproduce it outside of a test, which points to some kind of environment mismatch. I'll keep looking. |
Error I see is similar but not identical:
|
Okay, lots of debugging later, I think I've found the problem: At d5d65ec (one commit before e906f89), the test passes, and the full path to mapped_file_windows.inc is At e906f89, the test fails, and the full path is So the switch to using exec transitions is increasing the path (changing One obvious solution is to not have the TEST_TMPDIR be under I'm going to reassign this to @meteorcloudy to determine the right way to fix Bazel. This isn't actually a problem with e906f89. it just happens to be exposed there. |
Thanks for figuring this out! |
https://github.com/bazelbuild/continuous-integration/blob/master/pipelines/java_tools-binaries.yml I'll try to fix this problem by writing a normal yml file for this pipeline. |
It makes sense to include the test in the pipelines for master as well.
On Thu 15. Oct 2020 at 17:56, Yun Peng ***@***.***> wrote:
https://github.com/bazelbuild/continuous-integration/blob/master/pipelines/java_tools-binaries.yml
I'm surprised the java_tools binaries pipeline isn't use our normal
pipeline setup, which means it doesn't get some workarounds for long path
issues we implemented in bazelci.py. FYI @philwo
<https://github.com/philwo>
I'll try to fix this problem by writing a normal yml file for this
pipeline.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12244 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWREDFQ5MPIWITYVZUFDLSK4LT3ANCNFSM4SKL56MQ>
.
--
Ivo List | Software Engineer | [email protected] |
|
I looked into the pipeline setup for https://buildkite.com/bazel-trusted/java-tools-binaries-java
This setup is indeed very complicated and cannot be translated to a normal yaml config file easily because the later steps depends on the output of the first one. |
No we don’t. We need them only for releases. The pipeline is run manually.
On Fri 16. Oct 2020 at 16:24, Yun Peng ***@***.***> wrote:
I looked into the pipeline setup for
https://buildkite.com/bazel-trusted/java-tools-binaries-java
It basically runs the upload_all_java_tools.sh
<https://github.com/bazelbuild/bazel/blob/master/src/upload_all_java_tools.sh>
which does three things:
- Build the java_tools
- Run
//src/test/shell/bazel:bazel_java_test_local_java_tools_jdk${java_version}
with the java tools built in the previous step
- Upload the java_tools to gs://bazel-mirror/bazel_java_tools
This setup is indeed very complicated and cannot be translated to a normal
yaml config file easily because the later steps depends on the output of
the first one.
My first question is: do we really need to upload the java tools to
bazel-mirror for every commit?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12244 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWREHX2R66FVQMXT7JSE3SLBJTPANCNFSM4SKL56MQ>
.
--
Ivo List | Software Engineer | [email protected] |
|
Great, then I can see how could I make the test work without the previous build step. |
Hey @meteorcloudy, any progress update on this? Would it make sense that I remove test from |
Yes, that sounds good. I may need more time to figure out how to run the test properly. |
I wonder do we actually need to enable the
|
I don't actually get the purpose of this Did we have this because we plan to move the java tools to a separate repo? Do we still plan to execute the plan? If not, maybe we can just remove this pipeline? |
Perhaps https://github.com/bazelbuild/java_tools/blob/master/docs/release.md helps to explain. I don't know about old plans. @philwo has recently posed me the same questions. |
I see, in
So we do need this pipeline to upload artifacts for java tools, but I believe the test is covered by other bazel_java_tests in the master pipepline. #12300 seems to be the right fix for this issue, we don't need to rewrite the yaml config file. |
What's the state of this - now that the test is disabled, can we close this? |
I think so. |
Description of the problem:
Java_tools tests don't pass on Windows. The tests pass on Linux and MacOS.
First failing commit is e906f89 Update java_toolchain to properly declare config transitions.
Failing build: https://buildkite.com/bazel-trusted/java-tools-binaries-java/builds/146#3727aefe-9cca-4ffc-8aad-bd77a8841428
The test that fails is bazel_java_test.sh:1493 test_build_hello_world_with_remote_embedded_tool_targets
It is a simple java_library, java_binary built with line:
bazel build //java/main:main_deploy.jar --define EXECUTOR=remote
The define selects to compile
singlejar
(instead of a precompiled version).Dependency chain:
Emitted error:
src/tools/singlejar/transient_bytes.h
is defined incc_library
hdrs
and works on other OSes. It usesstrip_include_prefix
. Possibly problem with directory separator?The text was updated successfully, but these errors were encountered: