forked from lix-project/hydra
Distinguish between permanent evaluation errors and transient input errors
Fixes #112.
This commit is contained in:
parent
e1c9e28589
commit
d46ebeea99
|
@ -88,10 +88,7 @@ sub fetchInputBuild {
|
|||
{ order_by => "me.id DESC", rows => 1
|
||||
, where => \ attrsToSQL($attrs, "me.id") });
|
||||
|
||||
if (!defined $prevBuild || !isValidPath(getMainOutput($prevBuild)->path)) {
|
||||
print STDERR "input `", $name, "': no previous build available\n";
|
||||
return ();
|
||||
}
|
||||
return () if !defined $prevBuild || !isValidPath(getMainOutput($prevBuild)->path);
|
||||
|
||||
#print STDERR "input `", $name, "': using build ", $prevBuild->id, "\n";
|
||||
|
||||
|
|
|
@ -124,6 +124,11 @@ __PACKAGE__->table("Jobsets");
|
|||
default_value: 100
|
||||
is_nullable: 0
|
||||
|
||||
=head2 fetcherrormsg
|
||||
|
||||
data_type: 'text'
|
||||
is_nullable: 1
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
|
@ -159,6 +164,8 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "integer", default_value => 300, is_nullable => 0 },
|
||||
"schedulingshares",
|
||||
{ data_type => "integer", default_value => 100, is_nullable => 0 },
|
||||
"fetcherrormsg",
|
||||
{ data_type => "text", is_nullable => 1 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
@ -280,7 +287,7 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-09-20 12:15:23
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pD6tGW0Ob3fuA1p0uQnBWw
|
||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-09-25 14:10:28
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cAZ4+c7OhqGW8ATru8Foiw
|
||||
|
||||
1;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li>
|
||||
[% IF jobset.errormsg %]
|
||||
[% IF jobset.errormsg || jobset.fetcherrormsg %]
|
||||
<li><a href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li>
|
||||
[% END %]
|
||||
<li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<th>Last checked:</th>
|
||||
<td>
|
||||
[% IF jobset.lastcheckedtime %]
|
||||
[% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime %], [% IF jobset.errormsg %]<em class="text-warning">with errors!</em>[% ELSE %]<em>no errors</em>[% END %]
|
||||
[% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime %], [% IF jobset.errormsg || jobset.fetcherrormsg %]<em class="text-warning">with errors!</em>[% ELSE %]<em>no errors</em>[% END %]
|
||||
[% ELSE %]
|
||||
<em>never</em>
|
||||
[% END %]
|
||||
|
@ -91,10 +91,10 @@
|
|||
|
||||
</div>
|
||||
|
||||
[% IF jobset.errormsg %]
|
||||
[% IF jobset.errormsg || jobset.fetcherrormsg %]
|
||||
<div id="tabs-errors" class="tab-pane">
|
||||
<p>Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].</p>
|
||||
<pre class="alert alert-error">[% HTML.escape(jobset.errormsg) %]</pre>
|
||||
<pre class="alert alert-error">[% HTML.escape(jobset.fetcherrormsg || jobset.errormsg) %]</pre>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ sub setJobsetError {
|
|||
|
||||
eval {
|
||||
txn_do($db, sub {
|
||||
$jobset->update({errormsg => $errorMsg, errortime => time});
|
||||
$jobset->update({ errormsg => $errorMsg, errortime => time, fetcherrormsg => undef });
|
||||
});
|
||||
};
|
||||
if ($errorMsg ne $prevError) {
|
||||
|
@ -115,7 +115,17 @@ sub checkJobsetWrapped {
|
|||
|
||||
# Fetch all values for all inputs.
|
||||
my $checkoutStart = time;
|
||||
fetchInputs($project, $jobset, $inputInfo);
|
||||
eval {
|
||||
fetchInputs($project, $jobset, $inputInfo);
|
||||
};
|
||||
if ($@) {
|
||||
my $msg = $@;
|
||||
print STDERR $msg;
|
||||
txn_do($db, sub {
|
||||
$jobset->update({ lastcheckedtime => time, fetcherrormsg => $msg });
|
||||
});
|
||||
return;
|
||||
}
|
||||
my $checkoutStop = time;
|
||||
|
||||
# Hash the arguments to hydra-eval-jobs and check the
|
||||
|
@ -127,7 +137,7 @@ sub checkJobsetWrapped {
|
|||
if (defined $prevEval && $prevEval->hash eq $argsHash) {
|
||||
print STDERR " jobset is unchanged, skipping\n";
|
||||
txn_do($db, sub {
|
||||
$jobset->update({lastcheckedtime => time});
|
||||
$jobset->update({ lastcheckedtime => time, fetcherrormsg => undef });
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -253,7 +263,7 @@ sub checkJobsetWrapped {
|
|||
}
|
||||
$msg .=
|
||||
($error->{location} ne "" ? "in job ‘$error->{location}’" : "at top-level") .
|
||||
" [$bindings]:\n" . $error->{msg} . "\n\n";
|
||||
":\n" . $error->{msg} . "\n\n";
|
||||
}
|
||||
setJobsetError($jobset, $msg);
|
||||
}
|
||||
|
@ -275,7 +285,7 @@ sub checkJobset {
|
|||
|
||||
if ($@) {
|
||||
my $msg = $@;
|
||||
print STDERR "error evaluating jobset ", $jobset->name, ": $msg";
|
||||
print STDERR $msg;
|
||||
txn_do($db, sub {
|
||||
$jobset->update({lastcheckedtime => time});
|
||||
setJobsetError($jobset, $msg);
|
||||
|
|
|
@ -62,6 +62,7 @@ create table Jobsets (
|
|||
keepnr integer not null default 3,
|
||||
checkInterval integer not null default 300, -- minimum time in seconds between polls (0 = disable polling)
|
||||
schedulingShares integer not null default 100,
|
||||
fetchErrorMsg text,
|
||||
primary key (project, name),
|
||||
foreign key (project) references Projects(name) on delete cascade on update cascade
|
||||
#ifdef SQLITE
|
||||
|
|
1
src/sql/upgrade-22.sql
Normal file
1
src/sql/upgrade-22.sql
Normal file
|
@ -0,0 +1 @@
|
|||
alter table Jobsets add column fetchErrorMsg text;
|
Loading…
Reference in a new issue