<#6327 Use child dir for branch taken> Pull reques...
# flyte-github
c
#6327 Use child dir for branch taken Pull request opened by andrewwdye ## Why are the changes needed? #6120 fixed a bug where we were repurposing the output dir, leading to races on data availability. However, once moving to explicit dirs and a copy, we introduced a bug where try and fail to copy a subworflow's output when there is none. Repro
Copy code
import flytekit as fl
from flytekit.core.task import Echo

echo = Echo(name="echo")

@fl.task
def t1():
    pass

@fl.workflow
def sub():
    t1()

@fl.workflow
def cond_wf(val: str):
    _ = (
        fl.conditional("conditional")
        .if_(val != "")
        .then(
            sub()
        )
        .else_()
        .then(echo())
    )
## How was this patch tested? • Add unittests • Repro example resolved when running locally ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs #6120 ### Summary by Bito This PR fixes a critical bug in branch node handler by ignoring non-critical 'not found' errors during raw output copying. The update enhances error handling, improves subworkflow output management, and reduces race condition risks. Test suite improvements include a new flag to simulate output presence and updated test expectations. Unit tests added: True Estimated effort to review (1-5, lower is better): 1 flyteorg/flyte