From cb3ce4e463da653be82579dd6fd9215241c1ab10 Mon Sep 17 00:00:00 2001 From: John Brestelli Date: Fri, 4 Sep 2026 16:39:02 -0400 Subject: [PATCH] Derive the nextflow branch key and URL from the workflow being run runAndMonitor read the nextflowWorkflow param to build the ".branch" shared config key, which is only correct while a step runs exactly one workflow. Take both the branch key and the github URL from the workflow name it is handed so a step class can run more than one workflow, and pass the bare name in. No change for existing callers: they hand it the same workflow the param holds. Co-Authored-By: Claude Opus 5 (1M context) --- StepClasses/lib/perl/RunAndMonitorNextflow.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/StepClasses/lib/perl/RunAndMonitorNextflow.pm b/StepClasses/lib/perl/RunAndMonitorNextflow.pm index 35121d6..b7ff526 100644 --- a/StepClasses/lib/perl/RunAndMonitorNextflow.pm +++ b/StepClasses/lib/perl/RunAndMonitorNextflow.pm @@ -28,8 +28,6 @@ sub run { my $entry = $self->getParamValue("entry"); # TODO: why do we have the boolean param for "isGitRepo?" - $nextflowWorkflow = "https://github.com/".$nextflowWorkflow; - my $isGitRepo = $self->getBooleanParamValue("isGitRepo"); # get global properties @@ -115,16 +113,18 @@ sub runAndMonitor { # default to main branch but take from step shared if defined # the workflow branch is gotten via lowercase nextflow workflow param + ".branch" - my $nextflowWorkflowBranchKey = $self->getParamValue("nextflowWorkflow") . ".branch"; + my $nextflowWorkflowBranchKey = $nextflowWorkflow . ".branch"; my $workflowBranch = $self->getSharedConfigRelaxed($nextflowWorkflowBranchKey) ? $self->getSharedConfigRelaxed($nextflowWorkflowBranchKey) : "main"; + my $nextflowWorkflowUrl = "https://github.com/" . $nextflowWorkflow; + #my $nextflowCmd = "nextflow run $nextflowWorkflow -with-trace -c $clusterNextflowConfigFile -resume >$nextflowStdoutFile 2>&1"; #use "-C" instead of "-c" to avoid taking from anything besides the specified config - my $nextflowCmd = "nextflow -log $logFile -C $clusterNextflowConfigFile run $nextflowWorkflow -r $workflowBranch -resume "; + my $nextflowCmd = "nextflow -log $logFile -C $clusterNextflowConfigFile run $nextflowWorkflowUrl -r $workflowBranch -resume "; if ($entry) { - $nextflowCmd = "nextflow -log $logFile -C $clusterNextflowConfigFile run $nextflowWorkflow -entry $entry -r $workflowBranch -resume"; + $nextflowCmd = "nextflow -log $logFile -C $clusterNextflowConfigFile run $nextflowWorkflowUrl -entry $entry -r $workflowBranch -resume"; } my $submitCmd = $self->getNodeClass()->getQueueSubmitCommand($queue, $nextflowCmd, undef, undef, $nextflowStdoutFile);