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