Merge the BuildSchedulingInfo table into the Builds table

[?]
Feb 29, 2012, 1:22 AM
MOX7XJ2E3XISXA7V7T4W6GEAGECGWBZ4PYSLTYBVVR4VAKOI33CQC

Dependencies

  • [2] ULHEOJO2 * Better timeout.
  • [3] H27UAGSX project with 0 build resulted in error
  • [4] QMPX3JDF * hydra: show queue optimization
  • [5] VZYX66Q3 * hydra: only show current jobs in status overview of jobset page
  • [6] C5XKS77N hydra: added missing fields to query
  • [7] DTXTS7LN * Speed up findBuildDependencyInQueue by doing only one SQL query for
  • [8] WOHG5MJD hydra: catalyst plain view doesn;t work with data => 0, so put some whitespace around it
  • [9] BAN2M7JI hydra: show all running builds on job page, in stead of only showing the 'current' builds that are running
  • [10] MMDLWWZ2 automatic reload of tail log when build is running
  • [11] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [12] HRAFVVOE make logo configurable via HYDRA_LOGO env var
  • [13] NP6QUCL7 * Fix indentation.
  • [14] E5DMQRPO Remove unnecessary whitespace in the HTML output
  • [15] 7DWCXNC7 Use the new Nix Perl bindings
  • [16] EDRUQ4UK Die TABs die
  • [17] SB2V735V Keep track of the database schema version
  • [18] 67NFGL7D add links in admin page to clear queue (all non-running builds, and all non-running old (non-current) builds)
  • [19] NORYRBVG 50 for related builds might be a kind of low, will start with 100
  • [20] KLRDG3HR Don't show duplicate builds in "Related builds"
  • [21] 3SQCOHZN * minor performance tweaks
  • [22] FHF6IZJQ * Basic release management: releases are now dynamically computed as
  • [23] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [24] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [25] J5UVLXOK * Start of a basic Catalyst web interface.
  • [26] TLZ2SPBR
  • [27] OV7F5M3E Merge branch 'queue-17'
  • [28] 2YXO5ZGQ Hydra/28: Rename "scheduler" to "evaluator"
  • [29] YTZOC7C5 * Editing of jobset inputs.
  • [30] NEWDDAOF * Allow users to change the value of a build's "keep" flag, which
  • [31] TULPZ62Y * Perform builds in parallel.
  • [32] TWVSALRL * Allow the maximum number of concurrent builds per platform to be
  • [33] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [34] CMU3YKOU * Store the release name.
  • [35] D5QIOJGP * Move everything up one directory.
  • [36] JM3DPYOM generated schema with new dbix class schema loader, grrrrrr
  • [37] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [38] PHX2HIVG * Store info about the build inputs in the build record.
  • [39] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [40] A22P7HCO hydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue.
  • [41] NREF6YOA * Don't start more builds concurrently than allowed for each system
  • [42] KAZWI5G4 * hydra: buildpage, show changes since last build/successful build
  • [43] A63IHCMX * Register GC roots properly.
  • [44] WHAFVCEI
  • [45] DQD7JMSU * Fix the terminology.
  • [46] VJHIHMEH * Store the meta.longDescription and meta.license attributes in the
  • [47] ID277UG3
  • [48] IK53RV4V
  • [49] KOTB7BKV
  • [50] G5A7TZVI * Don't discard old build steps when restarting a build.
  • [51] HB3OHPJL hydra: in case of cached build, add link to build that built the storepath
  • [52] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [53] ECBA3GQO * Make the schema class names match the case of the SQL table names.
  • [54] E2TOU3L6 * More indices.
  • [55] 2WRTOU2Z Cleanup
  • [56] GWCV3TQV * BuildInputs table: link to dependencies, include store paths.
  • [57] Y4B2MURV
  • [58] GAIBDEZZ * Store the name of the machine that performed a build step in the
  • [59] AFTXA575 * $HYDRA_DATA environment variable.
  • [60] NZI7E2E3 * hydra: handle case where logfile is empty
  • [61] S66BOMVU * Added authentication.
  • [62] NLJJZVHO * Use ->update({...}) properly.
  • [63] KXGOUX7P * Creating releases.
  • [64] RU7AQO7U * Role-based access control. Only admins can create projects. Only
  • [65] RNLGIF4J hydra: remove debug statement
  • [66] GNIEG2GC * Disambiguate jobs by jobset name. I.e. jobs with the same name in
  • [67] MPVX6MKX * hydra: on build page, show tail of log on first tab when buildstatus == 1 (this specific build failed)
  • [68] M552HLIA * Support variant builds.
  • [69] WM5WAST3 * Monitor for dead builds all the time.
  • [70] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [71] N22GPKYT * Put info about logs / build products in the DB.
  • [72] SHYRGAWZ hydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone
  • [73] E6IC7YIK * Release sets: need to include the jobset name to disambiguate
  • [74] JSG5QEZJ * Only show status changes from successful to failed and failed to
  • [75] K42RSSSI
  • [76] SHBLLAVH * More global substitution.
  • [77] FD76WVTQ missing file
  • [78] FM4O2L4M hydra: if evaluator sees cached build, also add the buildproducts
  • [79] NVEFBXAM hydra: order machines by enabled/disabled, add green and red color for enabled/disabled
  • [80] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [81] D6YQQQCN * Don't ignore SIGCHLD after all, Perl doesn't like it. Just do
  • [82] JTRG7RDQ add support for git as jobinput
  • [83] ZTQEU5QS Hydra: Add support for maxSilent meta attribute (also already added timeout, but not implemented the actual timeout for the build yet)
  • [84] UMFB2767 Hydra/64: Leaving number of builds empty gives DBIx error
  • [85] ZILILXXK * Allow scheduled builds to be cancelled. They're not removed from
  • [86] OZ5UBJEK
  • [87] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [88] QZLMDKMU * Queue runner: don't start scheduled builds builds if they belong to
  • [89] X27GNHDV * Basic job info in the database.
  • [90] ZVTSOVHN * Support Subversion checkouts.
  • [91] WRIU3S5E * UI for cloning builds (not functional yet).
  • [92] L2E6EVE2 * Merged the Build and Job tables.
  • [93] US27ZTX5 * HydraFrontend -> Hydra.
  • [94] FN6V3C7M always show latest 10 builds on job page
  • [95] CLJQCY2X * Store info about all the build actions and allow them to be
  • [96] V4RNHJNR * Add a link to each project's homepage. Suggested by karltk.
  • [97] SLWFKMU5 extra indexes
  • [98] A5V7HLIQ * Shut up DBIx::Class.
  • [99] MI4IMCD3
  • [100] 6JR2WT6D * hydra: show queue optimization
  • [101] RH37XKJ2
  • [102] 2T42QGZD * Register builds as GC roots so they don't get deleted.
  • [103] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [104] NABL63FI * hydra: project members can do stuff that the owner can do
  • [105] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.
  • [106] SZYY2EQQ * Make the queries more readable.
  • [107] 4D4U5IPY * Allow jobsets to be disabled.
  • [108] 3ZCEPLNO
  • [109] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [110] 777XFGVY Hydra/22: on job page, 'finished builds' shows nothing for old (non-current) jobs
  • [111] RAKTHYAI * In the job status and error pages, show when the status of a job
  • [112] D7TT2BNK
  • [113] 7YBYT2LQ
  • [114] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [115] KN3VYE5P * Cleaned up the foreign key constraints.
  • [116] 6BLUKEQ2 * Caching of "path" inputs, and fake a revision number for those.
  • [117] 4X6NS66Q * Keep the most recent builds for each job.
  • [118] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [119] VVOAXWH4 fix wrong dbix:class:loader generation
  • [120] MRVTLC76
  • [121] HSVVEKTY * Start of a JSON API to get information about a specific build.
  • [122] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [123] 3BKF6P72 * Use Nix's negative caching.
  • [124] Z4KRJX4Q * In the last succeeded / job status queries, use the Builds.isCurrent
  • [125] JJT5QG3K remove revision from cached cvs inputs, and added missing files
  • [126] LCKWLQW3 * In Sqlite "release" is now a keyword, so use "release_" instead.
  • [127] SJLEZFC4 check getHydraPath in stead of Envvar HYDRA_DBI directly
  • [128] 3HCBU2FA
  • [129] TJPIS3UP hydra: minor improvements in hydra ui
  • [130] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept
  • [131] T6KISLR6 Fix indentation
  • [132] J7EE2XZA Fix a huge performance regression in the jobstatus page
  • [133] PTH265IX * Fix the queue page.
  • [134] R3ON2RJ3 hydra: missing argument
  • [135] 5O6E5SU5 hydra: store logfile/output path/closure size
  • [136] 67P45PY4
  • [137] ZEHSSVFG
  • [138] DSM3TTSO Hydra/31: "Duration" field broken in cached builds that are not in DB anymore
  • [139] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [140] UXHP37RF set threshold to show status on jobset page to a more usable size
  • [141] BEKA3TMM Hydra/25: At job pages, show the hash of the output
  • [142] YAPITGB3 * Boolean inputs.
  • [143] ELABMHJI * hydra: layout changes
  • [144] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [145] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [146] QQ4STW3S missing file
  • [147] TQKGQ5R3
  • [148] LBNVQXUB * Build the /build stuff in a separate controller.
  • [149] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [150] T7CCJQOF * Revert for now due to Postgres breakage.
  • [151] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [152] T7Z63K6T hydra: moves jobsetOverview sub
  • [153] BVOPAMLS
  • [154] OD5FSS5A * Quick hack to allow viewing of dependency graphs (via nix-store -q
  • [155] DHMTPGST * Ran update-dbix.
  • [156] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [157] OSVLMLCQ hydra: factored out build restart and
  • [158] PKPWUHUX * Idem.
  • [159] LZO3C2KI * Hack around those SQLite timeouts: just retry the transaction.
  • [160] AHTEIK7G * Added a maintainers field to the Builds table.
  • [161] DVNWJXWW * Generic declaration of build products.
  • [162] WYN733ST * Store build duration, handle cached builds.
  • [163] B72GLND4
  • [164] 2PEN43XF Hydra/40: Last 5 builds on job page incorrect
  • [165] 2PWOXJTX
  • [166] QNDXPVCI * Store the jobset's nixExprPath and nixExprInput fields in a build to
  • [167] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [168] S5PV6IIM * Represent jobs explicitly in the DB.
  • [169] BKOIYITR added some json responses
  • [170] MGOGOKQP add tracker html code via HYDRA_TRACKER
  • [171] R5D7DZPE
  • [172] VCOSLZRP
  • [173] EYNG4EL4 * Regenerate the bindings from a clean sqlite database.
  • [174] SKQXOQ7T hydra: fixed missing argument to restartbuild function
  • [175] TFVGX4JS Add an index to speed up the /project/<name> pages
  • [176] SAIUFDP3 hydra: make sure viewing logs works when logs are bz2'd
  • [177] 3XTHEUMP * Implemented the clone feature.
  • [*] DEMSSSB2 * Controller for jobs which inherits all actions in ListBuilds. So
  • [*] 3HZY24CX * Make jobsets viewable under
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [*] 2GK5DOU7 * Downloading closures.

Change contents

  • replacement in src/lib/Hydra/Controller/API.pm at line 139
    [21.3740][21.3740:4006]()
    my @builds = $c->model('DB::Builds')->search({finished => 0}, {rows => $nr, join => ['schedulingInfo'] , order_by => ["busy DESC", "priority DESC", "timestamp"], '+select' => ['schedulingInfo.priority', 'schedulingInfo.busy'], '+as' => ['priority', 'busy'] });
    [21.3740]
    [21.4006]
    my @builds = $c->model('DB::Builds')->search({finished => 0}, {rows => $nr, order_by => ["busy DESC", "priority DESC", "timestamp"]});
  • replacement in src/lib/Hydra/Controller/API.pm at line 141
    [21.4011][21.4011:4106]()
    my @list ;
    foreach my $b (@builds) {
    push @list, buildToHash($b) ;
    }
    [21.4011]
    [21.4106]
    my @list;
    push @list, buildToHash($_) foreach @builds;
  • replacement in src/lib/Hydra/Controller/API.pm at line 152
    [21.4324][21.4324:4396]()
    my $nrQueuedBuilds = $c->model('DB::BuildSchedulingInfo')->count();
    [21.4324]
    [21.4396]
    my $nrQueuedBuilds = $c->model('DB::Builds')->search({finished => 0})->count();
  • replacement in src/lib/Hydra/Controller/API.pm at line 154
    [21.4426][8.0:35]()
    data => " $nrQueuedBuilds"
    [21.4426]
    [21.4459]
    data => "$nrQueuedBuilds"
  • replacement in src/lib/Hydra/Controller/API.pm at line 161
    [21.4596][21.4596:4726](),[21.4726][8.36:72]()
    my $nrRunningBuilds = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count();
    $c->stash->{'plain'} = {
    data => " $nrRunningBuilds"
    [21.4596]
    [21.4760]
    my $nrRunningBuilds = $c->model('DB::Builds')->search({finished => 0, busy => 1 })->count();
    $c->stash->{'plain'} = {
    data => "$nrRunningBuilds"
  • replacement in src/lib/Hydra/Controller/Admin.pm at line 60
    [21.1320][21.1320:1376](),[21.1376][11.41:125]()
    { 'me.busy' => 1, 'schedulingInfo.busy' => 1 },
    { join => [ 'schedulingInfo', 'build' ]
    , order_by => [ 'machine' ]
    [21.1320]
    [21.1472]
    { finished => 0, 'me.busy' => 1, 'build.busy' => 1, },
    { join => [ 'build' ]
    , order_by => [ 'machine', 'stepnr' ]
  • replacement in src/lib/Hydra/Controller/Admin.pm at line 299
    [18.117][18.117:225]()
    $c->model('DB::Builds')->search({iscurrent => 0, busy => 0}, { join => 'schedulingInfo' })->delete_all;
    [18.117]
    [18.225]
    # !!! Mark the builds as cancelled instead.
    $c->model('DB::Builds')->search({finished => 0, iscurrent => 0, busy => 0})->delete_all;
  • replacement in src/lib/Hydra/Controller/Admin.pm at line 306
    [18.351][18.351:443]()
    $c->model('DB::Builds')->search({busy => 0}, { join => 'schedulingInfo' })->delete_all;
    [18.351]
    [18.443]
    # !!! Mark the builds as cancelled instead.
    $c->model('DB::Builds')->search({finished => 0, busy => 0})->delete_all;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 44
    [21.11][15.32:126](),[15.126][21.110:149](),[21.110][21.110:149]()
    my $pathHash = $c->stash->{available} ? queryPathHash($build->outpath) : "Not available";
    $c->stash->{pathHash} = $pathHash;
    [21.11]
    [21.941]
    $c->stash->{pathHash} = $c->stash->{available} ? queryPathHash($build->outpath) : undef;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 46
    [21.942][21.942:1058]()
    if (!$build->finished && $build->schedulingInfo->busy) {
    my $logfile = $build->schedulingInfo->logfile;
    [21.942]
    [21.0]
    if (!$build->finished && $build->busy) {
    my $logfile = $build->logfile;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 83
    [21.250][21.0:157](),[21.157][20.0:98](),[20.98][21.240:249](),[21.240][21.240:249](),[21.249][19.0:28](),[19.28][21.276:330](),[21.276][21.276:330]()
    my $r = joinWithResultInfo( $c, $c->model('DB::Builds'))->search(
    { eval => { -in => $build->jobsetevalmembers->get_column('eval')->as_query } }
    , { join => 'jobsetevalmembers', order_by => [ 'project', 'jobset', 'job'], distinct => 1 }
    );
    if ($r->count <= 100) {
    $c->stash->{relatedbuilds} = [$r->all];
    }
    [21.250]
    [21.1111]
    #my $r = joinWithResultInfo( $c, $c->model('DB::Builds'))->search(
    # { eval => { -in => $build->jobsetevalmembers->all->get_column('eval')->as_query } }
    # , { join => 'jobsetevalmembers', order_by => [ 'project', 'jobset', 'job'], distinct => 1 }
    # );
    #if ($r->count <= 100) {
    # $c->stash->{relatedbuilds} = [$r->all];
    #}
  • replacement in src/lib/Hydra/Controller/Build.pm at line 143
    [10.156][10.156:274]()
    $c->stash->{reload} = defined $c->stash->{build}->schedulingInfo && $c->stash->{build}->schedulingInfo->busy;
    [10.156]
    [10.274]
    $c->stash->{reload} = !$c->stash->{build}->finished && $c->stash->{build}->busy;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 408
    [21.714][21.714:779]()
    if $build->finished || $build->schedulingInfo->busy;
    [21.714]
    [21.779]
    if $build->finished || $build->busy;
  • replacement in src/lib/Hydra/Controller/Build.pm at line 414
    [21.954][21.0:60]()
    $build->update({finished => 1, timestamp => time});
    [21.954]
    [21.1042]
    $build->update({finished => 1, busy => 0, timestamp => time});
  • edit in src/lib/Hydra/Controller/Build.pm at line 421
    [21.1218][21.1218:1259]()
    $build->schedulingInfo->delete;
  • replacement in src/lib/Hydra/Controller/Job.pm at line 39
    [21.329][9.0:165](),[9.165][21.499:842](),[21.499][21.499:842]()
    $c->stash->{runningBuilds} = [$c->stash->{job}->builds->search({busy => 1}, { join => ['schedulingInfo', 'project'] , order_by => ["priority DESC", "timestamp"]
    , '+select' => ['project.enabled', 'schedulingInfo.priority', 'schedulingInfo.disabled', 'schedulingInfo.busy']
    , '+as' => ['enabled', 'priority', 'disabled', 'busy'] })];
    [21.329]
    [21.842]
    $c->stash->{runningBuilds} = [
    $c->stash->{job}->builds->search(
    { busy => 1 },
    { join => ['project']
    , order_by => ["priority DESC", "timestamp"]
    , '+select' => ['project.enabled']
    , '+as' => ['enabled']
    }
    ) ];
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 68
    [21.978][5.0:261]()
    push(@select, "(SELECT buildstatus FROM BuildResultInfo bri NATURAL JOIN Builds b WHERE b.id = (SELECT MAX(id) FROM Builds t WHERE t.project = me.project AND t.jobset = me.jobset AND t.job = me.job AND t.system = '$system' AND t.iscurrent = 1 ))");
    [21.978]
    [21.1218]
    push(@select, "(select buildstatus from BuildResultInfo bri join Builds b using (id) where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 70
    [21.1250][5.262:516](),[5.516][21.1483:1524](),[21.1483][21.1483:1524]()
    push(@select, "(SELECT b.id FROM BuildResultInfo bri NATURAL JOIN Builds b WHERE b.id = (SELECT MAX(id) FROM Builds t WHERE t.project = me.project AND t.jobset = me.jobset AND t.job = me.job AND t.system = '$system' AND t.iscurrent = 1 ))");
    push(@as, $system."-build");
    [21.1250]
    [21.1524]
    push(@select, "(select b.id from BuildResultInfo bri join Builds b using (id) where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
    push(@as, "$system-build");
  • replacement in src/lib/Hydra/Controller/Root.pm at line 25
    [21.54][12.85:279]()
    $c->stash->{nrRunningBuilds} = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count();
    $c->stash->{nrQueuedBuilds} = $c->model('DB::BuildSchedulingInfo')->count();
    [21.54]
    [21.368]
    $c->stash->{nrRunningBuilds} = $c->model('DB::Builds')->search({ finished => 0, busy => 1 }, {})->count();
    $c->stash->{nrQueuedBuilds} = $c->model('DB::Builds')->search({ finished => 0 })->count();
  • replacement in src/lib/Hydra/Controller/Root.pm at line 77
    [21.200][4.0:280]()
    {finished => 0}, {join => ['schedulingInfo', 'project'] , order_by => ["priority DESC", "timestamp"], '+select' => ['project.enabled', 'schedulingInfo.priority', 'schedulingInfo.disabled', 'schedulingInfo.busy'], '+as' => ['enabled', 'priority', 'disabled', 'busy'] })];
    [21.200]
    [21.558]
    {finished => 0}, {join => ['project'] , order_by => ["priority DESC", "timestamp"], '+select' => ['project.enabled'], '+as' => ['enabled'] })];
  • replacement in src/lib/Hydra/Controller/Root.pm at line 102
    [21.488][21.488:544](),[21.544][11.687:735]()
    { 'me.busy' => 1, 'schedulingInfo.busy' => 1 },
    { join => [ 'schedulingInfo', 'build' ]
    [21.488]
    [11.735]
    { 'me.busy' => 1, 'build.busy' => 1 },
    { join => [ 'build' ]
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 854
    [21.5956][21.5956:5965]()
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 858
    [21.580][16.3357:3408]()
    $build->update({ finished => 1 });
    [21.580]
    [21.624]
    $build->update({ finished => 1 });
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 871
    [21.1075][21.1075:1173]()
    $build->create_related('buildschedulinginfo',
    { priority => $priority
    [21.1075]
    [21.1173]
    $build->update(
    { priority => $priority
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 908
    [21.379][21.379:459]()
    my $drvpath = $build->drvpath ;
    my $outpath = $build->outpath ;
    [21.379]
    [21.459]
    my $drvpath = $build->drvpath;
    my $outpath = $build->outpath;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 913
    [21.530][21.530:578]()
    $paths = $paths . " " . $bs->outpath;
    [21.530]
    [21.578]
    $paths = $paths . " " . $bs->outpath;
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 917
    [21.655][21.655:715]()
    $build->update({finished => 0, timestamp => time});
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 918
    [21.716][21.716:913]()
    $build->resultInfo->delete;
    $db->resultset('BuildSchedulingInfo')->create(
    { id => $build->id
    , priority => 0 # don't know the original priority anymore...
    [21.716]
    [21.913]
    $build->update(
    { finished => 0
    , timestamp => time
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 923
    [21.964][21.964:980]()
    });
    [21.964]
    [21.980]
    });
    $build->resultInfo->delete;
  • replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 85
    [21.10140][21.10140:10265]()
    $c->stash->{busyBuilds} = $builds->search(
    {finished => 0, busy => 1},
    {join => 'schedulingInfo'}) || 0;
    [21.10140]
    [3.0]
    $c->stash->{busyBuilds} = $builds->search({finished => 0, busy => 1}) || 0;
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 198
    [13.172][13.172:788]()
    [ "(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildSchedulingInfo WHERE me.project = a.project AND me.name = a.jobset AND a.isCurrent = 1)"
    , "(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildResultInfo WHERE me.project = a.project AND me.name = a.jobset AND buildstatus <> 0 AND a.isCurrent = 1)"
    , "(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildResultInfo WHERE me.project = a.project AND me.name = a.jobset AND buildstatus = 0 AND a.isCurrent = 1)"
    , "(SELECT COUNT(*) FROM Builds AS a WHERE me.project = a.project AND me.name = a.jobset AND a.isCurrent = 1)"
    [13.172]
    [13.788]
    [ "(select count(*) from Builds as a where a.finished = 0 and me.project = a.project and me.name = a.jobset and a.isCurrent = 1)"
    , "(select count(*) from Builds as a join BuildResultInfo r using (id) where me.project = a.project and me.name = a.jobset and buildstatus <> 0 and a.isCurrent = 1)"
    , "(select count(*) from Builds as a join BuildResultInfo r using (id) where me.project = a.project and me.name = a.jobset and buildstatus = 0 and a.isCurrent = 1)"
    , "(select count(*) from Builds as a where me.project = a.project and me.name = a.jobset and a.isCurrent = 1)"
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 203
    [13.800][13.800:883]()
    , "+as" => ["nrscheduled", "nrfailed", "nrsucceeded", "nrtotal"]
    });
    [13.800]
    [21.1004]
    , "+as" => ["nrscheduled", "nrfailed", "nrsucceeded", "nrtotal"]
    });
  • file deletion: Buildschedulinginfo.pm (----------)Buildschedulinginfo.pm (----------)BuildSchedulingInfo.pm (----------)BuildSchedulingInfo.pm (----------)Buildschedulinginfo.pm (----------)
    [21.207][21.379:425](),[21.425][21.3773:3773](),[21.294][21.466:512](),[21.512][21.3773:3773](),[21.477][21.616:662](),[21.662][21.3773:3773](),[21.207][21.757:803](),[21.803][21.3773:3773](),[21.3332][21.4711:4757](),[21.4757][21.3773:3773]()
    use utf8;
    package Hydra::Schema::BuildSchedulingInfo;
    # Created by DBIx::Class::Schema::Loader
    # DO NOT MODIFY THE FIRST PART OF THIS FILE
    =head1 NAME
    Hydra::Schema::BuildSchedulingInfo
    =cut
    use strict;
    use warnings;
    use base 'DBIx::Class::Core';
    =cut
    __PACKAGE__->table("BuildSchedulingInfo");
    =head1 ACCESSORS
    =head2 id
    is_foreign_key: 1
    is_nullable: 0
    =head2 priority
    default_value: 0
    is_nullable: 0
    =head2 busy
    default_value: 0
    is_nullable: 0
    =head2 locker
    is_nullable: 0
    =head2 logfile
    is_nullable: 1
    =head2 disabled
    default_value: 0
    is_nullable: 0
    =head2 starttime
    is_nullable: 1
    =cut
    data_type: 'integer'
    data_type: 'integer'
    data_type: 'text'
    data_type: 'text'
    default_value: (empty string)
    data_type: 'integer'
    data_type: 'integer'
    data_type: 'integer'
    is_auto_increment: 1
    __PACKAGE__->add_columns(
    "id",
    {
    },
    "priority",
    "busy",
    "locker",
    "logfile",
    "disabled",
    "starttime",
    );
    =head1 PRIMARY KEY
    =over 4
    =item * L</id>
    =back
    =cut
    __PACKAGE__->set_primary_key("id");
    =head1 RELATIONS
    =head2 id
    Type: belongs_to
    Related object: L<Hydra::Schema::Builds>
    =cut
    __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }, {});
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uz7y9Ly+ADRrtrPfEk9lGA
    # You can replace this text with custom content, and it will be preserved on regeneration
    1;
    { data_type => "integer", is_nullable => 1 },
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    { data_type => "text", is_nullable => 1 },
    { data_type => "text", default_value => "", is_nullable => 0 },
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    data_type => "integer",
    is_auto_increment => 1,
    is_foreign_key => 1,
    is_nullable => 0,
    =head1 TABLE: C<BuildSchedulingInfo>
  • replacement in src/lib/Hydra/Schema/BuildProducts.pm at line 49
    [21.1966][17.2809:2832]()
    data_type: 'integer'
    [21.1966]
    [21.2010]
    data_type: 'bigint'
  • replacement in src/lib/Hydra/Schema/BuildProducts.pm at line 94
    [21.439][17.3170:3218]()
    { data_type => "integer", is_nullable => 1 },
    [21.439]
    [21.502]
    { data_type => "bigint", is_nullable => 1 },
  • replacement in src/lib/Hydra/Schema/BuildProducts.pm at line 136
    [21.5065][17.3581:3723]()
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:suSgQkBLXzu0yD4YicRS1A
    [21.5065]
    [21.5065]
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 00:47:18
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dzTKwZ7bby7kplnSgta3Gw
  • edit in src/lib/Hydra/Schema/BuildSteps.pm at line 153
    [17.7513][21.998:1108](),[21.998][21.998:1108]()
    __PACKAGE__->belongs_to(
    "schedulingInfo",
    "Hydra::Schema::BuildSchedulingInfo",
    { id => "build" },
    );
  • edit in src/lib/Hydra/Schema/Builds.pm at line 129
    [21.8726]
    [21.8726]
    data_type: 'text'
    is_nullable: 1
    =head2 priority
    data_type: 'integer'
    default_value: 0
    is_nullable: 0
    =head2 busy
    data_type: 'integer'
    default_value: 0
    is_nullable: 0
    =head2 locker
    data_type: 'text'
    is_nullable: 1
    =head2 logfile
  • edit in src/lib/Hydra/Schema/Builds.pm at line 154
    [21.8785]
    [21.8799]
    =head2 disabled
  • edit in src/lib/Hydra/Schema/Builds.pm at line 157
    [21.8800]
    [21.8800]
    data_type: 'integer'
    default_value: 0
    is_nullable: 0
    =head2 starttime
    data_type: 'integer'
    is_nullable: 1
  • edit in src/lib/Hydra/Schema/Builds.pm at line 208
    [21.240]
    [17.9077]
    { data_type => "text", is_nullable => 1 },
    "priority",
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    "busy",
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    "locker",
  • edit in src/lib/Hydra/Schema/Builds.pm at line 215
    [17.9122]
    [21.5911]
    "logfile",
    { data_type => "text", is_nullable => 1 },
    "disabled",
    { data_type => "integer", default_value => 0, is_nullable => 0 },
    "starttime",
    { data_type => "integer", is_nullable => 1 },
  • edit in src/lib/Hydra/Schema/Builds.pm at line 296
    [21.2883][21.9285:9286](),[21.9286][17.9961:9988]()
    =head2 buildschedulinginfo
  • edit in src/lib/Hydra/Schema/Builds.pm at line 297
    [21.9310][21.9310:9328](),[21.9328][17.9989:10043](),[17.10043][21.9378:9385](),[21.9378][21.9378:9385](),[21.9385][21.8856:8881](),[21.2883][21.8856:8881](),[21.8881][17.10044:10109](),[21.1284][21.735:768](),[21.1619][21.735:768](),[17.10109][21.735:768](),[21.2973][21.735:768](),[21.768][17.10110:10116](),[17.10116][21.768:771](),[21.768][21.768:771](),[21.771][21.9386:9387]()
    Type: might_have
    Related object: L<Hydra::Schema::BuildSchedulingInfo>
    =cut
    __PACKAGE__->might_have(
    "buildschedulinginfo",
    "Hydra::Schema::BuildSchedulingInfo",
    { "foreign.id" => "self.id" },
    {},
    );
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 383
    [21.1182][17.10970:11112]()
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RRtBPTdD946kA5133+c4kw
    [21.1182]
    [21.1324]
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 00:47:54
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VnnyFTwnLncGb2Dj2/giiA
  • edit in src/lib/Hydra/Schema/Builds.pm at line 400
    [21.9268][21.9268:9271](),[21.97][21.6336:6337](),[21.588][21.6336:6337](),[21.718][21.6336:6337](),[21.1030][21.6336:6337](),[21.1292][21.6336:6337](),[21.1609][21.6336:6337](),[21.1715][21.6336:6337](),[21.2050][21.6336:6337](),[21.3548][21.6336:6337](),[21.9271][21.6336:6337](),[21.6336][21.6336:6337](),[21.6337][21.3549:3594](),[21.3594][21.1716:1756](),[21.1756][21.3642:3660](),[21.2091][21.3642:3660](),[21.3642][21.3642:3660]()
    );
    __PACKAGE__->belongs_to(
    "schedulingInfo",
    "Hydra::Schema::BuildSchedulingInfo",
    { id => "id" },
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 437
    [21.23][21.23:64]()
    natural join BuildResultInfo r
    [21.23]
    [21.64]
    join BuildResultInfo r using (id)
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 440
    [21.115][21.115:206]()
    (select max(id)
    from builds c natural join buildresultinfo r2
    [21.115]
    [21.206]
    (select max(c.id)
    from builds c join buildresultinfo r2 on c.id = r2.id
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 459
    [21.79][6.0:51]()
    x.nixExprPath, x.maxsilent, x.timeout,
    [21.79]
    [21.794]
    x.nixExprPath, x.maxsilent, x.timeout, x.priority, x.busy, x.locker,
    x.logfile, x.disabled, x.startTime,
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 464
    [21.323][21.323:368]()
    (select max(id) from builds b
    [21.323]
    [21.368]
    (select max(b.id) from builds b
  • replacement in src/lib/Hydra/Schema/Builds.pm at line 485
    [21.809][21.809:854]()
    (select max(id) from builds b
    [21.809]
    [21.854]
    (select max(b.id) from builds b
  • edit in src/lib/Hydra/Schema/SchemaVersion.pm at line 29
    [17.27546][17.27546:27569]()
    is_auto_increment: 1
  • edit in src/lib/Hydra/Schema/SchemaVersion.pm at line 30
    [17.27586][17.27586:27764]()
    =cut
    __PACKAGE__->add_columns(
    "version",
    { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
    );
    =head1 PRIMARY KEY
    =over 4
    =item * L</version>
    =back
  • replacement in src/lib/Hydra/Schema/SchemaVersion.pm at line 33
    [17.27771][17.27771:27812]()
    __PACKAGE__->set_primary_key("version");
    [17.27771]
    [17.27812]
    __PACKAGE__->add_columns("version", { data_type => "integer", is_nullable => 0 });
  • replacement in src/lib/Hydra/Schema/SchemaVersion.pm at line 36
    [17.27814][17.27814:27956]()
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F/jsSRq8pxR4mWq/N4qYGw
    [17.27814]
    [17.27956]
    # Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 00:47:18
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LFD28W0GvvrOOylCM98SEQ
  • replacement in src/root/build.tt at line 73
    [21.5723][21.171:210]()
    [% IF build.schedulingInfo.busy %]
    [21.5723]
    [21.210]
    [% IF build.busy %]
  • replacement in src/root/build.tt at line 130
    [21.5076][21.5076:5113]()
    [% IF !build.schedulingInfo %]
    [21.5076]
    [21.5113]
    [% IF !build.finished %]
  • edit in src/root/build.tt at line 319
    [21.172]
    [21.172]
    [% IF pathHash %]
  • edit in src/root/build.tt at line 326
    [21.10056]
    [21.10056]
    [% END %]
  • replacement in src/root/build.tt at line 371
    [21.11675][21.11675:11728]()
    <td>[% build.schedulingInfo.priority %]</td>
    [21.11675]
    [21.11728]
    <td>[% build.priority %]</td>
  • replacement in src/root/common.tt at line 96
    [14.733][14.733:905]()
    [%- IF build.get_column('busy') %]runningBuild[% ELSIF build.get_column('disabled') == 1 || build.get_column('enabled') == 0 %]disabledBuild[% END -%]
    [14.733]
    [14.905]
    [%- IF build.busy %]runningBuild[% ELSIF build.disabled == 1 || build.get_column('enabled') == 0 %]disabledBuild[% END -%]
  • replacement in src/root/common.tt at line 108
    [14.1382][21.139:346](),[21.1669][21.139:346](),[21.346][21.171:227](),[21.1669][21.171:227]()
    <td>[% IF build.get_column('busy') %]<img src="/static/images/running.gif" alt="Running" />[% ELSIF build.get_column('disabled') == 1 || build.get_column('enabled') == 0 %]Disabled[% END %]</td>
    <td>[% build.get_column('priority') %]</td>
    [14.1382]
    [14.1383]
    <td>[% IF build.busy %]<img src="/static/images/running.gif" alt="Running" />[% ELSIF build.disabled == 1 || build.get_column('enabled') == 0 %]Disabled[% END %]</td>
    <td>[% build.priority %]</td>
  • replacement in src/root/common.tt at line 206
    [14.1934][14.1934:2000]()
    [%- busy = busy != undef ? busy : build.schedulingInfo.busy -%]
    [14.1934]
    [14.2000]
    [%- busy = busy != undef ? busy : build.busy -%]
  • replacement in src/root/common.tt at line 258
    [21.2810][21.2810:2850]()
    [% ELSIF build.schedulingInfo.busy %]
    [21.2810]
    [21.2850]
    [% ELSIF build.busy %]
  • replacement in src/root/common.tt at line 260
    [21.2889][21.2889:2971]()
    since [% INCLUDE renderDateTime timestamp = build.schedulingInfo.starttime %]
    [21.2889]
    [21.2971]
    since [% INCLUDE renderDateTime timestamp = build.starttime %]
  • replacement in src/script/hydra-build at line 401
    [21.1172][21.4982:5042](),[21.4043][21.4982:5042]()
    $build->update({finished => 1, timestamp => time});
    [21.1172]
    [21.1651]
    $build->update({finished => 1, busy => 0, locker => '', logfile => '', timestamp => time});
  • edit in src/script/hydra-build at line 426
    [21.6616][21.6616:6617](),[21.6617][21.7610:7650]()
    $build->schedulingInfo->delete;
  • replacement in src/script/hydra-build at line 454
    [21.3729][21.8088:8178](),[21.8088][21.8088:8178]()
    if ($build->schedulingInfo->busy != 0 && $build->schedulingInfo->locker != getppid) {
    [21.3729]
    [21.8178]
    if ($build->busy != 0 && $build->locker != getppid) {
  • replacement in src/script/hydra-build at line 457
    [21.7186][21.872:935]()
    $build->schedulingInfo->update({busy => 1, locker => $$});
    [21.7186]
    [21.786]
    $build->update({busy => 1, locker => $$});
  • replacement in src/script/hydra-build at line 473
    [21.1214][21.936:1003](),[21.7468][21.936:1003]()
    $build->schedulingInfo->update({busy => 0, locker => $$});
    [21.1214]
    [21.7539]
    $build->update({busy => 0, locker => $$});
  • replacement in src/script/hydra-queue-runner at line 23
    [21.1237][21.77:132](),[21.94][21.77:132](),[21.132][21.147:216](),[21.147][21.147:216]()
    my @builds = $db->resultset('Builds')->search(
    {finished => 0, busy => 1}, {join => 'schedulingInfo'});
    [21.1237]
    [21.133]
    my @builds = $db->resultset('Builds')->search({finished => 0, busy => 1});
  • replacement in src/script/hydra-queue-runner at line 25
    [21.171][21.171:225]()
    my $pid = $build->schedulingInfo->locker;
    [21.171]
    [21.58]
    my $pid = $build->locker;
  • replacement in src/script/hydra-queue-runner at line 34
    [21.489][2.64:133]()
    if ($build->schedulingInfo->starttime + 60 < time) {
    [21.489]
    [21.558]
    if ($build->starttime + 60 < time) {
  • replacement in src/script/hydra-queue-runner at line 42
    [21.301][21.301:450]()
    $build->schedulingInfo->busy(0);
    $build->schedulingInfo->locker("");
    $build->schedulingInfo->update;
    [21.301]
    [21.589]
    $build->busy(0);
    $build->locker("");
    $build->update;
  • replacement in src/script/hydra-queue-runner at line 66
    [7.287][7.287:345]()
    { join => ['schedulingInfo', 'project'], rows => 1 } ) ;
    [7.287]
    [7.345]
    { join => ['project'], rows => 1 } ) ;
  • replacement in src/script/hydra-queue-runner at line 81
    [21.490][21.0:111]()
    { join => ['schedulingInfo', 'project'], select => ['system'], as => ['system'], distinct => 1 });
    [21.490]
    [21.568]
    { join => ['project'], select => ['system'], as => ['system'], distinct => 1 });
  • replacement in src/script/hydra-queue-runner at line 90
    [21.632][21.632:755]()
    {finished => 0, busy => 1, system => $system->system},
    {join => 'schedulingInfo'})->count;
    [21.632]
    [21.8665]
    {finished => 0, busy => 1, system => $system->system})->count;
  • replacement in src/script/hydra-queue-runner at line 101
    [21.703][21.703:804]()
    { join => ['schedulingInfo', 'project'], order_by => ["priority DESC", "timestamp"],
    [21.703]
    [21.1248]
    { join => ['project'], order_by => ["priority DESC", "timestamp"],
  • replacement in src/script/hydra-queue-runner at line 115
    [21.94][21.791:1056]()
    $build->schedulingInfo->busy(1);
    $build->schedulingInfo->locker($$);
    $build->schedulingInfo->logfile($logfile);
    $build->schedulingInfo->starttime(time);
    $build->schedulingInfo->update;
    [21.94]
    [21.1104]
    $build->busy(1);
    $build->locker($$);
    $build->logfile($logfile);
    $build->starttime(time);
    $build->update;
  • replacement in src/script/hydra-queue-runner at line 131
    [21.9019][21.1336:1395]()
    my $logfile = $build->schedulingInfo->logfile;
    [21.9019]
    [21.400]
    my $logfile = $build->logfile;
  • replacement in src/script/hydra-queue-runner at line 148
    [21.1291][21.1447:1596](),[21.9174][21.1447:1596]()
    $build->schedulingInfo->busy(0);
    $build->schedulingInfo->locker($$);
    $build->schedulingInfo->update;
    [21.1291]
    [21.9269]
    $build->busy(0);
    $build->locker($$);
    $build->update;
  • replacement in src/script/hydra-update-gc-roots at line 115
    [21.1545][21.1685:1785](),[21.2366][21.1685:1785](),[21.1685][21.1685:1785]()
    foreach my $build ($db->resultset('Builds')->search({finished => 0}, {join => 'schedulingInfo'})) {
    [21.2366]
    [21.1785]
    foreach my $build ($db->resultset('Builds')->search({finished => 0})) {
  • edit in src/sql/hydra.sql at line 117
    [21.7518][21.1850:1921](),[21.1921][21.8670:8869](),[21.8670][21.8670:8869](),[21.8869][21.4598:4669]()
    -- This table contains all wbuilds, either scheduled or finished. For
    -- scheduled builds, additional info (such as the priority) can be
    -- found in the BuildSchedulingInfo table. For finished builds,
    -- additional info (such as the logs, build products, etc.) can be
    -- found in several tables, such as BuildResultInfo and BuildProducts.
  • edit in src/sql/hydra.sql at line 154
    [21.791][21.9173:9178](),[21.3623][21.9173:9178](),[21.4782][21.9173:9178](),[21.5905][21.9173:9178](),[21.18121][21.9173:9178](),[21.9173][21.9173:9178](),[21.9178][21.7599:7859](),[21.6824][21.9345:9348](),[21.7859][21.9345:9348](),[21.9345][21.9345:9348]()
    foreign key (project) references Projects(name) on update cascade,
    foreign key (project, jobset) references Jobsets(project, name) on update cascade,
    foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade
    );
  • replacement in src/sql/hydra.sql at line 155
    [21.9349][21.9349:9469]()
    -- Info for a scheduled build.
    create table BuildSchedulingInfo (
    id integer primary key not null,
    [21.9349]
    [21.9469]
    -- Information about scheduled builds.
  • replacement in src/sql/hydra.sql at line 159
    [21.9609][21.9609:9707]()
    locker text not null default '', -- !!! hostname/pid of the process building this job?
    [21.9609]
    [21.9707]
    locker text, -- !!! hostname/pid of the process building this job?
  • replacement in src/sql/hydra.sql at line 163
    [21.2312][21.869:915]()
    disabled integer not null default 0,
    [21.2312]
    [21.2510]
    disabled integer not null default 0, -- !!! boolean
  • replacement in src/sql/hydra.sql at line 166
    [21.2407][21.9768:9773](),[21.2570][21.9768:9773](),[21.9768][21.9768:9773](),[21.9773][21.7860:7923]()
    foreign key (id) references Builds(id) on delete cascade
    [21.2570]
    [21.9857]
    foreign key (project) references Projects(name) on update cascade,
    foreign key (project, jobset) references Jobsets(project, name) on update cascade,
    foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade
  • edit in src/sql/hydra.sql at line 514
    [21.3104][21.2385:2466]()
    create index IndexBuildSchedulingInfoOnBuild on BuildSchedulingInfo(id); -- idem
  • file addition: upgrade-2.sql (----------)
    [21.3004]
    alter table Builds
    add column priority integer not null default 0,
    add column busy integer not null default 0,
    add column locker text,
    add column logfile text,
    add column disabled integer not null default 0,
    add column startTime integer;
    --alter table Builds
    -- add column isCachedBuild integer,
    -- add column buildStatus integer,
    -- add column errorMsg text;
    update Builds b set
    priority = (select priority from BuildSchedulingInfo s where s.id = b.id),
    busy = (select busy from BuildSchedulingInfo s where s.id = b.id),
    disabled = (select disabled from BuildSchedulingInfo s where s.id = b.id),
    locker = (select locker from BuildSchedulingInfo s where s.id = b.id),
    logfile = (select logfile from BuildSchedulingInfo s where s.id = b.id)
    where exists (select 1 from BuildSchedulingInfo s where s.id = b.id);
    update Builds b set
    startTime = ((select startTime from BuildSchedulingInfo s where s.id = b.id) union (select startTime from BuildResultInfo r where r.id = b.id));
    -- isCachedBuild = (select isCachedBuild from BuildResultInfo r where r.id = b.id),
    -- buildStatus = (select buildStatus from BuildResultInfo r where r.id = b.id),
    -- errorMsg = (select errorMsg from BuildResultInfo r where r.id = b.id);