#870 Added --directories-to-pull validation and avoid making request with empty toolStepResult#876
Conversation
…with empty toolStepResult
|
I noticed some differnces on master and your branche. We have multiple-success yml
FIXED |
| withStackTraces: Boolean = false | ||
| ) = JUnitTestResult( | ||
| testsuites = this | ||
| .filterNullToolResultsStep() |
There was a problem hiding this comment.
- I wonder why FTL is returning
nullfortoolResultsStep? - Can we reproduce this error?
- Its safe to skip some tests execution and get correct results?
- Maybe flank should display proper warning about some unexpected behaviour?
There was a problem hiding this comment.
- I wonder why FTL is returning
nullfortoolResultsStep?- Can we reproduce this error?
- Its safe to skip some tests execution and get correct results?
- Maybe flank should display proper warning about some unexpected behaviour?
AD 1. If matrix is invalid FTL returns null as toolResultsStep
AD 2. This is more to avoid crashing flank in the future, so far, for now, I do not know how to reproduce this issue
AD 3. This is safe because tests results are based on a request made with toolResultsStep which will not succeed without toolResultsStep
AD 4. Ideally, we should not trigger INVALID matrix request, but for now, we do not know which settings will cause matrix invalid (see point 2)
| private fun SavedMatrix.logError() { | ||
| println("More details are available at [${this.webLink}]") | ||
| println(this.asPrintableTable()) | ||
| println("Matrix is $state") |
There was a problem hiding this comment.
There will be no table output if flank throw FTLError before MatrixResultsReport?
There was a problem hiding this comment.
FTLError is thrown after printing table
listOf(
CostReport,
MatrixResultsReport
).map {
it.run(matrices, testSuite, printToStdout = true, args = args) >>>>>>>>>>>>> PRINTING TABLE
}
if (!matrices.allSuccessful()) {
listOf(
HtmlErrorReport
).map { it.run(matrices, testSuite, printToStdout = false, args = args) }
}
JUnitReport.run(matrices, testSuite?.apply {
if (ignoredTestCases.isNotEmpty()) {
testsuites?.add(ignoredTestCases.toJunitTestsResults())
}
}, printToStdout = false, args = args)
when {
args.fullJUnitResult -> processFullJunitResult(args, matrices, testShardChunks)
args.useLegacyJUnitResult -> processJunitXml(testSuite, args, testShardChunks)
}
matrices.validateMatrices(args.ignoreFailedTests) >>>>>>>>>>> FTLError
Fixes #870
Test Plan
NPE with missing
toolStepResultwas caused because we try to get results for an invalid matrix. Matrix was invalid because FTL rejects the request with invalid--directories-to-pullvalue.To avoid this issue correct validation of this parameter was introduced, as well as filtering getting results for empty
toolStepResult.Gcloud policies were applied to
--directories-to-pull:/sdcardor/data/local/tmpa-zA-Z0-9_-./+In order to test this issue, please use
--directories-to-pullvalue which does not meet this 2 criteria.Checklist