From 6fbc3fccb607a8d80885f0face284c01871a3162 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 13 Aug 2026 13:03:55 +0200 Subject: [PATCH] fix(flow): pass the flow's worker tag when testing a loop iteration (#10680) --- frontend/src/lib/components/FlowLoopIterationPreview.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/FlowLoopIterationPreview.svelte b/frontend/src/lib/components/FlowLoopIterationPreview.svelte index 5bea6bb6ff..1378e20f04 100644 --- a/frontend/src/lib/components/FlowLoopIterationPreview.svelte +++ b/frontend/src/lib/components/FlowLoopIterationPreview.svelte @@ -89,7 +89,7 @@ runPreview(previewArgs, undefined) } - const { flowStateStore, pathStore, opWorkspace } = + const { flowStateStore, flowStore, pathStore, opWorkspace } = getContext('FlowEditorContext') const dispatch = createEventDispatcher() @@ -98,7 +98,9 @@ restartedFrom: RestartedFrom | undefined ) { progressBar?.reset() - const newFlow = { value: { modules }, summary: '' } + // The preview flow holds only the loop body, so it inherits none of the flow's settings: + // carry the tag over so the iteration lands on the worker group the flow runs on. + const newFlow = { value: { modules }, summary: '', tag: flowStore.val.tag } jobId = await runFlowPreview( whileLoop ? withWhileLoopIter(args) : args, newFlow,