livebook-dev/kino

Bug happening when running remote execution smart cell

hugobarauna opened this issue · 0 comments

Running this code works:

CleanShot 2023-11-14 at 16 02 21

But running that doesn't work:

CleanShot 2023-11-14 at 16 04 34

Here's the code generated by the smart cell, when the code doesn't work:

require Kino.RPC
node = String.to_atom(System.fetch_env!("LB_TEAMS_PROD_NODE"))
Node.set_cookie(node, String.to_atom(System.fetch_env!("LB_TEAMS_PROD_COOKIE")))

Kino.RPC.eval_string(
  node,
  """
  Hub.Orgs.Org.changeset(org, %{name: "#{org.name}"})
  |> Hub.Repo.update()
  """,
  file: __ENV__.file
)

That said, when the bug happens, even I run the generated code by the smart cell, when the code worked, now it doesn't:

CleanShot 2023-11-14 at 16 06 26