* Merge the GC branch.

[?]
Nov 19, 2010, 11:01 AM
AEFNBIIWLCTYPU6PDYG6D7OYGVP3E7DAGMYPIXVKCVVHJAM63FNAC

Dependencies

  • [2] XBU2ODSP * More renaming.
  • [3] AEKIREIH * Updated hydra_eval_jobs for the new evaluator.
  • [4] FGQPXZIX hydra: make nr of build to keep configurable per jobset
  • [5] E3LZ5H7Q hydra: only use keepnr to determine if builds should be kept
  • [6] FV2M6MOT hydra: use autoconf/-make
  • [7] 4LWGZL33
  • [8] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [9] AFGT66EI hydra: if a project or jobset is hidden (and thus disabled) do not keep builds
  • [10] IN272KZW * Automatically keep all builds in the latest successful release in
  • [11] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept
  • [12] 4X6NS66Q * Keep the most recent builds for each job.
  • [13] HOVPJBFF * Require every argument to be specified.
  • [14] NEWDDAOF * Allow users to change the value of a build's "keep" flag, which
  • [15] KD5237CU * eval-jobs now efficiently evaluates all Hydra jobs from a
  • [16] UUGBVEGY * Development notes.
  • [17] 7YCFGMZB * Report evaluation errors per job, and don't bail out if a job fails
  • [18] HLYVEJX7 * Keep the 3 most recent builds for every platform for every job.
  • [19] 4N5APGRG * Start of a helper tool to evaluate job expressions efficiently.
  • [20] 6A6CZ7SC draft manual
  • [21] A63IHCMX * Register GC roots properly.
  • [*] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes

