aurae-runtime / aurae

Distributed systems runtime daemon written in Rust.
https://aurae.io
Apache License 2.0
1.83k stars 89 forks source link

chore(auraescript): Upgrade Deno #513

Open mccormickt opened 1 week ago

mccormickt commented 1 week ago

Fixes some build errors due to dependency conflicts by upgrading Deno libraries. We also split deno_runtime and deno_core again to allow for macros to work properly (re-exported deno_core could not be found).

Also disables the snake case clippy lint for auraescript modules as it now fails on the as__ prefixed functions generated by our macros.

mccormickt commented 1 week ago

Seems like this breaks auraescript, converting to draft to figure it out. The usual issue of the ops not being registered properly.

» ./examples/cells.ts 
Error: TypeError: Deno[Deno.internal].core.ops.as__aurae_config__try_default is not a function
    at Module.createClient (file:///home/jan0ski/aurae-runtime/aurae/auraescript/gen/aurae.ts:15:47)
    at file:///home/jan0ski/aurae-runtime/aurae/examples/cells.ts:4:28
mccormickt commented 1 week ago

Seems to be working well! A few errors that seem to be more like bugs in auraed not cleaning up cgroups/executables or in the scripts themselves rather than in auraescript:

» cargo run -p auraescript ./examples/discovery_discover.ts
{
  "healthy": true,
  "version": "0.0.0"
}
» cargo run -p auraescript ./examples/cells_isolated_processes_and_network.ts 
{
  "cellName": "ae-net-proc-isolated-1",
  "cgroupV2": true
}
{
  "pid": 19
}
{
  "pid": 21
}
{
  "pid": 25
}
Error: Error: status: Internal, message: "cell 'ae-net-proc-isolated-1' could not kill children: No child process (os error 10)", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Wed, 26 Jun 2024 01:41:53 GMT", "content-length": "0"} }
    at async file:///home/jan0ski/aurae-runtime/aurae/examples/cells_isolated_processes_and_network.ts:84:1
dmah42 commented 1 week ago

interesting. do we see this before the upgrade?

mccormickt commented 6 days ago

interesting. do we see this before the upgrade?

After a restart these "no process found" or "cgroup exists" errors are gone (both on main and this branch). The problem seemed to be stale cgroups on my machine from prior tests not being cleaned up 👍

dmah42 commented 1 day ago

interesting. do we see this before the upgrade?

After a restart these "no process found" or "cgroup exists" errors are gone (both on main and this branch). The problem seemed to be stale cgroups on my machine from prior tests not being cleaned up 👍

so is this ready to merge?