Just recently upgrade from flytekit v1.15.X to v1....
# flyte-v1-support
c
Just recently upgrade from flytekit v1.15.X to v1.16.20 and noticed a weird regression I wanted to see if anyone knew about before going down a rabbit hole.
pyflyte run remote-workflow
appears to be throwing
click
errors for
Optional[str]
arguments in the workflow that are not being passed into the command. I don't really understand why we're getting click errors for a workflow that has no click decorators.
Looks like its this commit that breaks things for us: https://github.com/flyteorg/flytekit/commit/21ffdc359f77830fe5a5d3401a86f9d6a7c56037 It seems that before even invoking the flyte workflow there is some click validation that occurs
CC: @echoing-account-76888 since you reviewed the PR and might be familiar with how the code works
e
Could you please provide the error message you get? I'm on the master branch and
pyflyte run remote-workflow
works for me
c
I think what triggers the issue for us is that the target workflow has
Optional[str]
as an argument and it is not passed along with the CLI command
Copy code
@workflow
def eer_workflow_with_slides(
    space_separated_event_ids: str,
    space_separated_slide_urls: str,
    owner_email: str,
    use_sandbox: bool,
    docker_tag: Optional[str] = None,
) -> .... :
I think its related to how getting the click parameters is special cased for launch plans (which is what the code use to retrieve before instead of the workflows): https://github.com/flyteorg/flytekit/blob/41a9f8009128db1391697cec0441e924e7e27d68/flytekit/clis/sdk_in_container/run.py#L878-L895
Looks like setting
required = not is_optional(native_inputs[name])
works, so I'll test it out a bit more and file a pull request
👍 1
❤️ 1
e
Awesome! Thank you so much for the help! Feel free to ping me for the review 🙌
c
e
Approved! Thank you ❤️