Skip to content

Commit 24bd0a0

Browse files
committed
feat: Implement task-level Fusion override via disk directive
Enable per-task control of Fusion filesystem by checking the disk.fusion setting before falling back to executor-level configuration. Changes: - Modify fusionEnabled() in FusionAwareTask to check task's disk.fusion setting first - Fall back to executor.isFusionEnabled() if disk.fusion is not specified - Task-level setting takes priority over global fusion.enabled config - Add null-safe navigation for config to handle cases where task config may not be set (e.g., in test mocks) Priority order: 1. Task-level disk.fusion setting (highest) 2. Executor/session-level fusion.enabled config (fallback) This provides a clearer alternative to using "scratch false" for disabling Fusion on problematic tasks. Signed-off-by: Edmund Miller <[email protected]>
1 parent cd044ff commit 24bd0a0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/nextflow/src/main/groovy/nextflow/fusion/FusionAwareTask.groovy

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ trait FusionAwareTask {
4242

4343
boolean fusionEnabled() {
4444
if( fusionEnabled==null ) {
45-
fusionEnabled = getExecutor0().isFusionEnabled()
45+
// Check task-level disk.fusion setting first
46+
def diskFusion = getTask().config?.getDiskResource()?.fusion
47+
if( diskFusion != null ) {
48+
fusionEnabled = diskFusion
49+
} else {
50+
// Fall back to executor-level setting
51+
fusionEnabled = getExecutor0().isFusionEnabled()
52+
}
4653
}
4754
return fusionEnabled
4855
}

0 commit comments

Comments
 (0)