hydra-update-gc-roots: Keep the most recent evaluations

[?]
Aug 16, 2013, 2:21 PM
I3X25POIIRIY47QTN2PA3WMDVROM6TLFJAV3Q5W6AU526TFPNHKAC

Dependencies

  • [2] OX6NYJDV Split viewing and editing a jobset
  • [3] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [4] PMNWRTGJ Add multiple output support
  • [5] KJQWSRCC Speed up hydra-update-gc-roots
  • [6] VJFLX7B6 Fix rendering of jobset inputs
  • [7] QLOLZHRX Allow a per-jobset check interval
  • [8] 3E6IP3R3 * Add the name of the jobset to ReleaseSetJobs, otherwise we can't
  • [9] TFK74CQR Put job status on a separate tab
  • [10] 4X6NS66Q * Keep the most recent builds for each job.
  • [11] NEWDDAOF * Allow users to change the value of a build's "keep" flag, which
  • [12] XBU2ODSP * More renaming.
  • [13] IN272KZW * Automatically keep all builds in the latest successful release in
  • [14] 3PNG7NIB Remove trailing whitespace
  • [15] YISCM3G3 Fix query for certain postgresql versions.
  • [16] ZCTGG25S Add a redirect to the latest view result for which the underlying evaluation has finished completely
  • [17] ONAQU4BR hydra: handle case where build to keep set to 0
  • [18] AEFNBIIW * Merge the GC branch.
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [*] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept

Change contents

  • replacement in src/root/edit-jobset.tt at line 113
    [2.4213][2.4213:4281]()
    <label class="control-label">Number of builds to keep</label>
    [2.4213]
    [2.4281]
    <label class="control-label">Number of evaluations to keep</label>
  • replacement in src/root/jobset.tt at line 136
    [2.9571][2.9571:9614]()
    <th>Number of builds to keep:</th>
    [2.9571]
    [2.9614]
    <th>Number of evaluations to keep:</th>
  • replacement in src/script/hydra-update-gc-roots at line 92
    [3.923][3.18849:18998]()
    # FIXME: base this on jobset evals?
    print STDERR "*** looking for the $keepnr most recent successful builds of each job in jobset ",
    [3.923]
    [3.18998]
    print STDERR "*** looking for all builds in the $keepnr most recent evaluations of jobset ",
  • replacement in src/script/hydra-update-gc-roots at line 95
    [3.798][3.19053:19265](),[3.19265][3.1829:2036](),[3.1829][3.1829:2036](),[3.2036][3.0:107](),[3.107][3.19266:19655]()
    keepBuild $_ foreach $jobset->builds->search(
    { 'me.id' => { 'in' => \
    [ "select b2.id from Builds b2 join " .
    " (select distinct job, system, coalesce( " .
    " (select id from builds where project = b.project and jobset = b.jobset and job = b.job and system = b.system and finished = 1 and buildStatus = 0 order by id desc offset ? limit 1)" .
    " , 0) as nth from builds b where project = ? and jobset = ? and isCurrent = 1) x " .
    " on b2.project = ? and b2.jobset = ? and b2.job = x.job and b2.system = x.system and (id >= x.nth) where finished = 1 and buildStatus = 0"
    , [ '', $keepnr - 1 ], [ '', $project->name ], [ '', $jobset->name ], [ '', $project->name ], [ '', $jobset->name ] ] }
    },
    { order_by => ["job", "system", "id"], columns => [ @columns ] });
    [3.798]
    [3.3896]
    keepBuild $_ foreach $jobset->builds->search(
    { finished => 1, buildStatus => 0
    , id => { -in =>
    \ [ "select build from JobsetEvalMembers where eval in (select id from JobsetEvals where project = ? and jobset = ? and hasNewBuilds = 1 order by id desc limit ?)",
    [ '', $project->name ], [ '', $jobset->name ], [ '', $keepnr ] ] }
    },
    { order_by => ["job", "id"], columns => [ @columns ] });
  • replacement in src/script/hydra-update-gc-roots at line 114
    [3.4440][3.2488:2619]()
    print STDERR " keeping latest successful view result ", $latest->id, " (", $latest->get_column('releasename'), ")\n";
    [3.4440]
    [3.1924]
    print STDERR " keeping latest successful view result ", $latest->id, " (", $latest->get_column('releasename') // "unnamed", ")\n";