-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autobahn ci #5
base: main
Are you sure you want to change the base?
Autobahn ci #5
Conversation
Also i didn't know how to build the test server so i added a dune file, i don't know if thats ok |
Hi @francoganga! This PR looks like a great start ✨ – we can probably do a few small things to get it merged, and then improve on it. First thing would be to run the formatter, you can do this with Second would be how the Autobahn Riot app is defined. We probably want something a little more like this to be more idiomatic with Riot, but also to encapsulate the docker spawning process and make sure the Autobahn Riot app doesn't terminate immediately. module Autobahn = struct
let spawn_docker args = ...
let init () =
let docker_pid = spawn_docker args in
(* after spawning the OS process, we want to keep the riot Autobahn app alive,
so we just _wait_ to receive a message *)
match receive () with
| _ -> failwith "should never have received a message"
let start () =
let pid = spawn init in
Ok pid
end This may actually help with not terminating the tests abruptly. The way Riot.start works is that we pass in a bunch of modules that are "apps", and Riot will supervise all of them. If one of them finishes, it'll be started again, until it reaches the limit of restarts. When it reaches the limit of restarts, then the supervisor of all the apps will finish. At that point, the server will also be terminated. This may explain the behavior you're seeing. Hope this helps, and feel free to drop by the Riot discord if we can help! 🙏🏼 |
Hi @leostera , i cleaned up the code a bit, riot gives me the same error at some point. What i discovered is that if i run autobahn without riot (manually) it fails in the same way. Also if i run the autobahn tests in small subsets ex: |
Hello, this is an attempt to resolve #2
I extended the test server and added another app that runs the autobahn docker image. Since i don't know much about Trail or Nomad i only made the test server compile.
The result is that autobahn and the test server run with riot and at some point the test server crashes and i think this makes autobahn crash too, you can see an example of this running here: https://github.com/francoganga/nomad/actions/runs/8206841697/job/22446832225
I added a step for uploading the resulting report, but i could not test it for the reason i mentioned
I probably should mention that im a bit new to ocaml so do let me know if there are things to fix.
Also this is my first pr, sorry if the commits are a mess