Merge pull request #1098 from helsinki-systems/fix/hydra-eval-jobset

hydra-eval-jobset: Fix two minor bugs
This commit is contained in:
Graham Christensen 2022-01-10 13:20:56 -05:00 committed by GitHub
commit d68032dd13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,7 +607,7 @@ sub checkJobsetWrapped {
updateDeclarativeJobset($db, $project, ".jobsets", $declSpec);
$jobset->discard_changes;
$inputInfo->{"declInput"} = [ $declInput ];
$inputInfo->{"projectName"} = [ fetchInput($plugins, $db, $project, $jobset, "", "string", $project->name, 0) ];
$inputInfo->{"projectName"} = [ fetchInput($plugins, $db, $project, $jobset, "projectName", "string", $project->name, 0) ];
}
} else {
@ -652,7 +652,7 @@ sub checkJobsetWrapped {
my @args = ($jobset->nixexprinput // "", $jobset->nixexprpath // "", inputsToArgs($inputInfo));
my $argsHash = sha256_hex("@args");
my $prevEval = getPrevJobsetEval($db, $jobset, 0);
if (defined $prevEval && $prevEval->hash eq $argsHash && !$dryRun && !$jobset->forceeval && $prevEval->flake eq $flakeRef) {
if (defined $prevEval && $prevEval->hash eq $argsHash && !$dryRun && !$jobset->forceeval && (!defined($flakeRef) || ($prevEval->flake eq $flakeRef))) {
print STDERR " jobset is unchanged, skipping\n";
Net::Statsd::increment("hydra.evaluator.unchanged_checkouts");
$db->txn_do(sub {