Hey all, I believe I found a small bug. LMK if the...
# ask-the-community
s
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
Uhho, interesting
Why should this be
s
This is a bug. Created a PR to fix the issue. https://github.com/flyteorg/flytekit/pull/1432
100 Views