<#6674 [fix] Support typing.Union in flytecopilot>...
# flyte-github
a
#6674 [fix] Support typing.Union in flytecopilot Pull request opened by ddl-rliu ## Tracking issue Closes #6662 ## Why are the changes needed? An error happens when running a ContainerTask task remote execution with
typing.Union
inputs with flyte copilot.
Copy code
{"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 flyte tasks. This PR adds this small missing piece. ## What changes were proposed in this pull request? Add a logical path to flytecopilot for
typing.Union
types. ## How was this patch tested? Tested in my flyte deployment, and confirmed that
typing.Union
inputs now are correctly downloaded by the flytecopilot init container. ### Labels Please add one or more of the following labels to categorize your PR: • added: For new features. • changed: For changes in existing functionality. • deprecated: For soon-to-be-removed features. • removed: For features being removed. • fixed: For any bug fixed. • security: In case of vulnerabilities This is important to improve the readability of release notes. ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link https://bito.ai#summarystart| ### Summary by Bito This pull request enhances flytecopilot by adding support for
typing.Union
types, improving the handling of inputs for ContainerTask tasks. It includes logic for processing Union scalar types and introduces new test cases to ensure functionality across various input scenarios. flyteorg/flyte