Skip to content

Derive the nextflow branch key and URL from the workflow being run - #14

Open
jbrestel wants to merge 1 commit into
masterfrom
merge-ngs-samples-into-nextflow-step
Open

Derive the nextflow branch key and URL from the workflow being run#14
jbrestel wants to merge 1 commit into
masterfrom
merge-ngs-samples-into-nextflow-step

Conversation

@jbrestel

@jbrestel jbrestel commented Sep 4, 2026

Copy link
Copy Markdown
Member

Why

runAndMonitor built the <workflow>.branch shared-config key by re-reading the step's nextflowWorkflow param:

my $nextflowWorkflowBranchKey = $self->getParamValue("nextflowWorkflow") . ".branch";

That is only correct while a step runs exactly one workflow. ApiCommonWorkflow is merging its ngs-samples fetch and its analysis run into a single step (VEuPathDB/ApiCommonWorkflow#101) so the pair holds one throttle slot; without this change the ngs-samples run would pick up the analysis workflow's branch config.

What

runAndMonitor now takes the bare workflow name and derives both the branch key and the https://github.com/… URL from it. run passes the name through instead of pre-building the URL.

Risk

None for existing callers — every one hands runAndMonitor the same workflow its nextflowWorkflow param holds, so the key and URL are unchanged. run is otherwise untouched, which matters because MicrobiomeWorkflow uses this class directly (runHumannOnCluster.xml, runEukdetectOnCluster.xml).

The only subclass in the org, ApiCommonWorkflow::…::RunAndMonitorNextflowNGSSamples, is deleted by the companion PR. RunAndMonitorNextflowWithEntry is an independent copy-paste fork of this class and is unaffected.

Testing

StepClasses/t/run_and_monitor_nextflow.t: 2 pass, 1 fails — tailLooksOk "Retried but failed" expects '' and gets undef. Confirmed pre-existing: it fails identically with this change stashed.

Behaviour is covered end-to-end by the companion PR's Main/t/run_ngs_samples_and_nextflow.t (21 assertions).

Merge order

Merge this first, or together with VEuPathDB/ApiCommonWorkflow#101 — that PR's new step class depends on it.

🤖 Generated with Claude Code

runAndMonitor read the nextflowWorkflow param to build the "<workflow>.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) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant