diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-12-14 19:05:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-12-14 19:05:52 +0000 |
commit | 14dda650f1c876515d88992c106748c549cb906f (patch) | |
tree | 8ddf3522287ff0e24b80b79e212451b2eecc3ed2 /ms | |
parent | 2a99bbe5eb3c983ae629122e2d83a21054d7de82 (diff) | |
parent | 6bd0f3a6edfbd9cdfcaf78c199700e61c505106f (diff) |
Merge "ResourceResolution should fail if required resource did not resolve -edge case"
Diffstat (limited to 'ms')
-rw-r--r-- | ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt index 38c5c99fb..79a00b1f0 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt @@ -150,8 +150,11 @@ open class ResourceResolutionServiceImpl( val failedResolution = resourceAssignmentList.filter { it.status != "success" && it.property?.required == true }.map { it.name } if (failedResolution.isNotEmpty()) { - log.error("Failed to resolve required resources($failedResolution)") - bluePrintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError()) + // The following error message is returned by default to handle a scenario when + // error message comes empty even when resolution has actually failed. + // Example: input-source type resolution seems to fail with no error code. + bluePrintRuntimeService.getBluePrintError().errors.add("Failed to resolve required resources($failedResolution)") + bluePrintRuntimeService.getBluePrintError().errors.addAll(resourceAssignmentRuntimeService.getBluePrintError().errors) } } return ResourceResolutionResult(templateMap, assignmentMap) |