From d46ebeea99b034927a0f0b05150bd350c43a31a0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Sep 2013 16:21:16 +0200 Subject: [PATCH] Distinguish between permanent evaluation errors and transient input errors Fixes #112. --- src/lib/Hydra/Helper/AddBuilds.pm | 5 +---- src/lib/Hydra/Schema/Jobsets.pm | 11 +++++++++-- src/root/jobset.tt | 8 ++++---- src/script/hydra-evaluator | 20 +++++++++++++++----- src/sql/hydra.sql | 1 + src/sql/upgrade-22.sql | 1 + 6 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 src/sql/upgrade-22.sql diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 220f2bd6..62232068 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -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"; diff --git a/src/lib/Hydra/Schema/Jobsets.pm b/src/lib/Hydra/Schema/Jobsets.pm index 49e57b85..f31a75f7 100644 --- a/src/lib/Hydra/Schema/Jobsets.pm +++ b/src/lib/Hydra/Schema/Jobsets.pm @@ -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; diff --git a/src/root/jobset.tt b/src/root/jobset.tt index d3645b24..72f939e6 100644 --- a/src/root/jobset.tt +++ b/src/root/jobset.tt @@ -43,7 +43,7 @@