Background
We have had successful runs of the Rafiki test suite (which is great) on our Virtualbox VM running Ubuntu 21.04 (to avoid security concerns running Docker with root privileges), but are not able to run the backend portion of the test suite inside of a GitHub Codespaces environment (which we are trying to run for various reasons including portability and security). The rates tests all run just fine 👍🏾.
The main issue seems to be that Tigerbeetle isn't able to connect to an actively listening replica (at port 3004). It could be that there is something missing from the default Codespaces environment that we need to add to our dev container (see Specifications).
Expected Behavior
Running yarn workspace backend test successfully connects to Tigerbeetle and passes (or fails) tests appropriately.
Actual Behavior
Running yarn workspace backend test fails to connect to Tigerbeetle and does not run the actual test logic.
Terminal output is:
error(message_bus): error connecting to replica 0: error.Unexpected
error(message_bus): error closing connection to tigerbeetle.src.message_bus.union:392:19{ .replica = 0 }: error.Unexpected
Tigerbeetle container output is:
> Executing task: docker logs --tail 1000 -f 43d4f1d1938a1fc684fa77d36fe3eff89966e211ce5cae0b0945f71f0b5962ad <
info(storage): opening "cluster_0000000001_replica_000.tigerbeetle"...
info: cluster=1 replica=0: listening on 0.0.0.0:3004
error(message_bus): accept failed: error.SocketNotListening
Terminal will be reused by tasks, press any key to close it.
I've looked into tigerbeetle/src/message_bus.zig to try to make sense of the situation but I am not familiar enough with the architecture to get a sense of what to do next.
Steps to Reproduce the Problem
- Connect to a GitHub Codespace.
- We are using VSCode locally to remotely connect to the codespace, but the same goes for a browser-based VSCode instance.
- Add the
rafiki repository as a submodule to the Codespace repository.
git submodule add https://github.com/interledger/rafiki.git
- Probably worthwhile to check if the same effects occur if Rafiki is not a submodule but instead the active repo, though on the Virtualbox VM the tests ran fine in the submodule as well.
- Run
yarn build at the root of the repo.
- Build the Docker container for the backend using
yarn docker build backend -t rafiki-backend.
- Run
yarn workspace backend test.
Specifications
GitHub Codespaces Default Linux Container
Background
We have had successful runs of the Rafiki test suite (which is great) on our Virtualbox VM running Ubuntu 21.04 (to avoid security concerns running Docker with root privileges), but are not able to run the
backendportion of the test suite inside of a GitHub Codespaces environment (which we are trying to run for various reasons including portability and security). Theratestests all run just fine 👍🏾.The main issue seems to be that Tigerbeetle isn't able to connect to an actively listening replica (at port 3004). It could be that there is something missing from the default Codespaces environment that we need to add to our dev container (see Specifications).
Expected Behavior
Running
yarn workspace backend testsuccessfully connects to Tigerbeetle and passes (or fails) tests appropriately.Actual Behavior
Running
yarn workspace backend testfails to connect to Tigerbeetle and does not run the actual test logic.Terminal output is:
Tigerbeetle container output is:
I've looked into
tigerbeetle/src/message_bus.zigto try to make sense of the situation but I am not familiar enough with the architecture to get a sense of what to do next.Steps to Reproduce the Problem
rafikirepository as a submodule to the Codespace repository.git submodule add https://github.com/interledger/rafiki.gityarn buildat the root of the repo.yarn docker build backend -t rafiki-backend.yarn workspace backend test.Specifications
GitHub Codespaces Default Linux Container