* Merge the GC branch.
[?]
Nov 19, 2010, 11:01 AM
AEFNBIIWLCTYPU6PDYG6D7OYGVP3E7DAGMYPIXVKCVVHJAM63FNACDependencies
- [2]
XBU2ODSP* More renaming. - [3]
AEKIREIH* Updated hydra_eval_jobs for the new evaluator. - [4]
FGQPXZIXhydra: make nr of build to keep configurable per jobset - [5]
E3LZ5H7Qhydra: only use keepnr to determine if builds should be kept - [6]
FV2M6MOThydra: use autoconf/-make - [7]
6A6CZ7SCdraft manual - [8]
3E6IP3R3* Add the name of the jobset to ReleaseSetJobs, otherwise we can't - [9]
WZ3AEJ67* hydra_update_gc_roots.pl registers build outputs that should be kept - [10]
A63IHCMX* Register GC roots properly. - [11]
UUGBVEGY* Development notes. - [12]
HOVPJBFF* Require every argument to be specified. - [13]
IN272KZW* Automatically keep all builds in the latest successful release in - [14]
7YCFGMZB* Report evaluation errors per job, and don't bail out if a job fails - [15]
HLYVEJX7* Keep the 3 most recent builds for every platform for every job. - [16]
4X6NS66Q* Keep the most recent builds for each job. - [17]
NEWDDAOF* Allow users to change the value of a build's "keep" flag, which - [18]
AFGT66EIhydra: if a project or jobset is hidden (and thus disabled) do not keep builds - [19]
4LWGZL33 - [20]
KD5237CU* eval-jobs now efficiently evaluates all Hydra jobs from a - [21]
4N5APGRG* Start of a helper tool to evaluate job expressions efficiently. - [*]
RFE6T5LG* Store jobset evaluations in the database explicitly. This includes
Change contents
- file deletion: Makefile.am
SUBDIRS = manualBOOTCLEAN_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
typedef std::map<Symbol, std::pair<unsigned int, Value> > ArgsUsed;typedef std::map<Symbol, list<Value> > AutoArgs;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
Value v, arg;state.mkAttrs(arg);*arg.attrs = actualArgs;mkApp(v, fun, arg);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
foreach (list<Value>::const_iterator, i, a->second) {foreach (ValueList::const_iterator, i, a->second) { - replacement in src/c/hydra_eval_jobs.cc at line 63
actualArgs2[cur->name].value = *i;argsUsed2[cur->name] = std::pair<unsigned int, Value>(n, *i);actualArgs2.push_back(Attr(cur->name, *i));actualArgs2.sort(); // !!! inefficientargsUsed2[cur->name] = std::pair<unsigned int, Value *>(n, *i); - replacement in src/c/hydra_eval_jobs.cc at line 78
xmlAttrs2["value"] = (format("%1%") % i->second.second).str();xmlAttrs2["value"] = (format("%1%") % *i->second.second).str(); - replacement in src/c/hydra_eval_jobs.cc at line 110
- replacement in src/c/hydra_eval_jobs.cc at line 167
findJobs(state, doc, argsUsed, argsLeft, i->second.value,(attrPath.empty() ? "" : attrPath + ".") + (string) i->first);findJobs(state, doc, argsUsed, argsLeft, *i->value,(attrPath.empty() ? "" : attrPath + ".") + (string) i->name); - replacement in src/c/hydra_eval_jobs.cc at line 217
Value v;Value * v = state.allocValue(); - replacement in src/c/hydra_eval_jobs.cc at line 219
state.eval(parseExprFromString(state, value, absPath(".")), v);state.eval(parseExprFromString(state, value, absPath(".")), *v); - replacement in src/c/hydra_eval_jobs.cc at line 221
mkString(v, value);mkString(*v, value); - edit in src/c/hydra_eval_jobs.cc at line 244
std::cout.setf(std::ios::unitbuf); - replacement in src/script/hydra_update_gc_roots.pl.in at line 39
# Go over all jobs in this project.# 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";# 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;# 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