diff --git a/doc/dev-notes.txt b/doc/dev-notes.txt index cdba0c48..56c25649 100644 --- a/doc/dev-notes.txt +++ b/doc/dev-notes.txt @@ -93,7 +93,9 @@ # Add the isCurrent column to Builds and use the obsolete Jobs.active to fill it in. alter table builds add column isCurrent integer default 0; update builds set isCurrent = 1 where id in (select max(id) from builds natural join (select distinct b.project, b.jobset, b.job, b.system from builds b join (select project, jobset, name from jobs where active = 1) j on b.project = j.project and b.jobset = j.jobset and b.job = j.name) b2 group by project, jobset, job, system); - + + alter table Jobsets add column enabled integer not null default 1; + * Job selection: diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 4ddc0ef5..786fd47b 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -114,6 +114,7 @@ sub updateJobset { , description => trim($c->request->params->{"description"}) , nixexprpath => $nixExprPath , nixexprinput => $nixExprInput + , enabled => trim($c->request->params->{enabled}) eq "1" ? 1 : 0 }); my %inputNames; diff --git a/src/lib/Hydra/Schema.pm b/src/lib/Hydra/Schema.pm index 39973598..18602efc 100644 --- a/src/lib/Hydra/Schema.pm +++ b/src/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uBemU8brohK9UDFJ9KC1iA +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vdr83mcEie4i5Fn/Uj17Vg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildInputs.pm b/src/lib/Hydra/Schema/BuildInputs.pm index 34f48d14..5fdb0d4a 100644 --- a/src/lib/Hydra/Schema/BuildInputs.pm +++ b/src/lib/Hydra/Schema/BuildInputs.pm @@ -103,8 +103,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3l2Qu/wpPEb/xsXoyeRviQ +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yodYRloko+NdaEVy+IL5JA use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/Schema/BuildProducts.pm b/src/lib/Hydra/Schema/BuildProducts.pm index a0079cf9..ab0ecd3f 100644 --- a/src/lib/Hydra/Schema/BuildProducts.pm +++ b/src/lib/Hydra/Schema/BuildProducts.pm @@ -91,8 +91,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/AUVD2QjjkeQmFkKEim0Gw +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GdjLBqXz+LK4ewxnpIs9eQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildResultInfo.pm b/src/lib/Hydra/Schema/BuildResultInfo.pm index 12b47e28..4554c2e0 100644 --- a/src/lib/Hydra/Schema/BuildResultInfo.pm +++ b/src/lib/Hydra/Schema/BuildResultInfo.pm @@ -86,8 +86,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L/qLimgzcHeLjsKom3t1XQ +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KTPvLaqbXGpynWt107ISew __PACKAGE__->belongs_to( "failedDep", diff --git a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm index 1ed5125b..87bc2d1d 100644 --- a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm +++ b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm @@ -43,8 +43,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I2cNoG9FOWDlICSy4Ndftw +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:thMie1PGP25FGbo5qypE/w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildSteps.pm b/src/lib/Hydra/Schema/BuildSteps.pm index 3cd3e6d1..60bd120c 100644 --- a/src/lib/Hydra/Schema/BuildSteps.pm +++ b/src/lib/Hydra/Schema/BuildSteps.pm @@ -91,7 +91,7 @@ __PACKAGE__->set_primary_key("build", "stepnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oCn8y9Nsffa6WOnm44lyqQ +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ua+P31BMRmMKP6QFOdA89A 1; diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 913e96d3..60fca2f1 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -163,8 +163,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8r7Yv4O8WF2YU4sOjn0Q8w +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:luxYxoOAtLoCgl5iFTYdJA use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/Schema/CachedPathInputs.pm b/src/lib/Hydra/Schema/CachedPathInputs.pm index f941d7ac..9c5f4a51 100644 --- a/src/lib/Hydra/Schema/CachedPathInputs.pm +++ b/src/lib/Hydra/Schema/CachedPathInputs.pm @@ -47,8 +47,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("srcpath", "sha256hash"); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eLemrXw7iydgI6zhFrghRg +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DeoyeS42ddQ2FXa+8n31OQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/CachedSubversionInputs.pm b/src/lib/Hydra/Schema/CachedSubversionInputs.pm index c92b6153..aa5a758e 100644 --- a/src/lib/Hydra/Schema/CachedSubversionInputs.pm +++ b/src/lib/Hydra/Schema/CachedSubversionInputs.pm @@ -40,8 +40,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("uri", "revision"); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f2Xn8X5aO9Gud7LHrc/b2g +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CaFTGQtLjPwCISqk5W4fag # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Jobs.pm b/src/lib/Hydra/Schema/Jobs.pm index 687d8eda..4f27c1bc 100644 --- a/src/lib/Hydra/Schema/Jobs.pm +++ b/src/lib/Hydra/Schema/Jobs.pm @@ -75,8 +75,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w5CXchrT0/ueNgxnKv6TPg +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+Cb0mIbX8ddDbZY39u9feA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/JobsetInputAlts.pm b/src/lib/Hydra/Schema/JobsetInputAlts.pm index 760a82ec..76f1d258 100644 --- a/src/lib/Hydra/Schema/JobsetInputAlts.pm +++ b/src/lib/Hydra/Schema/JobsetInputAlts.pm @@ -69,8 +69,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CQg509K7bBReX30DeMC7ww +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m3a1Q6c2FePidqbqYhz5dg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/JobsetInputs.pm b/src/lib/Hydra/Schema/JobsetInputs.pm index 2ba76da6..14188fec 100644 --- a/src/lib/Hydra/Schema/JobsetInputs.pm +++ b/src/lib/Hydra/Schema/JobsetInputs.pm @@ -65,8 +65,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FzkQQT8t8OET0a0teF3lHA +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QSYSg5xsN292LnfvbAG0Vw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Jobsets.pm b/src/lib/Hydra/Schema/Jobsets.pm index bb924e75..892450f2 100644 --- a/src/lib/Hydra/Schema/Jobsets.pm +++ b/src/lib/Hydra/Schema/Jobsets.pm @@ -67,6 +67,8 @@ __PACKAGE__->add_columns( is_nullable => 1, size => undef, }, + "enabled", + { data_type => "integer", default_value => 1, is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("project", "name"); __PACKAGE__->has_many( @@ -101,8 +103,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eu0jlMKE2aMvQRv4LynlIA +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:85FwtlvNxjGix7PUCJTMqA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Projects.pm b/src/lib/Hydra/Schema/Projects.pm index 76b95acd..cebd29e4 100644 --- a/src/lib/Hydra/Schema/Projects.pm +++ b/src/lib/Hydra/Schema/Projects.pm @@ -76,8 +76,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aBN2ry0QEPIhQu6tlgk7RQ +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Dru36PNUe9iYHEwhhHKJ3A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ReleaseSetJobs.pm b/src/lib/Hydra/Schema/ReleaseSetJobs.pm index 5b035bee..ad7f9abb 100644 --- a/src/lib/Hydra/Schema/ReleaseSetJobs.pm +++ b/src/lib/Hydra/Schema/ReleaseSetJobs.pm @@ -66,8 +66,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Mm9VR//LwfM88N54dtmuxg +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qSQjyHzxQp0qO3CbRdcXmw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ReleaseSets.pm b/src/lib/Hydra/Schema/ReleaseSets.pm index 676d7e48..bf3a2cd3 100644 --- a/src/lib/Hydra/Schema/ReleaseSets.pm +++ b/src/lib/Hydra/Schema/ReleaseSets.pm @@ -45,8 +45,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c6FKyR68F1a8wLivK9ztog +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pEjxqTAwP4ZmP/s6F4VOsg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/SystemTypes.pm b/src/lib/Hydra/Schema/SystemTypes.pm index 710262d1..99c87e8d 100644 --- a/src/lib/Hydra/Schema/SystemTypes.pm +++ b/src/lib/Hydra/Schema/SystemTypes.pm @@ -21,8 +21,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("system"); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SYnu+3J84FXFqkSu8jxkPg +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mfZTzyri5eSRhfmBmwyuFQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/UserRoles.pm b/src/lib/Hydra/Schema/UserRoles.pm index 8b0843e4..39752056 100644 --- a/src/lib/Hydra/Schema/UserRoles.pm +++ b/src/lib/Hydra/Schema/UserRoles.pm @@ -28,8 +28,8 @@ __PACKAGE__->set_primary_key("username", "role"); __PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" }); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pRBijh3yc0x4knK6tU4iTw +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6RgJY04rmD+PumWXz5KGoQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Users.pm b/src/lib/Hydra/Schema/Users.pm index 263fc3ab..d0dbee72 100644 --- a/src/lib/Hydra/Schema/Users.pm +++ b/src/lib/Hydra/Schema/Users.pm @@ -50,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-02 15:59:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d4m+IH9KxIcgId+XF23txg +# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-10-08 13:25:04 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZWzljXMF0IbU12wNUn+djg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/root/jobset.tt b/src/root/jobset.tt index 705c08bf..49e20e5d 100644 --- a/src/root/jobset.tt +++ b/src/root/jobset.tt @@ -72,6 +72,12 @@ [% INCLUDE maybeEditString param="nixexprinput" value=jobset.nixexprinput extraClass="shortString" %] + + Enabled: + + [% INCLUDE renderSelection param="enabled" curValue=jobset.enabled options={"1" = "Yes", "0" = "No"} %] + + [% IF !edit %] Last checked: diff --git a/src/script/hydra_scheduler.pl b/src/script/hydra_scheduler.pl index c1b44cc6..3122cb40 100755 --- a/src/script/hydra_scheduler.pl +++ b/src/script/hydra_scheduler.pl @@ -492,7 +492,8 @@ sub checkJobsetWrapped { sub checkJobs { foreach my $project ($db->resultset('Projects')->search({enabled => 1})) { print "considering project ", $project->name, "\n"; - checkJobsetWrapped($project, $_) foreach $project->jobsets->all; + checkJobsetWrapped($project, $_) + foreach $project->jobsets->search({enabled => 1}); } } diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 146a2fe1..bf651b5f 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -201,6 +201,7 @@ create table Jobsets ( errorMsg text, -- used to signal the last evaluation error etc. for this jobset errorTime integer, -- timestamp associated with errorMsg lastCheckedTime integer, -- last time the scheduler looked at this jobset + enabled integer not null default 1, primary key (project, name), foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite foreign key (project, name, nixExprInput) references JobsetInputs(project, jobset, name) @@ -268,7 +269,7 @@ create table Jobs ( firstEvalTime integer, -- first time the scheduler saw this job lastEvalTime integer, -- last time the scheduler saw this job - disabled integer not null default 0, + disabled integer not null default 0, -- !!! not currently used primary key (project, jobset, name), foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite