* Support variant builds.

[?]
Nov 6, 2008, 6:26 PM
M552HLIAP52D42AVXVC5SGROAYN2TBCEUZOXESWEMBBUX7G3U6TAC

Dependencies

  • [2] 7LKUAIGC
  • [3] UMBR3VG3
  • [4] VCOSLZRP
  • [5] IMY5UQE3
  • [6] 5QJP6JHS * Get dependencies from the database.
  • [7] WYN733ST * Store build duration, handle cached builds.
  • [8] PHX2HIVG * Store info about the build inputs in the build record.
  • [9] N22GPKYT * Put info about logs / build products in the DB.
  • [10] J5UVLXOK * Start of a basic Catalyst web interface.
  • [11] ELCI5T2A * Show the latest build for each job.
  • [12] UVMFS73T * Some jQuery / CSS hackery.
  • [13] X27GNHDV * Basic job info in the database.
  • [14] GWCV3TQV * BuildInputs table: link to dependencies, include store paths.

Change contents

  • replacement in src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm at line 32
    [6.1449][6.0:61]()
    $c->stash->{allBuilds} = [$c->model('DB::Builds')->all];
    [6.1449]
    [6.61]
    $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
    [6.629]
    [6.629]
    "value",
    { data_type => "VARCHAR", is_nullable => 0, size => undef },
  • replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm at line 38
    [6.782][6.147:289]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wqjRb/WbGiyFTBcu8QId3Q
    [6.782]
    [6.924]
    # 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
    [6.3992][6.290:432]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lU3XutG22RG9DJdxziFlgg
    [6.3992]
    [6.4134]
    # 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
    [6.4922][6.433:575]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lfykD1HZfuy+uc7JM1sVCA
    [6.4922]
    [6.5064]
    # 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
    [6.1033]
    [6.5911]
    "system",
    { data_type => "text", is_nullable => 0, size => undef },
  • replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm at line 58
    [6.6194][6.576:718]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bneV9O2uXIrg3Wuencuj+Q
    [6.6194]
    [4.0]
    # 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 regeneration
    1;
  • replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 13
    [6.862][6.862:871]()
    "job",
    [6.862]
    [6.871]
    "jobset",
  • edit in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 18
    [6.1011][6.1011:1080]()
    { data_type => "text", is_nullable => 0, size => undef },
    "uri",
  • edit in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 19
    [6.1140][6.1140:1286]()
    "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
    [6.1289][6.1289:1345]()
    __PACKAGE__->set_primary_key("project", "job", "name");
    [6.1289]
    [6.1345]
    __PACKAGE__->set_primary_key("project", "jobset", "name");
  • replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm at line 33
    [6.1633][6.1633:1676]()
    { name => "job", project => "project" },
    [6.1633]
    [6.1676]
    { 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
    [6.1681][6.719:861]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fKqDK1YOZXl88jxNRwEvSA
    [6.1681]
    [6.1823]
    # 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
    [6.2914][6.2914:2987]()
    { "foreign.job" => "self.name", "foreign.project" => "self.project" },
    [6.2914]
    [6.2987]
    {
    "foreign.jobset" => "self.name",
    "foreign.project" => "self.project",
    },
  • replacement in src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm at line 43
    [6.2992][6.862:1004]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R+xsUdoLpQ7JnbZagpMqJQ
    [6.2992]
    [6.3134]
    # 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
    [6.3685][6.1005:1147]()
    # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PpPVJuiXpYbj8HN3sA05Gw
    [6.3685]
    [6.3827]
    # 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
    [6.6498][6.1148:1290]()
    # 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
    [6.6498]
    [6.6640]
    # 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
    [5.233]
    [5.233]
    <tr>
    <th>System:</th>
    <td><tt>[% build.system %]</tt></td>
  • edit in src/HydraFrontend/root/build.tt at line 90
    [3.256]
    [6.1675]
    [% ELSIF input.type == "string" %]
    <tt>"[% input.value %]"</tt></a>
  • replacement in src/HydraFrontend/root/build.tt at line 139
    [4.265][4.265:330]()
    <tr><th>Build</th><th>Input name</th><th>Timestamp</th></tr>
    [4.265]
    [4.330]
    <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
    [4.633]
    [4.633]
    <td><tt>[% input.buildid.system %]</tt></td>
  • replacement in src/HydraFrontend/root/index.tt at line 9
    [6.919][2.615:714]()
    <tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
    [6.919]
    [6.1003]
    <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
    [6.1172][2.715:814]()
    <tr><th></th><th>#</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
    [6.1172]
    [6.1255]
    <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
    [6.1493][2.815:913]()
    <tr><th></th><th>Id</th><th>Project</th><th>Job</th><th>Timestamp</th><th>Description</th></tr>
    [6.1493]
    [6.1575]
    <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
    [2.1137]
    [6.2431]
    <td><tt>[% build.system %]</tt></td>
  • replacement in src/hydra.sql at line 20
    [6.2144][6.2144:2170]()
    stopTime integer
    [6.2144]
    [6.2526]
    stopTime integer,
    system text not null
  • edit in src/hydra.sql at line 34
    [6.2805]
    [6.1817]
    value text,
  • replacement in src/hydra.sql at line 37
    [6.1891][6.1891:1924]()
    path text not null,
    [6.1891]
    [6.1924]
    path text,
  • replacement in src/hydra.sql at line 97
    [6.5268][6.5268:5301]()
    job text not null,
    [6.5268]
    [6.5301]
    jobset text not null,
  • replacement in src/hydra.sql at line 99
    [6.5334][6.5334:5399]()
    type text not null, -- "svn", "cvs", "path", "file"
    [6.5334]
    [6.5399]
    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
    [6.5423][6.5423:5642]()
    revision integer, -- for svn
    tag text, -- for cvs
    primary key (project, job, name),
    foreign key (project, job) references jobSets(project, name) on delete cascade -- ignored by sqlite
    [6.5423]
    [6.5642]
    revision 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
    [6.5777][6.2983:3059]()
    my ($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs) = @_;
    [6.5777]
    [6.1492]
    my ($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs, $system) = @_;
  • edit in src/scheduler.pl at line 57
    [6.6596]
    [6.6596]
    , system => $system
  • replacement in src/scheduler.pl at line 63
    [6.2107][6.2107:2904]()
    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}
    });
    }
    [6.2107]
    [6.3535]
    $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
    [6.6702][6.6702:6736]()
    my ($input, $inputInfo) = @_;
    [6.6702]
    [6.6736]
    my ($input, $alt, $inputInfo) = @_;
  • edit in src/scheduler.pl at line 117
    [6.6765][6.6765:6792]()
    my $uri = $input->uri;
  • edit in src/scheduler.pl at line 119
    [6.6820]
    [6.6820]
    my $uri = $alt->uri;
  • replacement in src/scheduler.pl at line 124
    [6.7002][6.3547:3626]()
    $$inputInfo{$input->name} = {orig => $input, storePath => $storePath};
    [6.7002]
    [6.7065]
    $$inputInfo{$input->name} = {type => $type, uri => $uri, storePath => $storePath};
  • edit in src/scheduler.pl at line 127
    [6.7072]
    [6.7072]
    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
    [6.7161][6.7161:7420]()
    sub checkJobSet {
    my ($project, $jobset) = @_;
    my $inputInfo = {};
    foreach my $input ($jobset->jobsetinputs) {
    print " INPUT ", $input->name, " (", $input->type, " ", $input->uri, ")\n";
    fetchInput($input, $inputInfo);
    }
    [6.7161]
    [6.7420]
    sub checkJobSetInstance {
    my ($project, $jobset, $inputInfo) = @_;
  • edit in src/scheduler.pl at line 176
    [6.8609][6.3672:3689](),[6.3689][6.153:184](),[6.8609][6.153:184]()
    my $storePath;
  • edit in src/scheduler.pl at line 179
    [6.296][6.296:366]()
    $storePath = $inputInfo->{$argName}->{storePath};
  • edit in src/scheduler.pl at line 180
    [6.3777]
    [6.3777]
    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
    [6.631]
    [6.3820]
    my $storePath;
  • replacement in src/scheduler.pl at line 195
    [6.3841][6.631:1226](),[6.631][6.631:1226]()
    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 {
    [6.3841]
    [6.1226]
    if (!defined $prevBuild) {
  • edit in src/scheduler.pl at line 198
    [6.1324]
    [6.1324]
    }
    # 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
    [6.1346]
    [6.2905]
  • replacement in src/scheduler.pl at line 209
    [6.2950][6.2950:3000]()
    { storePath => $storePath
    [6.2950]
    [6.3000]
    { type => "build"
    , storePath => $prevBuild->outpath
  • edit in src/scheduler.pl at line 213
    [6.3074]
    [6.1346]
    $extraArgs .= " --arg $argName '{path = builtins.toPath " . $prevBuild->outpath . ";}'";
  • edit in src/scheduler.pl at line 216
    [6.1364][6.3842:3859](),[6.3859][6.1364:1444](),[6.1364][6.1364:1444]()
    $extraArgs .= " --arg $argName '{path = " . $storePath . ";}'";
  • edit in src/scheduler.pl at line 220
    [6.8866]
    [6.8866]
    print $extraArgs, "\n";
  • replacement in src/scheduler.pl at line 233
    [6.9539][6.9539:9603]()
    die unless !defined $job || $job->{system} ne $jobName;
    [6.9539]
    [6.9603]
    die if !defined $job || $job->{attrPath} ne $jobName;
  • edit in src/scheduler.pl at line 238
    [6.9806]
    [6.9806]
    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
    [6.9807][6.3860:3940]()
    buildJob($project, $jobset, $jobName, $drvPath, $outPath, $usedInputs);
    [6.9807]
    [6.9874]
    my $input = @{$inputs}[$n];
    foreach my $alt ($input->jobsetinputalts) {
    print " INPUT ", $input->name, " (type ", $input->type, ") alt ", $alt->altnr, "\n";
    fetchInput($input, $alt, $inputInfo); # !!! caching
    checkJobSetAlts($project, $jobset, $inputs, $n + 1, $inputInfo);
  • edit in src/scheduler.pl at line 259
    [6.9880]
    [6.9880]
    };
    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
    [6.10391][6.10391:10795]()
    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');
    [6.10391]
    [6.10795]
    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');