<#401 Support union and none type in flyteidl> Pul...
# flyte-github
a
#401 Support union and none type in flyteidl Pull request opened by yubofredwang TL;DR Union type is not supported in flyteidl leading to flytectl failures when the task takes Union type as input or output. When users do operations such as:
flytectl get execution
will output:
failed to convert to a known Literal. Input Type [union_type:..] not supported
Type ☐ Bug Fix ☑︎ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description For creating making literal for union type, the code will find the first one that matches the input value. If the input is 1.0 and union type is Union(Integer, Float), integer will be used since 1.0 will match with integer. For default generation of a union type, I just use the first variants possible. For example, if the union contains Union(String, Integer), then default value generated when creating an execFile will be "" not 0. Tested with flytectl commands, get task and create execution is working fine Tracking Issue fixes flyteorg/flyte#3094 flyteorg/flyteidl All checks have passed 13/13 successful checks