hydra: when restarting a build, remove possible failed dependencies from the failed-cache.
This commit is contained in:
parent
f7ce960b96
commit
c174998a0c
|
@ -360,8 +360,12 @@ sub restart : Chained('build') PathPart Args(0) {
|
||||||
requireProjectOwner($c, $build->project);
|
requireProjectOwner($c, $build->project);
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
|
my $drvpath = $build->drvpath ;
|
||||||
error($c, "This build cannot be restarted.")
|
error($c, "This build cannot be restarted.")
|
||||||
unless $build->finished;
|
unless $build->finished && -f $drvpath ;
|
||||||
|
|
||||||
|
my $cmd = "`nix-store -qR $drvpath`";
|
||||||
|
my $r = `nix-store --clear-failed-paths $cmd`;
|
||||||
|
|
||||||
$build->update({finished => 0, timestamp => time});
|
$build->update({finished => 0, timestamp => time});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue