Skip to content
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

Caching hides build failure on main #3943

Closed
mpkorstanje opened this issue Sep 1, 2024 · 1 comment
Closed

Caching hides build failure on main #3943

mpkorstanje opened this issue Sep 1, 2024 · 1 comment

Comments

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Sep 1, 2024

Steps to reproduce

For #3718 the https://github.com/junit-team/junit5/actions/runs/10656241470/job/29534673831 and for #3941 the https://github.com/junit-team/junit5/actions/runs/10646871397/job/29514199625 fail with:

> Task :platform-tooling-support-tests:test

JavaVersionsTests > java_default() FAILED
    org.opentest4j.AssertionFailedError: expected: <> but was: <WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/home/runner/work/junit5/junit5/platform-tooling-support-tests/build/maven-distribution/apache-maven-3.9.8/lib/jansi-2.4.1.jar)
    WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
    WARNING: Restricted methods will be blocked in a future release unless native access is enabled
    >
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
        at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)
        at app//platform.tooling.support.tests.JavaVersionsTests.execute(JavaVersionsTests.java:63)
        at app//platform.tooling.support.tests.JavaVersionsTests.java_default(JavaVersionsTests.java:46)

Yet on main 5f9eeb7 with https://github.com/junit-team/junit5/actions/runs/10653412771/job/29528480579 this passes:

 > Task :platform-tooling-support-tests:test FROM-CACHE

Presumably, because the build result was pulled from cache. But I don't think the failure is related to the changes in #3718 or #3941 so the caching would seem inappropriate here.

@mpkorstanje mpkorstanje changed the title Caching hides build failure Caching hides build failure on main Sep 1, 2024
@marcphilipp
Copy link
Member

Thanks for raising this! I've also noticed this and tracked down the root cause to differences between different builds of OpenJDK 24-ea. In 8665d6d, I've addressed this by tracking the exact Java runtime version as part of the cache key unless the default JDK (21 as of now) is used.

@marcphilipp marcphilipp closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants