few-electrician-9464
06/27/2025, 8:27 PMflytekit.remote.remote.FlyteRemote
to fetch and register launch plans?jolly-florist-66728
06/27/2025, 8:27 PMflytekit
) and its FlyteRemote
class. If you are looking for similar functionality in Java, please specify your use case or any existing Java SDKs you are considering, as this context could help clarify your requirements. If this doesn't help, please reach out to the Flyte support team for further assistance. 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.few-electrician-9464
06/27/2025, 8:28 PMfew-electrician-9464
06/27/2025, 8:30 PMjolly-florist-66728
06/27/2025, 8:30 PMFlyteRemote
for fetching and registering launch plans directly, based on the available documentation. The Flyte Java/Scala SDKs focus on authoring and registering workflows, but do not appear to expose a high-level remote client for dynamic fetch/register operations like FlyteRemote
in Python. Registration for Java/Scala is typically handled via JFlyte or CLI, not via a remote API client at runtime (source, source).
However, since Flyte's control plane (FlyteAdmin) exposes a gRPC/REST API, it is theoretically possible to implement your own Scala client to interact with these endpoints for fetching and registering launch plans. This would require manual implementation using the FlyteIDL protobuf definitions and/or REST endpoints (source). Would you like more detail on how to approach this with gRPC or REST in Scala?
Sources:
- Flyte Java/Scala SDK and registration discussion
- https://github.com/flyteorg/flyte/pull/1183
- https://github.com/flyteorg/flyte/blob/master/flyteadmin/README.md 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.few-electrician-9464
06/27/2025, 8:32 PMjolly-florist-66728
06/27/2025, 8:32 PM/api/v1/launch_plans
).
2. Use HTTP POST to register a new launch plan (e.g., /api/v1/launch_plan
), sending the launch plan spec as JSON.
Here is a simplified Scala example using the popular sttp client:
import sttp.client3._
import sttp.model._
val backend = HttpURLConnectionBackend()
val baseUrl = "http://<flyteadmin-host>:<port>/api/v1"
// Fetch launch plans
val fetchRequest = basicRequest
.get(uri"$baseUrl/launch_plans?project=myproject&domain=development")
.response(asString)
val fetchResponse = fetchRequest.send(backend)
println(fetchResponse.body)
// Register a launch plan (replace <jsonPayload> with your launch plan JSON)
val registerRequest = basicRequest
.post(uri"$baseUrl/launch_plan")
.contentType(MediaType.ApplicationJson)
.body("""{ ... }""") // your launch plan JSON here
.response(asString)
val registerResponse = registerRequest.send(backend)
println(registerResponse.body)
You will need to construct the JSON payloads according to the FlyteAdmin API schema, which you can explore via the Swagger UI after starting a Flyte demo (source).
Would you like more detail on the required JSON structure or authentication?
Sources:
- https://www.union.ai/docs/flyte/deployment/flyte-configuration/swagger/ 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.few-electrician-9464
06/27/2025, 8:35 PMjolly-florist-66728
06/27/2025, 8:35 PMListLaunchPlans
and CreateLaunchPlan
on the FlyteAdmin service.
Would you like a step-by-step example of generating Scala gRPC clients for FlyteAdmin?
Sources:
- https://www.union.ai/docs/flyte/deployment/flyte-configuration/swagger/ 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.few-electrician-9464
06/27/2025, 8:58 PMflyteidl-protos/src/main/proto/flyteidl
?jolly-florist-66728
06/27/2025, 8:58 PMflyteidl-protos/src/main/proto/flyteidl
to generate Scala (or Java) gRPC client stubs. These proto files define the FlyteAdmin service and all related messages, enabling you to interact with FlyteAdmin's gRPC API for operations like fetching and registering launch plans (source, source).
Would you like detailed steps on generating Scala gRPC clients from these proto files?
Sources:
- https://github.com/flyteorg/flyte/blob/master/flyteidl/README.md
- https://github.com/flyteorg/flyte/blob/master/flyteidl/protos/docs/contributing.md 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.