hydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue.

[?]
Sep 1, 2010, 10:50 AM
A22P7HCOGNO3XEQWBNEG2VHTGUB2GKQ75Q6JDMPQNQCLFHE7XBFAC

Dependencies

  • [2] SGNXIOI4 Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only)
  • [3] IW2LHCLL fixed email bug
  • [4] 7YBYT2LQ
  • [5] OG7BEM57
  • [6] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [7] CMU3YKOU * Store the release name.
  • [8] FYO6NECE hydra
  • [9] 3XTHEUMP * Implemented the clone feature.
  • [10] ZTQEU5QS Hydra: Add support for maxSilent meta attribute (also already added timeout, but not implemented the actual timeout for the build yet)
  • [11] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [12] BD3GRK4B * Get rid of "positive failures" and separate log phases.
  • [13] 37R34XJO * Negative caching: don't perform a build if a dependency already
  • [14] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [15] O25D52TA initial support for mercurial
  • [16] LA27PR4U hydra: fix enable email notification bug
  • [17] KA45EBF5 * Send email if a build fails.

Change contents

  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 13
    [4.2785][2.691:774]()
    our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr);
    [4.2785]
    [4.2815]
    our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName);
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 32
    [4.3176]
    [4.3176]
    sub getReleaseName {
    my ($outPath) = @_;
    my $releaseName;
    if (-e "$outPath/nix-support/hydra-release-name") {
    open FILE, "$outPath/nix-support/hydra-release-name" or die;
    $releaseName = <FILE>;
    chomp $releaseName;
    close FILE;
    }
    return $releaseName;
    }
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 621
    [4.5175]
    [4.5175]
    my $time = time();
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 627
    [4.5278][4.5278:5312]()
    , timestamp => time()
    [4.5278]
    [4.5312]
    , timestamp => $time
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 644
    [4.5889][4.5889:5956]()
    print STDERR "added to queue as build ", $build->id, "\n";
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 647
    [4.6016][4.6016:6173]()
    $build->create_related('buildschedulinginfo',
    { priority => $priority
    , busy => 0
    , locker => ""
    });
    [4.6016]
    [4.6173]
    if(isValidPath($outPath)) {
    print STDERR "marked as cached build ", $build->id, "\n";
    $build->update({ finished => 1 });
    $build->create_related('buildresultinfo',
    { iscachedbuild => 1
    , buildstatus => 0
    , starttime => $time
    , stoptime => $time
    , logfile => getBuildLog($drvPath)
    , errormsg => ""
    , releasename => getReleaseName($outPath)
    });
    } else {
    print STDERR "added to queue as build ", $build->id, "\n";
    $build->create_related('buildschedulinginfo',
    { priority => $priority
    , busy => 0
    , locker => ""
    });
    }
  • replacement in src/script/hydra_build.pl at line 86
    [4.79][3.31:152]()
    return if ! ( $build->jobset->enableemail && ($build->maintainers neq "" || $build->jobset->emailoverride neq "") );
    [4.79]
    [4.115]
    return if ! ( $build->jobset->enableemail && ($build->maintainers ne "" || $build->jobset->emailoverride ne "") );
  • replacement in src/script/hydra_build.pl at line 379
    [4.1652][4.1652:1911]()
    my $releaseName;
    if (-e "$outPath/nix-support/hydra-release-name") {
    open FILE, "$outPath/nix-support/hydra-release-name" or die;
    $releaseName = <FILE>;
    chomp $releaseName;
    close FILE;
    }
    [4.1652]
    [4.4463]
    my $releaseName = getReleaseName($outPath);