-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix CI on master #136
Comments
Actually the integrationTest task is not too bad. The really slow is test docTest, which is basically InDepthUserGuideSamplesIntegrationTest. Results running on an otherwise lightly loaded laptop ( linux 5.0.0-32-generic ) Core i7 with 8 cores and 16Gb of RAM: integrationTest with docTest took 1h24m17.68s, using at least 6 cores and 12Gb of RAM, and had a pass rate of 87%. All the failures were due to twirl compilation and at first glance due to Java/Scala version incompatibilities. |
I just added a GitHub action to run these tests there instead of Travis. I'm now seeing the test failures. I don't have the cycles to fix these test failures, but if someone else can take a crack at it, if they can get the tests to pass, I'm happy to merge something. |
@JLLeitschuh in your run linked above integTests fail and docTests pass. After several runs I cannot reproduce this. I have integTests passing and docTests failing. The only difference I can see is JDK. What is your target JDK to get this build working? Any JDK 8? |
Is there an OS difference at play here? |
No, what was happening is that although my PATH was set to an 8 JDK, gradle was picking up my JAVA_HOME which was point to an 11 JDK. Gradle only uses PATH for the client VM. D'oh. So with both PATH and JAVA_HOME set to My O/S Mint 19.3 which is based on Ubuntu 18.04. Your GH run uses Ubuntu 18.04.4. And both of our environments are using specific JDKs installed in a folder, not the apt package. So I can't see that the O/S is causing this difference. The only other difference is that I performed the above successful run with...
UPDATE: your action would have been run on one of these nodes ie only 2 cores and less than half the RAM, of my environment. So it is feasible that without limits on forks, some kind of resource contention caused the test failures. Even on my environment, with above limits on forks, I still observed over 50 simultaneous JVM processes spawned by the build, at certain points. I will build a vbox environment with the same specs and try to reproduce the failures. Now with JAVA_HOME set to an 11 JDK, javadoc and docTest fail. So is it possible that the Github action you are using, is somehow allowing another JDK to float around in the environment. Reading https://github.com/marketplace/actions/setup-java-jdk, that seems unliklely. If we can get to the bottom of this, the related difficulty will be, how to make the whole project build with only a single JDK, if you want to support new Play versions.
According to https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html, all of the above Scala versions are compatible with JDK 8, if a recent patch release of the Scala SDK is used. Although in somewhat vague language it recommends JDK 11+. Problem is, if someone wants to use JDK 11 instead of 8 on their project - they will run in to the same compatibility glitches I encountered. |
…be investigated. See gradle#136
…be investigated. See gradle#136 Signed-off-by: marracuene <[email protected]>
So... I build a VM with same setup as the GH Actions Runner node: |
Update: was able to reproduce the failures in a forked repo, and download the reports as artifacts. There seem to be 2 different failure causes. Cause #1 is:
As I can't reproduce it locally seems possible that some kind of race condition is causing it... possible multiple threads, and/or the build cache. Will look at this first. Slow to test as cannot reproduce locally. |
…be investigated. See gradle#136
I'd be curious to see the content of the Nice work so far, I appreciate it. |
Thanks. These two source files actually exist in the source tree - see PureJava and MixedJava. They do each have an |
…re build folder as artifact. See: gradle#136 Signed-off-by: marracuene <[email protected]>
So @JLLeitschuh , @PaulFridrick , @bmuschko - tagging you as committers of the relevant artefacts. . In pursuit of the build failures discussed above, I created a new repo (https://github.com/marracuene/advancedplayapp) which treats one of the failing test fixtures as a standalone project. I had to manually include the maven/ivy repositories in build.gradle (whereas in the original test they are added programatically). This runs locally. I then set it to build using a github action and it runs - see https://github.com/marracuene/advancedplayapp/actions/runs/146441715. Build output shows that PureJava.class and MixedJava.class are compiled and then found by the Twirl compilation process. Therefore the failure which is affecting the overall plugin integrationTest, is not reproduced here. Questions:
|
@bmuschko is no longer a full time member of the Gradle team so I wouldn't expect him to respond unfortunately. Given how few people use this plugin, and how under maintained it is, I'd be fine supporting only the 6.x releases. |
Understood. May I ask the same question about Play versions? Currently the plugin is already "supporting" 2.3-2.6, and the aim of fixing this build is allow it to at least add 2.7 to support. But if as you say the user community is fairly small, perhaps we could drop 2.3 support? The way the tests are currently structured, each additional Play version causes another cycle of tests to be run, contributing to the already significant execution time. Narrowing this down as well would let me trim down the test suite and also reduce the scope of possible sources to check for the mysterious build error. |
@marracuene after some internal consulting, we're fine with dropping |
PR 143 for the test coverage bit submitted. After removing 2.3., now only certain 2.7.3. tests fail, all with the same error as below:
I have tracked through all the commits since the builds started failing but cannot see any obvious reason for this. Still unable to reproduce the failure locally. |
Have finally managed to reproduce the failure locally. For Play 2.7.3 the build is indeed not compiling the reference files to .class - whereas for 2.6.25 it is.
I am going to try and find the cause locally myself now... but it seems like most 2.7-related commits were made by @big-guy so if he has 10 minutes to point me in the right direction that would be appreciated. |
Update: there is nothing wrong with the test fixtures AFAICS, per the below test:
Now trying to get the Unit Tests to print all their GradleRunner info to the console so that I can work out what is missing. |
@marracuene does this indicate a corrupted dependency causing the issue potentially? |
Special thanks to @cstroe for his hard work fixing this issue so we could trust CI again on master. Much appreciated! |
Currently, we can't maintain a 'light touch' maintenance presence on this project because the CI we use to validate changes is broken. The integration tests take too long to run so Travis CI times-out. We should either parallelize our tests or move to a CI provider that is more forgiving to long run-times.
The text was updated successfully, but these errors were encountered: