Merge pull request #1098 from helsinki-systems/fix/hydra-eval-jobset
hydra-eval-jobset: Fix two minor bugs
This commit is contained in:
commit
d68032dd13
|
@ -607,7 +607,7 @@ sub checkJobsetWrapped {
|
||||||
updateDeclarativeJobset($db, $project, ".jobsets", $declSpec);
|
updateDeclarativeJobset($db, $project, ".jobsets", $declSpec);
|
||||||
$jobset->discard_changes;
|
$jobset->discard_changes;
|
||||||
$inputInfo->{"declInput"} = [ $declInput ];
|
$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 {
|
} else {
|
||||||
|
@ -652,7 +652,7 @@ sub checkJobsetWrapped {
|
||||||
my @args = ($jobset->nixexprinput // "", $jobset->nixexprpath // "", inputsToArgs($inputInfo));
|
my @args = ($jobset->nixexprinput // "", $jobset->nixexprpath // "", inputsToArgs($inputInfo));
|
||||||
my $argsHash = sha256_hex("@args");
|
my $argsHash = sha256_hex("@args");
|
||||||
my $prevEval = getPrevJobsetEval($db, $jobset, 0);
|
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";
|
print STDERR " jobset is unchanged, skipping\n";
|
||||||
Net::Statsd::increment("hydra.evaluator.unchanged_checkouts");
|
Net::Statsd::increment("hydra.evaluator.unchanged_checkouts");
|
||||||
$db->txn_do(sub {
|
$db->txn_do(sub {
|
||||||
|
|
Loading…
Reference in a new issue