Remove the "clone build" feature

[?]
Oct 4, 2013, 1:43 PM
VCG6KNUXD2O4AFRCHIHI4HYKKDNMUGUFFXI72HOTTOOLJMOV7BCAC

Dependencies

  • [2] VG4QG336 Remove tablesorter
  • [3] FTPCV25M Store aggregate members in the database
  • [4] GS4SFHCP templates: Use uri_for to reference static paths.
  • [5] JIJDYWPY Remove the Build menu from the top bar
  • [6] UOINKJ2J Add an action to cancel all builds in a jobset eval
  • [7] OX6NYJDV Split viewing and editing a jobset
  • [8] 64IV56HI Replace bootstrap tarball
  • [9] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [10] LSZLZHJY Allow users to edit their own settings
  • [11] J3RYO2CU Remove the jobs status page
  • [12] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [13] D7X6XTKQ Integrate the "Job status" and "All jobs" tabs
  • [14] KKJNJHO5 Update bootstrap to 2.0.3
  • [15] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [16] OR5SJ42Y Show releases in a tab on the project page
  • [17] JAH3UPWA Support revision control systems via plugins
  • [18] 2BUX775I * More release -> view.
  • [19] ND75XNSQ Allow showing all evaluations that contain a given build
  • [20] SMTMFEKE hydra: add missing templates
  • [21] AK2UZDS2 Jobset page: Add a new tab to show job status in a matrix
  • [22] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [23] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [24] CS2CB4EQ fix for clone build with build as input
  • [25] LFVXESGI Remove already disabled jobstatus code
  • [26] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [27] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [28] 3JBUMW3E forgot to commit a file
  • [29] NEQ4BISO Add bootstrap.zip
  • [30] UICHT2PS Add a search feature
  • [31] TPDJL4TY * Add derivations and all build-time dependencies of a build to the
  • [32] GJFYEU3S * Nix now stores logs by default as bzip2, make sure the build page uncompresses before showing.
  • [33] LBNVQXUB * Build the /build stuff in a separate controller.
  • [34] NUIKDEHL * A quick hack to list the contents of various types of files (RPM,
  • [35] CQTN62OH Die tabs die
  • [36] R6B5CAFF Let Builds.timestamp refer to the time the build was added
  • [37] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [38] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [39] CFQCNNDR use build timestamp as last-modified header on download
  • [40] KXGOUX7P * Creating releases.
  • [41] AS2OXLRM * Editing releases.
  • [42] XHVZXX6N
  • [43] JOVVHIJX Remove all entry points to modify machines
  • [44] HXBXDEFK Speed up channel processing
  • [45] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [46] Z6MDQIGO * A quick (non-Web 2.0) interface to manually add builds to a release.
  • [47] TRDGNILT Remove unused file
  • [48] FV2M6MOT hydra: use autoconf/-make
  • [49] 2GUAKGTB Fix indentation of build.tt
  • [50] L2E6EVE2 * Merged the Build and Job tables.
  • [51] U4TD3AIQ Add support for viewing jobset evaluations
  • [52] BHZXGT2H * Channels: provide an index page that lists all the packages in the
  • [53] 36M6DGIT Show the runtime/build dependencies in the build page
  • [54] HSVVEKTY * Start of a JSON API to get information about a specific build.
  • [55] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [56] RXVJFQ5A Evaluator cleanups
  • [57] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [58] YS3AVMLC Remove buildtime and runtime dependency graph. It is useless on normal derivations.
  • [59] RSEGBU6C Hydra/20: Jobset clone feature
  • [60] 5NO7NCKT * Refactoring.
  • [61] D5QIOJGP * Move everything up one directory.
  • [62] QMW24O5S Add support for Guile & Guix.
  • [63] QTC3SYBM Jobset page: Load the jobs and status tabs on demand
  • [64] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [65] MOX7XJ2E Merge the BuildSchedulingInfo table into the Builds table
  • [66] LZVO64YG Merge in the first bits of the API work
  • [67] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [68] D7PL2VWU Move more actions from the top bar
  • [69] 3PNG7NIB Remove trailing whitespace
  • [70] G2WXEQHE Remove the Errors page
  • [71] ZFEN2MAO Simplify jobset cloning
  • [72] PZL3SZM3 Give every page a consistent title
  • [73] HZWUT4YN Allow users to reproduce builds on their own systems
  • [74] U72VNKRU Remove unused file
  • [75] PHNLYPKB Call buildFinished when a cached build is added
  • [76] 6KIJX24R Get rid of unnecessary [%- and -%] tags
  • [77] YFPZ46YK * hydra: added variant of build input type, 'build output (same system)' to allow better continous integration in one jobset for multiple system. it makes sure that the system of the build that is passed as input for a job has the same system as the job.
  • [78] SZYDW2DG hydra: added some user admin
  • [79] 5DSDXORD hydra: missing plain.tt
  • [80] R2PON6R7 Allow non-admin users to see the machine status page
  • [81] JOYONH2K Prevent multiple builds with the same (job, outPath) tuple from being added
  • [82] 2JQ7WEFM
  • [83] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [84] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [85] OIDTPX3F Remove some obsolete JSON APIs
  • [86] WRIU3S5E * UI for cloning builds (not functional yet).
  • [87] 3XTHEUMP * Implemented the clone feature.
  • [88] QNDXPVCI * Store the jobset's nixExprPath and nixExprInput fields in a build to
  • [89] XJFHFZCA * Provide some redirects to build products by type so that we can for
  • [90] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [91] JY7BXXOP Split viewing and editing a project
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 516
    [7.5806][7.0:4](),[7.1243][7.0:4](),[7.4][7.5807:5869](),[7.5869][7.61:123](),[7.61][7.61:123](),[7.123][7.641:642](),[7.642][7.128:221](),[7.128][7.128:221]()
    }
    sub clone : Chained('buildChain') PathPart('clone') Args(0) {
    my ($self, $c) = @_;
    my $build = $c->stash->{build};
    requireProjectOwner($c, $build->project);
    $c->stash->{template} = 'clone-build.tt';
  • edit in src/lib/Hydra/Controller/Build.pm at line 517
    [7.223][7.223:225](),[7.225][7.5870:5946](),[7.5946][7.296:321](),[7.296][7.296:321]()
    sub clone_submit : Chained('buildChain') PathPart('clone/submit') Args(0) {
    my ($self, $c) = @_;
  • edit in src/lib/Hydra/Controller/Build.pm at line 518
    [7.322][7.322:358]()
    my $build = $c->stash->{build};
  • edit in src/lib/Hydra/Controller/Build.pm at line 519
    [7.644][7.363:409](),[7.363][7.363:409](),[7.409][7.31:32](),[7.32][7.0:96](),[7.96][7.409:410](),[7.124][7.409:410](),[7.409][7.409:410](),[7.410][7.76:191](),[7.191][7.1655:1730](),[7.1730][7.259:260](),[7.259][7.259:260](),[7.260][7.125:258](),[7.410][7.125:258](),[7.258][7.97:122](),[7.122][7.258:656](),[7.258][7.258:656](),[7.656][7.123:395](),[7.395][7.172:257](),[7.257][7.746:800](),[7.746][7.746:800](),[7.800][7.396:465](),[7.465][7.800:847](),[7.800][7.800:847](),[7.847][7.261:359](),[7.359][7.553:973](),[7.553][7.553:973](),[7.973][3.894:935](),[3.935][7.0:89](),[7.1031][7.0:89](),[7.66][7.1090:1165](),[7.70][7.1090:1165](),[7.89][7.1090:1165](),[7.1090][7.1090:1165](),[7.1165][7.645:646](),[7.646][6.586:667](),[6.667][7.647:648](),[7.1249][7.647:648](),[7.648][7.476:557](),[7.476][7.476:557](),[7.482][7.3293:3297](),[7.557][7.3293:3297](),[7.916][7.3293:3297](),[7.1243][7.3293:3297](),[7.1881][7.3293:3297](),[7.3293][7.3293:3297]()
    requireProjectOwner($c, $build->project);
    my ($nixExprPath, $nixExprInputName) = Hydra::Controller::Jobset::nixExprPathFromParams $c;
    # When the expression is in a .scm file, assume it's a Guile + Guix
    # build expression.
    my $exprType =
    $c->request->params->{"nixexprpath"} =~ /.scm$/ ? "guile" : "nix";
    my $jobName = trim $c->request->params->{"jobname"};
    error($c, "Invalid job name: $jobName") if $jobName !~ /^$jobNameRE$/;
    my $inputInfo = {};
    foreach my $param (keys %{$c->request->params}) {
    next unless $param =~ /^input-(\w+)-name$/;
    my $baseName = $1;
    my ($inputName, $inputType) =
    Hydra::Controller::Jobset::checkInput($c, $baseName);
    my $inputValue = Hydra::Controller::Jobset::checkInputValue(
    $c, $inputType, $c->request->params->{"input-$baseName-value"});
    eval {
    # !!! fetchInput can take a long time, which might cause
    # the current HTTP request to time out. So maybe this
    # should be done asynchronously. But then error reporting
    # becomes harder.
    my $info = fetchInput(
    $c->hydra_plugins, $c->model('DB'), $build->project, $build->jobset,
    $inputName, $inputType, $inputValue);
    push @{$$inputInfo{$inputName}}, $info if defined $info;
    };
    error($c, $@) if $@;
    }
    my ($jobs, $nixExprInput) = evalJobs($inputInfo, $exprType, $nixExprInputName, $nixExprPath);
    my $job;
    foreach my $j (@{$jobs->{job}}) {
    print STDERR $j->{jobName}, "\n";
    if ($j->{jobName} eq $jobName) {
    error($c, "Nix expression returned multiple builds for job $jobName.")
    if $job;
    $job = $j;
    }
    }
    error($c, "Nix expression did not return a job named $jobName.") unless $job;
    my %currentBuilds;
    my $newBuild = checkBuild(
    $c->model('DB'), $build->jobset,
    $inputInfo, $nixExprInput, $job, \%currentBuilds, undef, {}, $c->hydra_plugins);
    error($c, "This build has already been performed.") unless $newBuild;
    $c->flash->{successMsg} = "Build " . $newBuild->id . " added to the queue.";
    $c->res->redirect($c->uri_for($c->controller('Root')->action_for('queue')));
    }
  • file deletion: clone-build.tt (----------)
    [7.1486][7.2222:2260](),[7.2260][7.728:728]()
    [% WRAPPER layout.tt title="Clone build ${build.id}" %]
    [% PROCESS common.tt %]
    [% USE HTML %]
    [% edit=1 %]
    <p>Cloning allows you to perform a build with modified inputs.</p>
    <form action="[% c.uri_for('/build' build.id 'clone' 'submit') %]" method="post">
    <h2>Nix expression</h2>
    <p>Evaluate job <tt><input type="text" class="string"
    name="jobname" [% HTML.attributes(value => build.job.name) %]
    /></tt> in Nix expression <tt><input type="text" class="string"
    name="nixexprpath" [% HTML.attributes(value => build.nixexprpath) %]
    /></tt> in input <tt><input type="text" class="string"
    name="nixexprinput" [% HTML.attributes(value => build.nixexprinput)
    %] /></tt>.</p>
    <h2>Build inputs</h2>
    <table class="table table-condensed table-striped">
    <thead>
    <tr><th>Name</th><th>Type</th><th>Value</th></tr>
    </thead>
    <tbody>
    [% FOREACH input IN build.inputs %]
    <tr>
    <td><tt>[% input.name %]<input type="hidden" [% HTML.attributes(name => "input-$input.name-name" value => input.name) %] /></tt></td>
    <td>
    [% INCLUDE renderSelection curValue=input.type param="input-$input.name-type" options=inputTypes %]
    </td>
    <td>
    <tt><input type="text" class="string" name="input-[% input.name %]-value"
    [% IF input.type == "build" || input.type == "sysbuild" %]
    [% build = input.dependency %]
    [% HTML.attributes(value => build.project.name _ ':' _ build.jobset.name _ ':' _ build.job.name _ '[id="'_ build.id _ '"]' ) %]
    [% ELSE %]
    [% HTML.attributes(value => input.value || input.uri) %]
    [% END %] /></tt>
    </td>
    </tr>
    [% END %]
    </tbody>
    </table>
    </form>
    [% END %]
    <p><button type="submit"><img alt="Add" src="[% c.uri_for("/static/images/success.gif") %]" />Add to queue</button></p>
  • edit in src/root/build.tt at line 81
    [5.385][5.385:465]()
    <li><a href="[% c.uri_for('/build' build.id 'clone') %]">Clone</a></li>
  • replacement in src/sql/hydra.sql at line 145
    [7.664][7.664:729]()
    -- instantiated this build. Needed if we want to clone this
    [7.664]
    [7.729]
    -- instantiated this build. Needed if we want to reproduce this