acoustic-carpenter-78188
10/07/2025, 11:38 PMtyping.Union inputs with flyte copilot.
{"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 the handling of typing.Union inputs in flytecopilot by implementing logic for Union scalar types, ensuring correct input downloads and resolving task execution errors. New test cases have also been added to validate these improvements.
flyteorg/flyteacoustic-carpenter-78188
10/13/2025, 6:10 PM