<#4433 [BUG] Cannot combine user input with condit...
# flyte-github
a
#4433 [BUG] Cannot combine user input with conditional Issue created by pryce-turner Describe the bug When nesting an approval inside a branch of a conditional, the approval is never prompted in the UI, leaving the workflow in a constantly "RUNNING" state. Expected behavior The gateNode should request approval and be allowed to continue once approved. Additional context to reproduce
Copy code
from datetime import timedelta
from flytekit import workflow, approve, conditional, task

@task
def check_condition() -> str:
    return "WARN"

@task
def noop_task() -> str:
    return "OUTPUT"

@workflow
def wf() -> str:
    
    check = check_condition()
    noop = noop_task()

    qc = (
        conditional("pass-qc")
        .if_(check == "PASS")
        .then(noop)
        .elif_(check == "WARN")
        .then(approve(noop, "approve-qc", timeout=timedelta(hours=2)))
        .else_()
        .fail("One or more samples failed QC.")
    )

    return qc
run with
pyflyte run --remote repro.py wf
Screenshots Screenshot 2023-11-15 at 11 13 13 AM Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte