From eef1629666dca296594789ba278911d1701ebab3 Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 10 Dec 2024 18:37:42 +0100 Subject: [PATCH] fixed logic Signed-off-by: munishchouhan --- .../io/seqera/wave/service/logs/BuildLogServiceImpl.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy b/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy index aa265cd43..430fe587c 100644 --- a/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy +++ b/src/main/groovy/io/seqera/wave/service/logs/BuildLogServiceImpl.groovy @@ -165,8 +165,11 @@ class BuildLogServiceImpl implements BuildLogService { log.info "Container Image is already cached, uploading previously successful build's condalock file for buildId: $buildId" def builds = persistenceService.allBuilds(buildId.split('-')[1].split('_')[0]) for (def build : builds) { - if ( build.succeeded() && !condaLock.contains('cat environment.lock') ){ - condaLock = fetchCondaLockString(build.buildId) + if ( build.succeeded() ){ + def curCondaLock = fetchCondaLockString(build.buildId) + if( curCondaLock && !curCondaLock.contains('cat environment.lock') ){ + condaLock = curCondaLock + } } } }