* Support variant builds.
[?]
Nov 6, 2008, 6:26 PM
M552HLIAP52D42AVXVC5SGROAYN2TBCEUZOXESWEMBBUX7G3U6TACDependencies
- [2]
7LKUAIGC - [3]
UMBR3VG3 - [4]
VCOSLZRP - [5]
IMY5UQE3 - [6]
N22GPKYT* Put info about logs / build products in the DB. - [7]
GWCV3TQV* BuildInputs table: link to dependencies, include store paths. - [8]
WYN733ST* Store build duration, handle cached builds. - [9]
J5UVLXOK* Start of a basic Catalyst web interface. - [10]
PHX2HIVG* Store info about the build inputs in the build record. - [11]
X27GNHDV* Basic job info in the database. - [12]
ELCI5T2A* Show the latest build for each job. - [13]
5QJP6JHS* Get dependencies from the database. - [14]
UVMFS73T* Some jQuery / CSS hackery.
Change contents
- replacement in src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm at line 32
$c->stash->{allBuilds} = [$c->model('DB::Builds')->all];$c->stash->{allBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "timestamp DESC"})]; - edit in src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm at line 27
"value",{ data_type => "VARCHAR", is_nullable => 0, size => undef }, - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm at line 38
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wqjRb/WbGiyFTBcu8QId3Q# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZDtFSXPegKbVEAoM+svosg - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm at line 28
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lU3XutG22RG9DJdxziFlgg# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YwyZF3sTsIWvkKAQ5fPtMQ - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm at line 28
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lfykD1HZfuy+uc7JM1sVCA# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m2mxFOI2ZgjLoAzbNhiDlw - edit in src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm at line 37
"system",{ data_type => "text", is_nullable => 0, size => undef }, - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm at line 58
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bneV9O2uXIrg3Wuencuj+Q# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jcNXcVLLxMEddBCUkq5aYg - file addition: Jobsetinputalts.pm[6.3332]
package HydraFrontend::Schema::Jobsetinputalts;use strict;use warnings;use base 'DBIx::Class';__PACKAGE__->load_components("Core");__PACKAGE__->table("jobSetInputAlts");__PACKAGE__->add_columns("project",{ data_type => "text", is_nullable => 0, size => undef },"jobset",{ data_type => "text", is_nullable => 0, size => undef },"input",{ data_type => "text", is_nullable => 0, size => undef },"altnr",{ data_type => "integer", is_nullable => 0, size => undef },"uri",{ data_type => "text", is_nullable => 0, size => undef },"revision",{ data_type => "integer", is_nullable => 0, size => undef },"tag",{ data_type => "text", is_nullable => 0, size => undef },"value",{ data_type => "text", is_nullable => 0, size => undef },);__PACKAGE__->set_primary_key("project", "jobset", "input", "altnr");__PACKAGE__->belongs_to("jobsetinput","HydraFrontend::Schema::Jobsetinputs",{ jobset => "jobset", name => "input", project => "project" },);# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YK+TrYs5Zk+8q+66b3kOUw# You can replace this text with custom content, and it will be preserved on regeneration1; - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 13
"job","jobset", - edit in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 18
{ data_type => "text", is_nullable => 0, size => undef },"uri", - edit in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 19
"revision",{ data_type => "integer", is_nullable => 0, size => undef },"tag",{ data_type => "text", is_nullable => 0, size => undef }, - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 20
__PACKAGE__->set_primary_key("project", "job", "name");__PACKAGE__->set_primary_key("project", "jobset", "name"); - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 33
{ name => "job", project => "project" },{ name => "jobset", project => "project" },);__PACKAGE__->has_many("jobsetinputalts","HydraFrontend::Schema::Jobsetinputalts",{"foreign.input" => "self.name","foreign.jobset" => "self.jobset","foreign.project" => "self.project",}, - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 46
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fKqDK1YOZXl88jxNRwEvSA# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H0KE/7kJ23s4RKFDVRIyUQ - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm at line 36
{ "foreign.job" => "self.name", "foreign.project" => "self.project" },{"foreign.jobset" => "self.name","foreign.project" => "self.project",}, - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm at line 43
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R+xsUdoLpQ7JnbZagpMqJQ# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JksbkRjqTKzHQkOvUkt2g - replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm at line 22
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PpPVJuiXpYbj8HN3sA05Gw# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F3bS3Kbsxhp9G6klfVPRmg - replacement in src/HydraFrontend/lib/HydraFrontend/Schema.pm at line 11
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m+4HRK3Cwlb1lbJ+twj8zw# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-06 19:19:17# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DQCaurV1oArj0odoPHR+zw - edit in src/HydraFrontend/root/build.tt at line 60
<tr><th>System:</th><td><tt>[% build.system %]</tt></td> - edit in src/HydraFrontend/root/build.tt at line 90
[% ELSIF input.type == "string" %]<tt>"[% input.value %]"</tt></a> - replacement in src/HydraFrontend/root/build.tt at line 139
<tr><th>Build</th><th>Input name</th><th>Timestamp</th></tr><tr><th>Build</th><th>Input name</th><th>System</th><th>Timestamp</th></tr> - edit in src/HydraFrontend/root/build.tt at line 146
<td><tt>[% input.buildid.system %]</tt></td> - replacement in src/HydraFrontend/root/index.tt at line 9
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr><tr><th></th><th>#</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr> - replacement in src/HydraFrontend/root/index.tt at line 24
<tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr><tr><th></th><th>#</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr> - replacement in src/HydraFrontend/root/job.tt at line 6
<tr><th></th><th>Id</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr><tr><th></th><th>Id</th><th>Project</th><th>Job</th><th>System</th><th>Timestamp</th><th>Description</th></tr> - edit in src/HydraFrontend/root/short-build-info.tt at line 14
<td><tt>[% build.system %]</tt></td> - replacement in src/hydra.sql at line 20
stopTime integerstopTime integer,system text not null - edit in src/hydra.sql at line 34
value text, - replacement in src/hydra.sql at line 37
path text not null,path text, - replacement in src/hydra.sql at line 97
job text not null,jobset text not null, - replacement in src/hydra.sql at line 99
type text not null, -- "svn", "cvs", "path", "file"type text not null, -- "svn", "cvs", "path", "file", "string"primary key (project, jobset, name),foreign key (project, jobset) references jobSets(project, name) on delete cascade -- ignored by sqlite);create table jobSetInputAlts (project text not null,jobset text not null,input text not null,altnr integer,-- urgh - replacement in src/hydra.sql at line 113
revision integer, -- for svntag text, -- for cvsprimary key (project, job, name),foreign key (project, job) references jobSets(project, name) on delete cascade -- ignored by sqliterevision integer, -- for type == 'svn'tag text, -- for type == 'cvs'value text, -- for type == 'string'primary key (project, jobset, input, altnr),foreign key (project, jobset, input) references jobSetInputs(project, jobset, name) on delete cascade -- ignored by sqlite - replacement in src/scheduler.pl at line 19
my ($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs) = @_;my ($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs, $system) = @_; - edit in src/scheduler.pl at line 57
, system => $system - replacement in src/scheduler.pl at line 63
if (defined $input->{orig}) {$db->resultset('Buildinputs')->create({ buildid => $build->id, name => $inputName, type => $input->{orig}->type, uri => $input->{orig}->uri, revision => $input->{orig}->revision, tag => $input->{orig}->tag, path => $input->{storePath}});} else {$db->resultset('Buildinputs')->create({ buildid => $build->id, name => $inputName, type => "build", inputid => $input->{id}, path => $input->{storePath}});}$db->resultset('Buildinputs')->create({ buildid => $build->id, name => $inputName, type => $input->{type}, uri => $input->{uri}#, revision => $input->{orig}->revision#, tag => $input->{orig}->tag, value => $input->{value}, inputid => $input->{id}, path => ($input->{storePath} or "") # !!! temporary hack}); - replacement in src/scheduler.pl at line 115
my ($input, $inputInfo) = @_;my ($input, $alt, $inputInfo) = @_; - edit in src/scheduler.pl at line 117
my $uri = $input->uri; - edit in src/scheduler.pl at line 119
my $uri = $alt->uri; - replacement in src/scheduler.pl at line 124
$$inputInfo{$input->name} = {orig => $input, storePath => $storePath};$$inputInfo{$input->name} = {type => $type, uri => $uri, storePath => $storePath}; - edit in src/scheduler.pl at line 127
elsif ($type eq "string") {die unless defined $alt->value;$$inputInfo{$input->name} = {type => $type, value => $alt->value};} - replacement in src/scheduler.pl at line 138
sub checkJobSet {my ($project, $jobset) = @_;my $inputInfo = {};foreach my $input ($jobset->jobsetinputs) {print " INPUT ", $input->name, " (", $input->type, " ", $input->uri, ")\n";fetchInput($input, $inputInfo);}sub checkJobSetInstance {my ($project, $jobset, $inputInfo) = @_; - edit in src/scheduler.pl at line 176
my $storePath; - edit in src/scheduler.pl at line 179
$storePath = $inputInfo->{$argName}->{storePath}; - edit in src/scheduler.pl at line 180
if (defined $inputInfo->{$argName}->{storePath}) {# !!! escaping$extraArgs .= " --arg $argName '{path = builtins.toPath " . $inputInfo->{$argName}->{storePath} . ";}'";} elsif (defined $inputInfo->{$argName}->{value}) {$extraArgs .= " --argstr $argName '" . $inputInfo->{$argName}->{value} . "'";} - edit in src/scheduler.pl at line 192
my $storePath; - replacement in src/scheduler.pl at line 195
if (defined $prevBuild) {# The argument name matches a previously built# job in this jobset. Pick the most recent# build. !!! refine the selection criteria:# e.g., most recent successful build.if (!isValidPath($prevBuild->outpath)) {die "input path " . $prevBuild->outpath . " has been garbage-collected";}$storePath = $prevBuild->outpath;} else {if (!defined $prevBuild) { - edit in src/scheduler.pl at line 198
}# The argument name matches a previously built# job in this jobset. Pick the most recent# build. !!! refine the selection criteria:# e.g., most recent successful build.if (!isValidPath($prevBuild->outpath)) {die "input path " . $prevBuild->outpath . " has been garbage-collected"; - edit in src/scheduler.pl at line 207
- replacement in src/scheduler.pl at line 209
{ storePath => $storePath{ type => "build", storePath => $prevBuild->outpath - edit in src/scheduler.pl at line 213
$extraArgs .= " --arg $argName '{path = builtins.toPath " . $prevBuild->outpath . ";}'"; - edit in src/scheduler.pl at line 216
$extraArgs .= " --arg $argName '{path = " . $storePath . ";}'"; - edit in src/scheduler.pl at line 220
print $extraArgs, "\n"; - replacement in src/scheduler.pl at line 233
die unless !defined $job || $job->{system} ne $jobName;die if !defined $job || $job->{attrPath} ne $jobName; - edit in src/scheduler.pl at line 238
buildJob($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs, $job->{system});}};sub checkJobSetAlts {my ($project, $jobset, $inputs, $n, $inputInfo) = @_;if ($n >= scalar @{$inputs}) {checkJobSetInstance($project, $jobset, $inputInfo);return;} - replacement in src/scheduler.pl at line 252
buildJob($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs);my $input = @{$inputs}[$n];foreach my $alt ($input->jobsetinputalts) {print " INPUT ", $input->name, " (type ", $input->type, ") alt ", $alt->altnr, "\n";fetchInput($input, $alt, $inputInfo); # !!! cachingcheckJobSetAlts($project, $jobset, $inputs, $n + 1, $inputInfo); - edit in src/scheduler.pl at line 259
};sub checkJobSet {my ($project, $jobset) = @_;my $inputInfo = {};my @jobsetinputs = $jobset->jobsetinputs;checkJobSetAlts($project, $jobset, \@jobsetinputs, 0, $inputInfo); - replacement in src/test.sql at line 3
insert into jobSetInputs(project, job, name, type, uri) values('patchelf', 'trunk', 'patchelfSrc', 'path', '/home/eelco/Dev/patchelf-wc');insert into jobSetInputs(project, job, name, type, uri) values('patchelf', 'trunk', 'nixpkgs', 'path', '/home/eelco/Dev/nixpkgs-wc');insert into jobSetInputs(project, job, name, type, uri) values('patchelf', 'trunk', 'release', 'path', '/home/eelco/Dev/release');insert into jobSetInputs(project, jobset, name, type) values('patchelf', 'trunk', 'patchelfSrc', 'path');insert into jobSetInputAlts(project, jobset, input, altnr, uri) values('patchelf', 'trunk', 'patchelfSrc', 0, '/home/eelco/Dev/patchelf-wc');insert into jobSetInputs(project, jobset, name, type) values('patchelf', 'trunk', 'nixpkgs', 'path');insert into jobSetInputAlts(project, jobset, input, altnr, uri) values('patchelf', 'trunk', 'nixpkgs', 0, '/home/eelco/Dev/nixpkgs-wc');insert into jobSetInputs(project, jobset, name, type) values('patchelf', 'trunk', 'release', 'path');insert into jobSetInputAlts(project, jobset, input, altnr, uri) values('patchelf', 'trunk', 'release', 0, '/home/eelco/Dev/release');insert into jobSetInputs(project, jobset, name, type) values('patchelf', 'trunk', 'system', 'string');insert into jobSetInputAlts(project, jobset, input, altnr, value) values('patchelf', 'trunk', 'system', 0, 'i686-linux');insert into jobSetInputAlts(project, jobset, input, altnr, value) values('patchelf', 'trunk', 'system', 1, 'x86_64-linux');