acoustic-carpenter-78188
10/07/2025, 11:38 PMtyping.Union inputs because the flyte copilot fails.
{"level":"error","msg":"Failed to persist [spec], err unsupported scalar type [*core.Scalar_Union]",...}
{"level":"info","msg":"Exited downloading inputs from [.../inputs.pb]",...}
{"level":"error","msg":"Downloading failed, err failed to download input variable from remote store: variable [spec] download/store failed: unsupported scalar type [*core.Scalar_Union]",...}
Context: Support for Union types in the Flyte IDL was added in #1349, but there is still a small missing piece in flytecopilot to support downloading Union-type scalars for ContainerTask/AsyncConnector flyte tasks.
Proposed fix: Add a logical path for typing.Union types – #6661 #6674
### Expected behavior
Tasks with typing.Union inputs should work with flyte copilot.
### Additional context to reproduce
Workflow code idea for reproducing the error.
# Run with `pyflyte run --remote`
@MyContainerTask
def t1() -> str:
return "hello"
@MyContainerTask
def t2(ff: Union[str, int]) -> bool:
return ff == "hello"
@workflow
def wf() -> bool:
return t2(ff=t1())
if __name__ == "__main__":
wf()
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flyteacoustic-carpenter-78188
10/16/2025, 4:27 AM