aboutsummaryrefslogtreecommitdiff
path: root/tests/build-remote.sh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2022-03-08 06:02:25 +0100
committerTaeer Bar-Yam <taeer.bar-yam@tweag.io>2022-12-08 16:03:20 -0500
commit04b113f6cb5356d44992f98928a595cdf93d561a (patch)
treee2bfb930f02057394be2714b6968a625677501ad /tests/build-remote.sh
parent1dd7779c7cdca7061e80ebc3b7886a2aa97b0d8a (diff)
Fix `nix log` with CA derivations
Fix #6209 When trying to run `nix log <installable>`, try first to resolve the derivation pointed to by `<installable>` as it is the resolved one that holds the build log. This has a couple of shortcomings: 1. It’s expensive as it requires re-reading the derivation 2. It’s brittle because if the derivation doesn’t exist anymore or can’t be resolved (which is the case if any one of its build inputs is missing), then we can’t access the log anymore However, I don’t think we can do better (at least not right now). The alternatives I see are: 1. Copy the build log for the un-resolved derivation. But that means a lot of duplication 2. Store the results of the resolving in the db. Which might be the best long-term solution, but leads to a whole new class of potential issues.
Diffstat (limited to 'tests/build-remote.sh')
-rw-r--r--tests/build-remote.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/build-remote.sh b/tests/build-remote.sh
index e73c37ea4..25a482003 100644
--- a/tests/build-remote.sh
+++ b/tests/build-remote.sh
@@ -63,12 +63,9 @@ nix path-info --store $TEST_ROOT/machine3 --all \
| grep builder-build-remote-input-3.sh
-# Temporarily disabled because of https://github.com/NixOS/nix/issues/6209
-if [[ -z "$CONTENT_ADDRESSED" ]]; then
- for i in input1 input3; do
- nix log --store $TEST_ROOT/machine0 --file "$file" --arg busybox $busybox passthru."$i" | grep hi-$i
- done
-fi
+for i in input1 input3; do
+nix log --store $TEST_ROOT/machine0 --file "$file" --arg busybox $busybox passthru."$i" | grep hi-$i
+done
# Behavior of keep-failed
out="$(nix-build 2>&1 failing.nix \