-
Notifications
You must be signed in to change notification settings - Fork 0
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 CI Test Failed, Gradle Test Passed Locally #253
Comments
@WeeeHung While waiting for others to chime in, you can try rerunning CI a few more times to see if some pattern emerges or if it is totally random. |
I am part of @WeeeHung's team, and I wanted to update that we have been rerunning CI a few times already, and only the runner on macOS seems to encounter this issue. The error was always caused by a |
Instead of running Also, you can trying rolling back or upgrading the version of fasterxml/jackson databind in dependencies of your build.gradle to see if it works. Currently it's
https://github.com/FasterXML/jackson-databind you can refer to this and try one of the newer versions. Seems like 2.7.0 was quite a while ago Just throwing ideas I too am confused. But my best guess is that the version of fasterxml you have in your project isn't stable for mac specifically somehow |
Thank you for the idea. I have tried rolling back and upgrading to a number of versions. Both did not work. For upgrading specifically, it introduced a new issue, where relative paths are deserialised into absolute paths, causing some assertions to fail. ie. With regards to the pattern,
I just found it strange that sometimes the Java CI check fails on Windows and Ubuntu with the same errors as macos, but this get fixed after rerunning. I guess the only pattern here is rerunning works for Windows and Ubuntu. |
@WeeeHung Another general debugging technique you can use (to locate the problem code) is to create a new PR and incrementally add the changes in this PR to the new PR, to figure out precisely which part of the code is causing this problem. On a related note, it is best if upgrading of dependencies (e.g., JavaFX version, JUnit version) are done in separate PRs so that their effect can be isolated, and they are easier to roll back later (should the need arise). |
Thank you so much prof, we have just figured out the issue and all OS is now passing the CI Check. The problem was with the overloaded JsonAdaptedPerson Constructor that we have created. We overloaded the constructor because we added new fields to Person Constructor but have yet to make corresponding changes in Test folder. As a result of this overloaded constructor, Windows OS occasionally fails and Macos always fails potentially due to how they interact with the JsonCreator and JsonProperty. Before
After
Thank you all for the debugging suggestions. Credits @WZWren |
Prior to pushing new commits to the pull request, I did Gradle Test locally in my Intellij (Windows) using
./gradlew clean test
. It passed all cases and showed the following.Nonetheless, after I push these commits, it failed all Java CI Checks initially (ie. for ubuntu, macos, windows).
I then rerun the Java CI Check twice without pushing new commits as I was sure that the 5 errors shown were fixed, and this time ubuntu and windows managed to pass the CI Test.
However, the Java CI Check for Macos still did not pass and is now showing the same 5 errors as mentioned earlier. The mentioned errors can be found in this GitHub Actions Log.
Group members with different OS (ie. Macos and ubuntu) have tried running gradle test locally and passed all cases as well.
How else should I be debugging this or is it a GIthub Actions/ Java CI issue?
The text was updated successfully, but these errors were encountered: