<#3831 [BUG] undefined optional argument in a dyna...
# flyte-github
a
#3831 [BUG] undefined optional argument in a dynamic task is a `Promise`, should be `None` Issue created by alekpikl Describe the bug An empty
Optional[SomeType] = None
argument in a
dynamic
task is a
Promise
during execution. A reproducer:
Copy code
from typing import Optional

from flytekit import dynamic, workflow


@dynamic
def my_task(opt: Optional[int] = None):
    print(opt)  # Promise(node:.opt)


@workflow
def workflow():
    my_task()
In
my_task,
opt
is a
Promise(node:.opt).
Works as expected locally but not in a cluster. Expected behavior The argument should be
None
during execution. Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte