Skip to content

Commit

Permalink
Always check for build availability
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ma27 committed Feb 12, 2024
1 parent 1ca8aad commit c7d38b1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/Hydra/Controller/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c7d38b1

Please sign in to comment.