Hydra/Controller/Root: remove deprecated LocalRegex

[?]
Nov 30, 2021, 8:37 PM
GD4VD4SCRO55SQ4A4ZZ552ANYJI6I76G6YWV7PHXIW6RJRWOMSLQC

Dependencies

  • [2] YAD7524S Proxy local binary caches via hydra-server
  • [3] TF5HAPRD export a /prometheus endpoint
  • [4] RWNXH3H2 lastModified -> lastModifiedDate
  • [5] LSZLZHJY Allow users to edit their own settings
  • [6] HAI5TY47 Make negative narinfo responses much smaller
  • [7] 5OXBTB3L Don't fall thru to Hydra::View::NARInfo
  • [8] QOV7KWRH Expose Prometheus metrics at /metrics
  • [9] XE6HD7BP Provide the nix-cache-info file required by the binary cache substituter
  • [10] YBT5G74Q LDAP: add the required packages to the perlPackage via the overlay
  • [11] AFEKITYD Fix some warnings about undefined values
  • [12] SZYDW2DG hydra: added some user admin
  • [13] MVB7RRLT * Move NARs from the NixChannel controller to the Root controller and
  • [14] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>

Change contents

  • edit in flake.nix at line 432
    [4.1405][4.1405:1447]()
    CatalystDispatchTypeRegex
  • edit in src/lib/Hydra/Controller/Root.pm at line 18
    [3.70]
    [17.0]
    use Types::Standard qw/StrMatch/;
    use constant NARINFO_REGEX => qr{^([a-z0-9]{32})\.narinfo$};
  • replacement in src/lib/Hydra/Controller/Root.pm at line 355
    [5.684][5.0:85]()
    sub narinfo :LocalRegex('^([a-z0-9]+).narinfo$') :Args(0) {
    my ($self, $c) = @_;
    [5.684]
    [5.124]
    sub narinfo :Path :Args(StrMatch[NARINFO_REGEX]) {
    my ($self, $c, $narinfo) = @_;
  • replacement in src/lib/Hydra/Controller/Root.pm at line 363
    [2.1736][2.1736:1779]()
    my $hash = $c->req->captures->[0];
    [2.1736]
    [2.1779]
    my ($hash) = $narinfo =~ NARINFO_REGEX;
  • replacement in src/lib/Hydra/Controller/Root.pm at line 365
    [2.1780][2.1780:1816]()
    die if length($hash) != 32;
    [2.1780]
    [2.1816]
    die("Hash length was not 32") if length($hash) != 32;