From 7858466ab53ed3f515d876f66a95a1b741d8ef78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 16 Jul 2024 15:01:20 +0200 Subject: [PATCH] Show more info for Fly runtime in the runtime panel (#2711) --- lib/livebook/runtime/fly.ex | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/livebook/runtime/fly.ex b/lib/livebook/runtime/fly.ex index 584957e96..fefd2066e 100644 --- a/lib/livebook/runtime/fly.ex +++ b/lib/livebook/runtime/fly.ex @@ -337,8 +337,21 @@ end defimpl Livebook.Runtime, for: Livebook.Runtime.Fly do alias Livebook.Runtime.ErlDist.RuntimeServer - def describe(runtime) do - [{"Type", "Fly.io machine"}] ++ + def describe(%{config: config} = runtime) do + specs = + [ + "#{config.cpus} #{config.cpu_kind} CPU", + "#{config.memory_gb} GB RAM", + config.gpu_kind && "#{config.gpus} #{config.gpu_kind} GPU" + ] + |> Enum.reject(&is_nil/1) + |> Enum.join(", ") + + [ + {"Type", "Fly.io machine"}, + {"App", config.app_name}, + {"Specs", specs} + ] ++ if runtime.node do [{"Node name", Atom.to_string(runtime.node)}] else