Skip to content

Commit b48e886

Browse files
committed
feat(nf-google): fixes for failing tests
Signed-off-by: Tomiles <116039+tomiles@users.noreply.github.com>
1 parent 03e2f1a commit b48e886

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

plugins/nf-google/src/main/nextflow/cloud/google/batch/GoogleBatchScriptLauncher.groovy

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ class GoogleBatchScriptLauncher extends BashWrapperBuilder implements GoogleBatc
5858
protected GoogleBatchScriptLauncher() {}
5959

6060
GoogleBatchScriptLauncher(TaskBean bean, Path remoteBinDir, BatchConfig batchConfig) {
61-
// Unstaging is cross-device on Google Batch (gcsfuse-mounted work dir).
62-
// `move` can fail with overlapping outputs or symlinked paths.
63-
if( bean.stageOutMode == null )
64-
bean.stageOutMode = 'copy'
65-
super(bean, copyStrategyFor(bean, batchConfig))
61+
super(defaultStageOutMode(bean), copyStrategyFor(bean, batchConfig))
6662
// keep track the google storage work dir
6763
this.remoteWorkDir = (CloudStoragePath) bean.workDir
6864
this.remoteBinDir = toContainerMount(remoteBinDir)
@@ -114,6 +110,14 @@ class GoogleBatchScriptLauncher extends BashWrapperBuilder implements GoogleBatc
114110
: new SimpleFileCopyStrategy(bean)
115111
}
116112

113+
private static TaskBean defaultStageOutMode(TaskBean bean) {
114+
// Unstaging is cross-device on Google Batch (gcsfuse-mounted work dir).
115+
// `move` can fail with overlapping outputs or symlinked paths.
116+
if( bean.stageOutMode == null )
117+
bean.stageOutMode = 'copy'
118+
return bean
119+
}
120+
117121
protected String headerScript(TaskBean bean) {
118122
def result = "NXF_CHDIR=${Escape.path(bean.workDir)}\n"
119123
if( remoteBinDir ) {

plugins/nf-google/src/main/nextflow/cloud/google/batch/client/BatchConfig.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class BatchConfig implements ConfigScope {
258258
}
259259

260260
static boolean isCliCopyTransport(String transport) {
261-
return transport in CLI_COPY_TRANSPORTS
261+
return transport != null && transport in CLI_COPY_TRANSPORTS
262262
}
263263

264264
BatchRetryConfig getRetryConfig() { retry }

0 commit comments

Comments
 (0)