Skip to content

Commit 8fca02a

Browse files
committed
Remove null container from task spec to make cleaner report in Azure Batch
Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
1 parent 21a82aa commit 8fca02a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,18 @@ class AzBatchService implements Closeable {
437437

438438
log.trace "[AZURE BATCH] Submitting task: $taskId, cpus=${task.config.getCpus()}, mem=${task.config.getMemory()?:'-'}, slots: $slots"
439439

440-
return new BatchTaskCreateContent(taskId, cmd)
440+
final batchTask = new BatchTaskCreateContent(taskId, cmd)
441441
.setUserIdentity(userIdentity(pool.opts.privileged, pool.opts.runAs, AutoUserScope.TASK))
442-
.setContainerSettings(containerOpts)
443442
.setResourceFiles(resourceFileUrls(task, sas))
444443
.setOutputFiles(outputFileUrls(task, sas))
445444
.setRequiredSlots(slots)
446445
.setConstraints(constraints)
447-
448446

447+
if (containerOpts) {
448+
batchTask.setContainerSettings(containerOpts)
449+
}
450+
451+
return batchTask
449452
}
450453

451454
AzTaskKey runTask(String poolId, String jobId, TaskRun task) {

0 commit comments

Comments
 (0)