cuddly-jelly-27016
05/15/2025, 12:09 AMSdkType that represent an abstraction for the type of a task or workflow and its multiple variables. However we are missing an equivalent to represent the type of a single value.
This causes that we were leaking internal classes of the api module into the users code. For example, to create a SdkBindingData for a list of bindings, the user needs to:
SdkBindingData.ofBindingCollection(
LiteralType.ofCollectionType(LiteralType.ofSimpleType(SimpleType.INTEGER)),
List.of(sum1.getOutputs().o(), sum2.getOutputs().o()));
The api module was designed to be stable a follow closely the proto classes, that is the reason of why is so verbosed
Instead with the proper abstraction we could write this instead:
SdkBindingDatas.ofBindingCollection(
SdkLiteralTypes.integers(), List.of(sum1.getOutputs().o(), sum2.getOutputs().o()));
### What if we do not do this?
We would had a worse user experience because of the verbosity of the api
### Related component(s)
flytekit-java
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/15/2025, 12:09 AM