Describe the bug
A clear and concise description of what the bug is.
NPE when running --dump-shards in the flank repo.
To Reproduce
Steps to reproduce the behavior:
cd ./test_runner in the Flank repoflank android run --dump-shardsjava.lang.NullPointerException: File(this).parent must not be null
at ftl.run.DumpShardsKt.createDirectories(DumpShards.kt:74)
at ftl.run.DumpShardsKt.saveShardChunks(DumpShards.kt:67)
at ftl.run.DumpShardsKt.dumpShards(DumpShards.kt:29)
at ftl.run.DumpShardsKt$dumpShards$1.invokeSuspend(DumpShards.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
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:84)
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.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:71)
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$Companion$main$1.invoke(Main.kt:59)
at ftl.Main$Companion$main$1.invoke(Main.kt:51)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:21)
at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:12)
at ftl.Main$Companion.main(Main.kt:54)
at ftl.Main.main(Main.kt)
Expected behavior
A clear and concise description of what you expected to happen.
Expected not to crash.
Details (please complete the following information):
Have you tested on the latest Flank snapshot?
Post the output of
flank --version.
$ flank --version
version: local_snapshot
revision: a007f6c7fbe67f138eb41c9d0dd812b8230acabb
session id: a84d5a7a-6ebf-473d-a308-f5693e141ff3
Additional context
Add any other context about the problem here.
https://github.com/Flank/flank/pull/1557
https://github.com/Flank/flank/pull/1557/files#diff-fe7cc4b5e4bb0f11c6d4fd904bb1288ad61f3586eb258cf0916de6d8a86205a6R74
Within fix for this issue, we should also add IT for dump shards. It should verify created json
Marking as P0 as it's a release blocker.
Most helpful comment
Within fix for this issue, we should also add IT for dump shards. It should verify created json