forked from lix-project/hydra
hydra-eval-jobset: Fix two minor bugs
I'm honestly too lazy to create two commits for fixing these one-line issues so here's one. The first hunk fixes the name of the projectName input. This is relevant now because it gets logged and the log message looks stupid when there is an input without a name. The second hunk fixes a warning when using declarative non-flake jobsets. The implementation may look weird but it's just the same as the logical implication operator of nix.
This commit is contained in:
parent
0484f13a1a
commit
a69693a832
|
@ -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