https://flyte.org logo
#ask-the-community
Title
# ask-the-community
s

Sam Eckert

02/04/2023, 7:36 PM
Hey all, I believe I found a small bug. LMK if there is a better channel for this. During local execution, conditionals interpret a int variable with value
0
as None.
Copy code
@workflow
def _impl(
    delta: int,
) -> Set[str]:
    return (
        conditional("terminal_case")
        .if_((delta != -1) & (delta <= 10))
        .then(end())
        .else_()
        .then(
            iterate()
        )
    )


def cluster_distributed() -> Set[str]:
    _impl(delta=0)
Outputs an error comparing NoneType <= 10
k

Ketan (kumare3)

02/04/2023, 8:30 PM
Uhho, interesting
Why should this be
s

Samhita Alla

02/06/2023, 7:15 AM
This is a bug. Created a PR to fix the issue. https://github.com/flyteorg/flytekit/pull/1432
4 Views