-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
area/gradleGradleGradlearea/housekeepingIssue type for generalized tasks not related to bugs or enhancementsIssue type for generalized tasks not related to bugs or enhancements
Description
Description
It seems this test has possibly been flaky for a long time (years?), but is most commonly reported by CI via an obscure message:
Failing: devtools/gradle/gradle-application-plugin
📦 devtools/gradle/gradle-application-plugin
❌ Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.6.2:exec (gradle) on project io.quarkus.gradle.plugin: Command execution failed.
It's easier to reproduce locally with:
./gradlew clean :gradle-application-plugin:test --tests CachingTest.dotEnvChangeInvalidatesBuild
(occasionally) outputs:
STEP: remove FROM_DOT_ENV_FILE]
Expecting map:
{":assemble"=UP_TO_DATE, ":build"=UP_TO_DATE, ":check"=UP_TO_DATE, ":classes"=UP_TO_DATE, ":compileJava"=UP_TO_DATE, ":compileQuarkusTestGeneratedSourcesJava"=NO_SOURCE, ":compileTestJava"=NO_SOURCE, ":jar"=UP_TO_DATE, ":processResources"=NO_SOURCE, ":processTestResources"=NO_SOURCE, ":quarkusAppPartsBuild"=FROM_CACHE, ":quarkusBuild"=FROM_CACHE, ":quarkusBuildAppModel"=UP_TO_DATE, ":quarkusDependenciesBuild"=SUCCESS, ":quarkusGenerateAppModel"=UP_TO_DATE, ":quarkusGenerateCode"=FROM_CACHE, ":quarkusGenerateCodeTests"=FROM_CACHE, ":quarkusGenerateTestAppModel"=UP_TO_DATE, ":test"=NO_SOURCE, ":testClasses"=UP_TO_DATE}
to contain entries:
[":quarkusDependenciesBuild"=SUCCESS,
":quarkusBuild"=SUCCESS,
":quarkusGenerateCode"=FROM_CACHE,
":build"=SUCCESS,
":quarkusAppPartsBuild"=FROM_CACHE,
":quarkusGenerateCodeTests"=FROM_CACHE]
but the following map entries had different values:
[":quarkusBuild"=FROM_CACHE (expected: SUCCESS), ":build"=UP_TO_DATE (expected: SUCCESS)]
at CachingTest.assertBuildResult(CachingTest.java:243)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1604)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1604)
Implementation ideas
There are several things a little suspicious within this test, but I want to primarily address the flaky state at this point, which I suspect being caused by timing between the test changing the '.env' file on disk and a new build process being started right after - possibly further confounded by the fact that Gradle uses a virtual filesystem layer to cache state and a filesystem-watching deamon.
I'll give it a shot.
Metadata
Metadata
Assignees
Labels
area/gradleGradleGradlearea/housekeepingIssue type for generalized tasks not related to bugs or enhancementsIssue type for generalized tasks not related to bugs or enhancements