bumpy-match-83743
07/24/2024, 11:19 PMorg.flyte.flytekitscala SDK and register via jflyte tooling. That works well enough, be we know there are significant gaps when it comes to Flyte Admin tooling on the JVM. To mitigate, I took the protos from the Flight IDL, generated an API, and have the full scope of the Flyte service, specifically the admin service. I am now able to launch workflows via code, get execution status, etc. The next piece of the puzzle is to come up with a strategy to bind task/workflow inputs/outputs, so that I can dynamically:
1. Launch workflow executions with dynamic inputs, and,
2. Retrieve type-safe workflow execution output values.
I've put together . While the example shows primitives, our use case is likely going to rely on JSON payloads throughout (for now), so that may significantly simplify the strategy here. It'd be great if I could get some thoughts, maybe from the Spotify folks who built the SDK, or anyone else who is trying to adopt the platform from the JVM.average-finland-92144
07/25/2024, 4:26 PMbumpy-match-83743
07/25/2024, 7:38 PMbumpy-match-83743
07/25/2024, 7:41 PMStruct from the google protos.bumpy-match-83743
07/25/2024, 8:44 PMpublic enum Kind {
PRIMITIVE,
GENERIC,
BLOB,
BINARY
}
The GENERIC maps to the Struct type, so I'll investigate some examples that leverage that type and see where it goes...bumpy-match-83743
07/25/2024, 9:58 PMcase class Person(name: String)
case class Input(person: SdkBindingData[Person])
val input = Input(
person = SdkBindingDataFactory.of(
SdkLiteralTypes.generics(),
Person("Andy")
)
)
val literalMap = SdkScalaType[Input].toLiteralMap(input)bumpy-match-83743
07/25/2024, 10:00 PMbumpy-match-83743
07/26/2024, 6:03 PMorg.flyte.api.v1.Literal (which appears to be hand-written) to the generated flyteidl.core.literals.Literal, which is generated from the protos.
The alternative would be to update the current SDK with all the latest protos, and generate AdminService stubs. Then there would be no extra transformation, because the generated service stubs would expect the right data type.
There appears to be no collaborators on the java SDK, no GitHub issues, etc. Who would we talk to about this?enough-branch-23683
07/29/2024, 9:40 AMThat creates the Java version... I just need to get it working for the Scala version of the literal map.What do you mean with this?
enough-branch-23683
07/29/2024, 9:40 AMbumpy-match-83743
07/29/2024, 3:01 PMVector of Int and my workflow blew up at runtime. Generic (struct) is not viable to support JSON.bumpy-match-83743
07/29/2024, 3:31 PMenough-branch-23683
07/29/2024, 3:34 PMbumpy-match-83743
07/29/2024, 3:59 PMbumpy-match-83743
07/29/2024, 3:59 PMenough-branch-23683
07/29/2024, 4:02 PMenough-branch-23683
07/29/2024, 4:03 PMaverage-finland-92144
07/29/2024, 6:11 PMI guess the main difference is that if you use binary, you are writing the data on the protos itself but if you use blob you are writing a ref which points to the real data file in the protosI think you're right Andres but hoping @high-accountant-32689 knows better