From c7d38b1d96551d9d39e3a1d5e50177773ac401cc Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 4 Feb 2024 12:23:55 +0100 Subject: [PATCH] Always check for build availability Now that we don't assume the local store anymore, but use the BINARY_CACHE_STORE which is effectively `openStore(store_uri)`, it doesn't really matter where the store is. Also, this doesn't seem too expensive for at most 5 build outputs. --- src/lib/Hydra/Controller/Build.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index fff594059..6d93ef647 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -79,9 +79,7 @@ sub build_GET { # XXX: If the derivation is content-addressed then this will always return # false because `$_->path` will be empty $c->stash->{available} = - $c->stash->{isLocalStore} - ? all { $_->path && $BINARY_CACHE_STORE->isValidPath($_->path) } $build->buildoutputs->all - : 1; + all { $_->path && $BINARY_CACHE_STORE->isValidPath($_->path) } $build->buildoutputs->all; $c->stash->{drvAvailable} = $MACHINE_LOCAL_STORE->isValidPath($build->drvpath); if ($build->finished && $build->iscachedbuild) {