From 9a58236ea4c6dfeaee1fdbf2fb8c3775da4c81f1 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Sun, 17 Dec 2023 09:39:19 -0600 Subject: [PATCH] Fix bug with Fusion symlink resolution (#4593) This commit is a supplement to PR https://github.com/nextflow-io/nextflow/pull/4348 to fix the issue https://github.com/nextflow-io/nextflow/issues/4309 Signed-off-by: Ben Sherman Signed-off-by: Paolo Di Tommaso Co-authored-by: Paolo Di Tommaso --- .../src/main/groovy/nextflow/processor/PublishDir.groovy | 3 ++- tests/checks/fusion-symlink.nf/.checks | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy index 0a503ab920..775fb68f9e 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy @@ -134,7 +134,7 @@ class PublishDir { } protected Map getTaskInputs() { - return task?.getInputFilesMap() + return task ? task.getInputFilesMap() : Map.of() } void setPath( def value ) { @@ -294,6 +294,7 @@ class PublishDir { this.sourceDir = task.targetDir this.sourceFileSystem = sourceDir.fileSystem this.stageInMode = task.config.stageInMode + this.task = task apply0(files) } diff --git a/tests/checks/fusion-symlink.nf/.checks b/tests/checks/fusion-symlink.nf/.checks index a28366d245..5d758c6f21 100644 --- a/tests/checks/fusion-symlink.nf/.checks +++ b/tests/checks/fusion-symlink.nf/.checks @@ -10,6 +10,7 @@ fi # normal run # echo initial run +$NXF_CMD fs rm s3://nextflow-ci/work/ci-test/fusion-symlink/data.txt || true $NXF_RUN -c .config $NXF_CMD fs cp s3://nextflow-ci/work/ci-test/fusion-symlink/data.txt data.txt @@ -19,6 +20,7 @@ cmp data.txt .expected || false # resume run # echo resumed run +$NXF_CMD fs rm s3://nextflow-ci/work/ci-test/fusion-symlink/data.txt || true $NXF_RUN -c .config -resume $NXF_CMD fs cp s3://nextflow-ci/work/ci-test/fusion-symlink/data.txt data.txt