forked from lix-project/hydra
Pass failing dependent builds to buildFinished
This commit is contained in:
parent
44b8d6f449
commit
038db3abeb
|
@ -37,7 +37,7 @@ sub nextFreeStepNr {
|
||||||
|
|
||||||
|
|
||||||
sub failDependents {
|
sub failDependents {
|
||||||
my ($drvPath, $errorMsg) = @_;
|
my ($drvPath, $errorMsg, $dependents) = @_;
|
||||||
|
|
||||||
# Get the referrer closure of $drvPath.
|
# Get the referrer closure of $drvPath.
|
||||||
my @dependentDrvs = computeFSClosure(1, 0, $drvPath);
|
my @dependentDrvs = computeFSClosure(1, 0, $drvPath);
|
||||||
|
@ -73,6 +73,8 @@ sub failDependents {
|
||||||
, errormsg => $errorMsg
|
, errormsg => $errorMsg
|
||||||
});
|
});
|
||||||
addBuildStepOutputs($step);
|
addBuildStepOutputs($step);
|
||||||
|
|
||||||
|
push @$dependents, $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -83,7 +85,7 @@ sub notify {
|
||||||
my ($build, $dependents) = @_;
|
my ($build, $dependents) = @_;
|
||||||
foreach my $plugin (@plugins) {
|
foreach my $plugin (@plugins) {
|
||||||
eval {
|
eval {
|
||||||
$plugin->buildFinished($build, []);
|
$plugin->buildFinished($build, $dependents);
|
||||||
};
|
};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
print STDERR "$plugin->buildFinished: $@\n";
|
print STDERR "$plugin->buildFinished: $@\n";
|
||||||
|
@ -111,6 +113,8 @@ sub doBuild {
|
||||||
|
|
||||||
my $errormsg = undef;
|
my $errormsg = undef;
|
||||||
|
|
||||||
|
my $dependents = [];
|
||||||
|
|
||||||
unless (all { isValidPath($_) } values(%outputs)) {
|
unless (all { isValidPath($_) } values(%outputs)) {
|
||||||
$isCachedBuild = 0;
|
$isCachedBuild = 0;
|
||||||
|
|
||||||
|
@ -204,7 +208,7 @@ sub doBuild {
|
||||||
});
|
});
|
||||||
|
|
||||||
# Immediately fail all builds that depend on this derivation.
|
# Immediately fail all builds that depend on this derivation.
|
||||||
failDependents($drvPathStep, $errorMsg);
|
failDependents($drvPathStep, $errorMsg, $dependents);
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif (/^@\s+substituter-started\s+(\S+)\s+(\S+)$/) {
|
elsif (/^@\s+substituter-started\s+(\S+)\s+(\S+)$/) {
|
||||||
|
@ -303,7 +307,7 @@ sub doBuild {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
notify($build, []);
|
notify($build, $dependents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue