summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2022-06-07 10:05:20 -0400
committerOleg Mitsura <oleg.mitsura@amdocs.com>2022-06-07 10:21:38 -0400
commit83c173ad85ead93ba98cfcd1d1ef7fe2142edaa6 (patch)
treea833fc7e74aa6097a372b71b1a9f2c5a49827c4c /ms
parentc3943fbc70105c4ce38d66c7cbe227ddec35d535 (diff)
CCSDK-3684 ComponentRemotePYthonExecutor eliminate recursive call
Issue-ID: CCSDK-3684 prepareEnv (mistakenly) had a recursive call, but no decement. Simplified it in favour of the inner/outter flag instead of retry counter as in Frankfurt release. Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I5d7f623d6e206a844d33d95a15f85758da3a6681
Diffstat (limited to 'ms')
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
index eaefde7ce..f0ea8c3fb 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
@@ -274,7 +274,7 @@ open class ComponentRemotePythonExecutor(
}
// wrapper for call to prepare_env step on cmd-exec - reupload CBA and call prepare env again if cmd-exec reported CBA uuid mismatch
- private suspend fun prepareEnv(originatorId: String, requestId: String, subRequestId: String, remoteIdentifier: RemoteIdentifier, packages: JsonNode, envPrepTimeout: Int, cbaNameVerUuid: String, archiveType: String?, cbaBinData: ByteString?, isLogResponseEnabled: Boolean, retries: Int = 3) {
+ private suspend fun prepareEnv(originatorId: String, requestId: String, subRequestId: String, remoteIdentifier: RemoteIdentifier, packages: JsonNode, envPrepTimeout: Int, cbaNameVerUuid: String, archiveType: String?, cbaBinData: ByteString?, isLogResponseEnabled: Boolean, innerCall: Boolean = false) {
val prepareEnvInput = PrepareRemoteEnvInput(
originatorId = originatorId,
requestId = requestId,
@@ -298,7 +298,7 @@ open class ComponentRemotePythonExecutor(
log.info("Cmd-exec is missing the CBA $cbaNameVerUuid, it will be reuploaded.")
uploadCba(remoteIdentifier, requestId, subRequestId, originatorId, archiveType, cbaBinData, cbaNameVerUuid, prepareEnvOutput, isLogResponseEnabled, logs)
// call prepare_env again.
- if (retries > 0) {
+ if (!innerCall) {
log.info("Calling prepare environment again")
prepareEnv(originatorId, requestId, subRequestId, remoteIdentifier, packages, envPrepTimeout, cbaNameVerUuid, archiveType, cbaBinData, isLogResponseEnabled)
} else {