fix(tvix/boot/tests): check nar-bridge being fully up

Ensure nar-bridge is healthy before connecting to it, don't just check
for the unix socket to be present.

We don't have a proper /health endpoint yet, but nix-cache-info works
fine for now.

Change-Id: I22df2c3b7bffcf52dbd3d00f3ba5382dc06ab03d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12030
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-07-23 16:22:29 +02:00 committed by clbot
parent 636647ce03
commit 9385b3bcfb

View file

@ -89,8 +89,8 @@ let
--otlp=false \ --otlp=false \
-l $PWD/nar-bridge.sock & -l $PWD/nar-bridge.sock &
# Wait for the socket to be created. # Wait for nar-bridge to report healthy.
while [ ! -e $PWD/nar-bridge.sock ]; do sleep 1; done timeout 22 sh -c "until ${pkgs.curl}/bin/curl -s --unix-socket $PWD/nar-bridge.sock http:///nix-binary-cache; do sleep 1; done"
# Upload. We can't use nix copy --to http://…, as it wants access to the nix db. # Upload. We can't use nix copy --to http://…, as it wants access to the nix db.
# However, we can use mkBinaryCache to assemble .narinfo and .nar.xz to upload, # However, we can use mkBinaryCache to assemble .narinfo and .nar.xz to upload,