feat(tvix/boot/tests): reenable
This got disabled in 5f17df8548 without
much investigation.
After some more digging, I found the root cause -
173de320197ba97f2daf46b7d229055cd3732df4 in nixpkgs changed the files
produced by `mkBinaryCache` to use FileHash, not NarHash to name NAR
files.
While this is more correct and consistent with how it's produced by Nix,
it unfortunately means our uploads will now get rejected.
We didn't notice this, as curl (and rush) were not configured to bail
out - which now is the case again.
Deal with the change, by decompressing twice, once to get the NarHash
again, the second time to feed the data to curl.
Change-Id: Ic1deb470801250e7967083ac78cd46be39f3caa3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13122
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
parent
1115bffe47
commit
1acf37c054
1 changed files with 82 additions and 87 deletions
|
|
@ -50,8 +50,10 @@ let
|
|||
pkgs.curl
|
||||
pkgs.rush-parallel
|
||||
pkgs.xz.bin
|
||||
pkgs.nix
|
||||
];
|
||||
buildCommand = ''
|
||||
set -eou pipefail
|
||||
touch $out
|
||||
# Ensure we can construct http clients.
|
||||
export SSL_CERT_FILE=/dev/null
|
||||
|
|
@ -103,7 +105,7 @@ let
|
|||
# nar-bridge doesn't care about the path we upload *to*, but a
|
||||
# subsequent .narinfo upload need to refer to its contents (by narhash).
|
||||
echo -e "Uploading NARs… "
|
||||
ls -d $to_upload/nar/*.nar.xz | rush 'xz -d < {} | curl -s -T - --unix-socket $PWD/nar-bridge.sock http://localhost:9000/nar/$(basename {} | cut -d "." -f 1).nar'
|
||||
ls -d $to_upload/nar/*.nar.xz | rush -n1 'nar_hash=$(xz -d < {} | nix-hash --base32 --type sha256 --flat /dev/stdin);xz -d < {} | curl -s --fail-with-body -T - --unix-socket $PWD/nar-bridge.sock http://localhost:9000/nar/''${nar_hash}.nar'
|
||||
echo "Done."
|
||||
|
||||
# Upload all NARInfo files.
|
||||
|
|
@ -158,7 +160,8 @@ let
|
|||
documentation.enable = lib.mkForce false;
|
||||
}).config.system.build.toplevel;
|
||||
|
||||
allTests = depot.nix.readTree.drvTargets {
|
||||
in
|
||||
depot.nix.readTree.drvTargets {
|
||||
docs-memory = (mkBootTest {
|
||||
path = ../../docs;
|
||||
importPathName = "docs";
|
||||
|
|
@ -236,12 +239,4 @@ let
|
|||
vmCmdline = "init=${testSystem}/init panic=-1"; # reboot immediately on panic
|
||||
assertVMOutput = "Onwards and upwards.";
|
||||
});
|
||||
};
|
||||
in
|
||||
# remove broken tests from set
|
||||
builtins.removeAttrs allTests [
|
||||
# these fail in CI as of 2025-02-09, printing HTTP errors
|
||||
"closure-nixos-bigtable"
|
||||
"closure-nixos-nar-bridge"
|
||||
"closure-nixos-s3"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue