Prevent multiple builds with the same (job, outPath) tuple from being added
This happened in a pathological case in Nixpkgs: the "grub" job is evaluated for i686-linux and x86_64-linux, but in the latter case it returns the same derivation as in the former case. So only one build should be added.
This commit is contained in:
@ -124,6 +124,8 @@ sub checkJobset {
|
||||
my ($jobs, $nixExprInput) = evalJobs($inputInfo, $jobset->nixexprinput, $jobset->nixexprpath);
|
||||
my $evalStop = time;
|
||||
|
||||
my $jobOutPathMap = {};
|
||||
|
||||
txn_do($db, sub {
|
||||
|
||||
my $prevEval = getPrevJobsetEval($db, $jobset, 1);
|
||||
@ -138,7 +140,7 @@ sub checkJobset {
|
||||
foreach my $job (permute @{$jobs->{job}}) {
|
||||
next if $job->{jobName} eq "";
|
||||
print STDERR " considering job " . $project->name, ":", $jobset->name, ":", $job->{jobName} . "\n";
|
||||
checkBuild($db, $project, $jobset, $inputInfo, $nixExprInput, $job, \%buildIds, $prevEval);
|
||||
checkBuild($db, $project, $jobset, $inputInfo, $nixExprInput, $job, \%buildIds, $prevEval, $jobOutPathMap);
|
||||
}
|
||||
|
||||
# Update the last checked times and error messages for each
|
||||
|
Reference in New Issue
Block a user