Allow dashes in jobset input names

[?]
Sep 23, 2013, 9:53 PM
KYSBJAYN5KFQL7WV3TMQJD5BCKTQ3ZMKL6FREJ3NK2IPKCSCRDZAC

Dependencies

  • [2] LZVO64YG Merge in the first bits of the API work
  • [3] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [4] LSZLZHJY Allow users to edit their own settings
  • [5] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [6] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [*] 3HZY24CX * Make jobsets viewable under
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.

Change contents

  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 251
    [2.11557][3.1210:1309](),[3.1210][3.1210:1309]()
    error($c, "Invalid Nix expression input name: $nixExprInput") unless $nixExprInput =~ /^\w+$/;
    [2.11557]
    [3.1309]
    error($c, "Invalid Nix expression input name: $nixExprInput") unless $nixExprInput =~ /^[[:alpha:]][\w-]*$/;
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 312
    [2.13038][2.13038:13131]()
    error($c, "Invalid input name: $inputName") unless $inputName =~ /^[[:alpha:]]\w*$/;
    [2.13038]
    [3.2750]
    error($c, "Invalid input name: $inputName") unless $inputName =~ /^[[:alpha:]][\w-]*$/;
  • replacement in src/lib/Hydra/Controller/Root.pm at line 226
    [2.23130][2.23130:23189]()
    $c->stash->{resource} = { errors => "$c->error" };
    [2.23130]
    [3.1625]
    $c->stash->{resource} = { errors => $c->error };
  • replacement in tests/api-test.pl at line 40
    [2.37908][2.37908:38157]()
    $result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "src", inputs => { src => { type => "path", values => "/run/jobset" } }, enabled => "1", checkinterval => "3600"} });
    [2.37908]
    [2.38157]
    $result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", inputs => { "my-src" => { type => "path", values => "/run/jobset" } }, enabled => "1", checkinterval => "3600"} });
  • replacement in tests/api-test.pl at line 45
    [2.38310][2.38310:38519]()
    ok($jobset->{jobsetinputs}->[0]->{name} eq "src", "The new jobset has an 'src' input");
    ok($jobset->{jobsetinputs}->[0]->{jobsetinputalts}->[0]->{value} eq "/run/jobset", "The 'src' input is in /run/jobset");
    [2.38310]
    [2.38519]
    ok($jobset->{jobsetinputs}->[0]->{name} eq "my-src", "The new jobset has a 'my-src' input");
    ok($jobset->{jobsetinputs}->[0]->{jobsetinputalts}->[0]->{value} eq "/run/jobset", "The 'my-src' input is in /run/jobset");