Call buildFinished when a cached build is added

[?]
Jul 8, 2013, 5:35 PM
PHNLYPKB5SJJAHAICS6QEMRNCREPG7SC2MQRLTQMQLWGXM427S3QC

Dependencies

  • [2] 4SJPAAJX Pass failing dependent builds to buildFinished
  • [3] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [4] JOYONH2K Prevent multiple builds with the same (job, outPath) tuple from being added
  • [5] IUCHXUJP Use "can" to check whether a plugin supports buildFinished
  • [6] 3XTHEUMP * Implemented the clone feature.
  • [7] L2E6EVE2 * Merged the Build and Job tables.
  • [8] MNZ67UXO If a build step fail, immediately fail all queued builds that depend on it
  • [9] JZE7DC2F Whitespace
  • [10] OG7BEM57
  • [11] FM4O2L4M hydra: if evaluator sees cached build, also add the buildproducts
  • [12] BLVQGJ4L Use OO-style plugins
  • [13] 5EQYVRWE Add a plugin mechanism
  • [14] KA45EBF5 * Send email if a build fails.
  • [15] 7YBYT2LQ
  • [16] PMNWRTGJ Add multiple output support
  • [17] CXRCPDSQ * added support for twitter notification
  • [18] QMW24O5S Add support for Guile & Guix.
  • [19] RXVJFQ5A Evaluator cleanups
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [*] R3ON2RJ3 hydra: missing argument
  • [*] A22P7HCO hydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue.
  • [*] D5QIOJGP * Move everything up one directory.
  • [*] AFTXA575 * $HYDRA_DATA environment variable.
  • [*] TJK27WSB Open the DB using Hydra::Model::DB->new
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 578
    [3.1031][3.0:70]()
    $inputInfo, $nixExprInput, $job, \%currentBuilds, undef, {});
    [3.1031]
    [3.1090]
    $inputInfo, $nixExprInput, $job, \%currentBuilds, undef, {}, $c->hydra_plugins);
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 18
    [3.4499]
    [22.2759]
    use Hydra::Helper::PluginHooks;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 393
    [3.3507][3.71:186]()
    my ($db, $project, $jobset, $inputInfo, $nixExprInput, $buildInfo, $buildIds, $prevEval, $jobOutPathMap) = @_;
    [3.3507]
    [3.7099]
    my ($db, $project, $jobset, $inputInfo, $nixExprInput, $buildInfo, $buildIds, $prevEval, $jobOutPathMap, $plugins) = @_;
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 521
    [23.43]
    [24.987]
    notifyBuildFinished($plugins, $build, []);
  • file addition: PluginHooks.pm (----------)
    [25.339]
    package Hydra::Helper::PluginHooks;
    use strict;
    use Exporter;
    our @ISA = qw(Exporter);
    our @EXPORT = qw(
    notifyBuildFinished);
    sub notifyBuildFinished {
    my ($plugins, $build, $dependents) = @_;
    foreach my $plugin (@{$plugins}) {
    eval {
    $plugin->buildFinished($build, $dependents);
    };
    if ($@) {
    print STDERR "$plugin->buildFinished: $@\n";
    }
    }
    }
    1;
  • edit in src/script/hydra-build at line 11
    [26.1070]
    [27.630]
    use Hydra::Helper::PluginHooks;
  • edit in src/script/hydra-build at line 81
    [3.1573][3.1573:1577](),[3.1577][3.0:48](),[3.48][3.596:632](),[3.632][3.149:164](),[3.149][3.149:164](),[3.164][2.86:143](),[2.143][3.226:328](),[3.681][3.226:328](),[3.226][3.226:328]()
    }
    sub notify {
    my ($build, $dependents) = @_;
    foreach my $plugin (@plugins) {
    eval {
    $plugin->buildFinished($build, $dependents);
    };
    if ($@) {
    print STDERR "$plugin->buildFinished: $@\n";
    }
    }
  • replacement in src/script/hydra-build at line 310
    [3.874][2.242:275]()
    notify($build, $dependents);
    [3.874]
    [3.6647]
    notifyBuildFinished(\@plugins, $build, $dependents);
  • replacement in src/script/hydra-build at line 319
    [3.6651][3.358:382]()
    notify($build, []);
    [3.6651]
    [3.1071]
    notifyBuildFinished(\@plugins, $build, []);
  • replacement in src/script/hydra-evaluator at line 151
    [3.2411][3.577:697]()
    checkBuild($db, $project, $jobset, $inputInfo, $nixExprInput, $job, \%buildIds, $prevEval, $jobOutPathMap);
    [3.2411]
    [3.5911]
    checkBuild($db, $project, $jobset, $inputInfo, $nixExprInput, $job, \%buildIds, $prevEval, $jobOutPathMap, $plugins);