Skip to content

Commit 00d25dc

Browse files
Fix that 404 on delete crashes the whole pipeline
Signed-off-by: Lehmann_Fabian <fabian.lehmann@informatik.hu-berlin.de>
1 parent 7e55280 commit 00d25dc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

plugins/nf-cws/src/main/nextflow/cws/k8s/CWSK8sClient.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ class CWSK8sClient extends K8sClient {
9494
configCreate0(spec)
9595
}
9696

97+
K8sResponseJson podDelete(String name) {
98+
try {
99+
return super.podDelete( name )
100+
} catch ( Exception e ) {
101+
log.warn "Failed to delete pod '$name' -- cause: ${e.message ?: e}"
102+
if ( 'returned an error code=404' in e.message ) {
103+
return null
104+
}
105+
throw e
106+
}
107+
}
108+
97109
/**
98110
* Get the memory of a pod that has been adapted by the CWS
99111
* @param podName The name of the pod

0 commit comments

Comments
 (0)