* Store jobset evaluations in the database explicitly. This includes
recording the builds that are part of a jobset evaluation. We need this to be able to answer queries such as "return the latest NixOS ISO for which the installation test succeeded". This wasn't previously possible because the database didn't record which builds of (say) the `isoMinimal' job and the `tests.installer.simple' job came from the same evaluation of the nixos:trunk jobset. Keeping a record of evaluations is also useful for logging purposes.
This commit is contained in:
@ -74,7 +74,7 @@ sub fetchInputPath {
|
||||
|
||||
# Some simple caching: don't check a path more than once every N seconds.
|
||||
(my $cachedInput) = $db->resultset('CachedPathInputs')->search(
|
||||
{srcpath => $uri, lastseen => {">", $timestamp - 60}},
|
||||
{srcpath => $uri, lastseen => {">", $timestamp - 30}},
|
||||
{rows => 1, order_by => "lastseen DESC"});
|
||||
|
||||
if (defined $cachedInput && isValidPath($cachedInput->storepath)) {
|
||||
@ -505,7 +505,7 @@ sub checkBuild {
|
||||
my @previousBuilds = $job->builds->search({outPath => $outPath, isCurrent => 1});
|
||||
if (scalar(@previousBuilds) > 0) {
|
||||
print STDERR "already scheduled/built\n";
|
||||
$currentBuilds->{$_->id} = 1 foreach @previousBuilds;
|
||||
$currentBuilds->{$_->id} = 0 foreach @previousBuilds;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user