fladle
fladle copied to clipboard
Broken testTargetsForShard
Hi, i am trying to distribute a set of tests A on one shard and set of testsB on a separate shard. I assume that't the solution would be to configure something like this:
testTargetsForShard.set(
project.provider {
listOf(
"class com.example.testsA",
"class com.example.testsB"
)
}
)
when i execute ./gradlew printYml i noticed that it's set properly
test-targets-for-shard:
- class com.example.testsA"
- class com.example.testsB"
However, when i execute ./gradlew runFlank
I get the following error:
RunTests
java.nio.file.NoSuchFileException: /Users/username/Documents/ProjectPath/My-Project/app/build/fladle/results/2021-10-28_04-46-04.721060_dpnG/android_shards.json
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
Total run duration: 0m 3s
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
- Preparation: 0m 2s
at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
at java.base/java.nio.file.Files.newByteChannel(Files.java:426)
at java.base/java.nio.file.Files.readAllBytes(Files.java:3272)
at ftl.run.platform.RunAndroidTestsKt.dumpShards(RunAndroidTests.kt:83)
at ftl.run.platform.RunAndroidTestsKt.access$dumpShards(RunAndroidTests.kt:1)
at ftl.run.platform.RunAndroidTestsKt$runAndroidTests$2.invokeSuspend(RunAndroidTests.kt:46)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at ftl.presentation.RunStateKt.runBlockingWithObservingRunState(RunState.kt:17)
at ftl.domain.RunTestAndroidKt.invoke(RunTestAndroid.kt:63)
at ftl.presentation.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:58)
at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at ftl.Main$main$1.invoke(Main.kt:12)
at ftl.Main$main$1.invoke(Main.kt:10)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:28)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:17)
at ftl.Main.main(Main.kt:10)
> Task :app:execFlank FAILED
It seems that it tries to grab android_shards.json file that was never generated. Unless the user have to manually provide it
This seems like a bug in flank. What version of flank are you using?
Hello, I found the same problem. I did try using from flankVersion = "21.01.1" to latest flank version and still not getting it work either.
i have the same issue as well version: v22.05.0. have you find out what is causing it and how to fix ?
@runningcode this issue doesn't happen on flank v22.05.0
I print the yaml config file generated from fladle and noticed one thing off which is
custom-sharding-json: null if I remove this flag and run the config directly through flank I don't have the issue anymore.
This flag seems to be generated from the fladle plugin.