Skip to content

Commit

Permalink
Update behavior to only pass bin files as inputs to the TES task
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Feb 2, 2024
1 parent c46fa3a commit dc8997d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class TesFileCopyStrategy implements ScriptFileCopyStrategy {
copy.remove('PATH')
// when a remote bin directory is provide managed it properly
if( remoteBinDir ) {
result << "mkdir \$PWD/nextflow-bin/\n"
result << "cp -r ${remoteBinDir}/* \$PWD/nextflow-bin/\n"
result << "chmod +x \$PWD/nextflow-bin/* || true\n"
result << "export PATH=\$PWD/nextflow-bin:\$PATH\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import static nextflow.processor.TaskStatus.COMPLETED
import static nextflow.processor.TaskStatus.RUNNING

import java.nio.file.Path
import java.nio.file.Files

import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
Expand Down Expand Up @@ -190,6 +191,9 @@ class TesTaskHandler extends TaskHandler {
body.addInputsItem(inItem(scriptFile))
body.addInputsItem(inItem(wrapperFile))

Path remoteBinDir = executor.getRemoteBinDir()
body.addInputsItem(inItem(remoteBinDir, remoteBinDir.toString(), true))

// add task input files
if(inputFile.exists()) body.addInputsItem(inItem(inputFile))

Expand Down Expand Up @@ -234,11 +238,12 @@ class TesTaskHandler extends TaskHandler {
return size != null ? ((double)size.bytes)/1073741824 : null
}

private TesInput inItem( Path realPath, String fileName = null) {
private TesInput inItem( Path realPath, String fileName = null, Boolean isBin = false) {
def result = new TesInput()
result.url = realPath.toUriString()
result.path = fileName ? "$WORK_DIR/$fileName" : "$WORK_DIR/${realPath.getName()}"
log.trace "[TES] Adding INPUT file: $result"
result.path = isBin ? realPath : result.path
return result
}

Expand Down

0 comments on commit dc8997d

Please sign in to comment.