gradle-profiler icon indicating copy to clipboard operation
gradle-profiler copied to clipboard

Add option to ignore build failures

Open vRallev opened this issue 5 years ago • 1 comments

We're using the Gradle Profiler for benchmarks. Unfortunately, some tools like Kotlin and KAPT are flaky and sometimes cause build failures, e.g.

Caused by: java.lang.NullPointerException
	at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1155)
	at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1188)
	at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1179)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:63)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion$INSTANCES$2.invoke(MetadataExtensions.kt:61)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at kotlinx.metadata.impl.extensions.MetadataExtensions$Companion.getINSTANCES(MetadataExtensions.kt)

The Gradle Profiler stops this scenario and moves on with the next one. I think this happens here: https://github.com/gradle/gradle-profiler/blob/29796bde64b215984c5620568efc62c513886705/src/main/java/org/gradle/profiler/GradleScenarioInvoker.java#L158

It would be great to tell the profiler to either repeat this build or to ignore this one single result and continue with the next build, but don't stop the entire scenario. Right now single scenarios need to be manually repeated and that's very time consuming.

vRallev avatar May 02 '20 23:05 vRallev

This is definitely something that would be nice to add, especially because of KAPT issues. It is very frustrating to see scenarios fail in the last iteration and lose data. :("

rcgonzalezf avatar Aug 16 '23 15:08 rcgonzalezf