Change contents

  • file deletion: Makefile.am (----------)
    [7.1][6.16909:16944](),[6.16944][6.16827:16827]()
    SUBDIRS = manual
    BOOTCLEAN_SUBDIRS = $(SUBDIRS)
    DIST_SUBDIRS = $(SUBDIRS)
  • edit in doc/dev-notes.txt at line 170
    [23.572]
    * Evaluating the NixOS Hydra jobs:
    $ ./hydra_eval_jobs ~/Dev/nixos-wc/release.nix --arg nixpkgs '{outPath = /home/eelco/Dev/nixpkgs-wc;}' --arg nixosSrc '{outPath = /home/eelco/Dev/nixos-wc; rev = 1234;}' --arg services '{outhPath = /home/eelco/services-wc;}' --argstr system i686-linux --argstr system x86_64-linux --arg officialRelease false
  • replacement in src/c/hydra_eval_jobs.cc at line 24
    [7.28][3.0:117]()
    typedef std::map<Symbol, std::pair<unsigned int, Value> > ArgsUsed;
    typedef std::map<Symbol, list<Value> > AutoArgs;
    [7.28]
    [7.159]
    typedef std::map<Symbol, std::pair<unsigned int, Value *> > ArgsUsed;
    typedef std::list<Value *, traceable_allocator<Value *> > ValueList;
    typedef std::map<Symbol, ValueList> AutoArgs;
  • replacement in src/c/hydra_eval_jobs.cc at line 42
    [3.450][3.450:561]()
    Value v, arg;
    state.mkAttrs(arg);
    *arg.attrs = actualArgs;
    mkApp(v, fun, arg);
    [3.450]
    [3.561]
    Value v, * arg = state.allocValue();
    state.mkAttrs(*arg, 0);
    *arg->attrs = actualArgs;
    mkApp(v, fun, *arg);
  • replacement in src/c/hydra_eval_jobs.cc at line 59
    [3.821][3.821:880]()
    foreach (list<Value>::const_iterator, i, a->second) {
    [3.821]
    [3.880]
    foreach (ValueList::const_iterator, i, a->second) {
  • replacement in src/c/hydra_eval_jobs.cc at line 63
    [3.1017][3.1017:1130]()
    actualArgs2[cur->name].value = *i;
    argsUsed2[cur->name] = std::pair<unsigned int, Value>(n, *i);
    [3.1017]
    [3.1130]
    actualArgs2.push_back(Attr(cur->name, *i));
    actualArgs2.sort(); // !!! inefficient
    argsUsed2[cur->name] = std::pair<unsigned int, Value *>(n, *i);
  • replacement in src/c/hydra_eval_jobs.cc at line 78
    [3.1443][3.1443:1514]()
    xmlAttrs2["value"] = (format("%1%") % i->second.second).str();
    [3.1443]
    [3.1514]
    xmlAttrs2["value"] = (format("%1%") % *i->second.second).str();
  • replacement in src/c/hydra_eval_jobs.cc at line 110
    [7.1576][7.303:308](),[7.303][7.303:308]()
    [7.1576]
    [3.1674]
  • replacement in src/c/hydra_eval_jobs.cc at line 167
    [3.1828][3.1828:1985]()
    findJobs(state, doc, argsUsed, argsLeft, i->second.value,
    (attrPath.empty() ? "" : attrPath + ".") + (string) i->first);
    [3.1828]
    [7.1402]
    findJobs(state, doc, argsUsed, argsLeft, *i->value,
    (attrPath.empty() ? "" : attrPath + ".") + (string) i->name);
  • replacement in src/c/hydra_eval_jobs.cc at line 217
    [7.2604][3.2498:2519]()
    Value v;
    [7.2604]
    [3.2519]
    Value * v = state.allocValue();
  • replacement in src/c/hydra_eval_jobs.cc at line 219
    [3.2551][3.2551:2631]()
    state.eval(parseExprFromString(state, value, absPath(".")), v);
    [3.2551]
    [3.2631]
    state.eval(parseExprFromString(state, value, absPath(".")), *v);
  • replacement in src/c/hydra_eval_jobs.cc at line 221
    [3.2648][3.2648:2684]()
    mkString(v, value);
    [3.2648]
    [3.2684]
    mkString(*v, value);
  • edit in src/c/hydra_eval_jobs.cc at line 244
    [7.1625]
    [7.1625]
    std::cout.setf(std::ios::unitbuf);
  • replacement in src/script/hydra_update_gc_roots.pl.in at line 39
    [7.3701][7.3701:3741]()
    # Go over all jobs in this project.
    [7.3701]
    [7.576]
    # Go over all jobsets in this project.
    foreach my $jobset ($project->jobsets->all) {
    my $keepnr = $jobset->keepnr;
  • replacement in src/script/hydra_update_gc_roots.pl.in at line 43
    [7.577][5.57:101](),[5.101][7.1703:1842](),[7.161][7.1703:1842](),[7.1703][7.1703:1842]()
    foreach my $job ($project->jobs->all) {
    print STDERR "*** looking for builds to keep in job ",
    $project->name, ":", $job->jobset->name, ":", $job->name, "\n";
    [7.577]
    [7.797]
    # If the jobset has been disabled for more than one week, than
    # don't keep its builds anymore.
    if ($jobset->enabled == 0 && (time() - $jobset->lastcheckedtime > (7 * 24 * 3600))) {
    print STDERR "*** skipping disabled jobset ", $project->name, ":", $jobset->name, "\n";
    next;
    }
    # Go over all jobs in this jobset.
    foreach my $job ($jobset->jobs->all) {
    print STDERR "*** looking for builds to keep in job ",
    $project->name, ":", $job->jobset->name, ":", $job->name, "\n";
  • replacement in src/script/hydra_update_gc_roots.pl.in at line 55
    [7.798][7.798:886](),[7.886][7.1843:1946](),[7.1946][7.107:195](),[7.195][4.965:1005](),[4.1005][7.196:490](),[7.196][7.196:490](),[7.490][4.1006:1040](),[4.1040][7.554:615](),[7.554][7.554:615]()
    # Keep the N most recent successful builds for each job and
    # platform.
    # !!! Take time into account? E.g. don't delete builds that
    # are younger than N days.
    my @systems = $job->builds->search({ }, { select => ["system"], distinct => 1 })->all;
    my $keepnr = $job->jobset->keepnr ;
    foreach my $system (@systems) {
    my @recentBuilds = $job->builds->search(
    { finished => 1
    , buildStatus => 0 # == success
    , system => $system->system
    },
    { join => 'resultInfo'
    , order_by => 'id DESC'
    , rows => $keepnr
    });
    keepBuild $_ foreach @recentBuilds;
    [7.798]
    [7.615]
    # Keep the N most recent successful builds for each job
    # and platform.
    # !!! Take time into account? E.g. don't delete builds
    # that are younger than N days.
    my @systems = $job->builds->search({ }, { select => ["system"], distinct => 1 })->all;
    foreach my $system (@systems) {
    my @recentBuilds = $job->builds->search(
    { finished => 1
    , buildStatus => 0 # == success
    , system => $system->system
    },
    { join => 'resultInfo'
    , order_by => 'id DESC'
    , rows => $keepnr
    });
    keepBuild $_ foreach @recentBuilds;
    }
  • edit in src/script/hydra_update_gc_roots.pl.in at line 76
    [2.1367][7.3947:3948](),[7.3947][7.3947:3948]()