Make PathInput plugin cache validity configurable

[?]
Jun 4, 2020, 10:15 AM
KSFJOFICNKAPJPEAD2BHLHXEKU3PQIBL4LL2IK3ONY6KJDXQZPVAC

Dependencies

  • [2] NP7IOJ4Q Flesh out the API a bit
  • [3] MIMHJSZK Add json output for the search API endpoint
  • [4] RWNXH3H2 lastModified -> lastModifiedDate
  • [5] LZVO64YG Merge in the first bits of the API work
  • [6] WYXO75RJ Add support for fetching URLs as inputs.
  • [7] MMHOJIGD Test whether incorrect passwords are rejected
  • [8] JAH3UPWA Support revision control systems via plugins
  • [9] 4VYSDP4I Add eager fetching of relations and enable that for jobset->jobsetinputs
  • [10] 7ECJWNVX Cleanup Project model
  • [11] ZIIXICG7 Make the outputs' outpaths available via the Build JSON API
  • [12] SYLVCTT6 Start api cleanup with the User model
  • [13] MQYHIUEE Cleanup eval serialization
  • [14] 2DGIP6L4 Cleanup build serialization
  • [15] Z3JVFE2R Convert all tests to the Python DSL
  • [16] YI3BZG5N Cleanup Jobset serialization

Change contents

  • replacement in flake.nix at line 201
    [4.6220][4.6220:6255]()
    machine = hydraServer;
    [4.6220]
    [4.6255]
    machine = { pkgs, ... }: {
    imports = [ hydraServer ];
    # No caching for PathInput plugin, otherwise we get wrong values
    # (as it has a 30s window where no changes to the file are considered).
    services.hydra-dev.extraConfig = ''
    path_input_cache_validity_seconds = 0
    '';
    };
  • edit in src/lib/Hydra/Plugin/PathInput.pm at line 24
    [5.13844]
    [5.13844]
    my $timeout = $self->{config}->{path_input_cache_validity_seconds} // 30;
  • replacement in src/lib/Hydra/Plugin/PathInput.pm at line 29
    [5.13999][5.13999:14062]()
    {srcpath => $uri, lastseen => {">", $timestamp - 30}},
    [5.13999]
    [5.14062]
    {srcpath => $uri, lastseen => {">", $timestamp - $timeout}},
  • replacement in tests/api-test.pl at line 3
    [5.36481][3.263:293]()
    use Test::Simple tests => 19;
    [5.36481]
    [5.36511]
    use Test::Simple tests => 20;
  • edit in tests/api-test.pl at line 62
    [5.39401]
    [2.328]
    ok(scalar(@$evals) == 2, "Changing a jobset source creates the second evaluation");