diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-10 15:18:19 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-10 15:18:19 +0100 |
commit | afabc4a15d5ba6631bd4d865b8be37fc67d52809 (patch) | |
tree | 2342d9e8bd8b4cfbfee2b9a98c088df9f1c809ca /maintainers/scripts | |
parent | 9a0c85ffc5aedc46b4d81f3b9fc22d7f488e3ff9 (diff) | |
parent | 714e527a726c9613fca8e13586a1b19198d68d9b (diff) |
Merge remote-tracking branch 'origin/master' into HEAD
Conflicts: pkgs/development/libraries/SDL2/default.nix
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/haskell/hydra-report.hs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs index 5573e5e5afc6e..2ce3ecb2ae70a 100755 --- a/maintainers/scripts/haskell/hydra-report.hs +++ b/maintainers/scripts/haskell/hydra-report.hs @@ -187,7 +187,7 @@ getBuildReports opt = runReq defaultHttpConfig do getEvalBuilds :: HydraSlownessWorkaroundFlag -> Int -> Req (Seq Build) getEvalBuilds NoHydraSlownessWorkaround id = - hydraJSONQuery (responseTimeout 900000000) ["eval", showT id, "builds"] + hydraJSONQuery mempty ["eval", showT id, "builds"] getEvalBuilds HydraSlownessWorkaround id = do Eval{builds} <- hydraJSONQuery mempty [ "eval", showT id ] forM builds $ \buildId -> do @@ -195,14 +195,15 @@ getEvalBuilds HydraSlownessWorkaround id = do hydraJSONQuery mempty [ "build", showT buildId ] hydraQuery :: HttpResponse a => Proxy a -> Option 'Https -> [Text] -> Req (HttpResponseBody a) -hydraQuery responseType option query = - responseBody - <$> req - GET - (foldl' (/:) (https "hydra.nixos.org") query) - NoReqBody - responseType - (header "User-Agent" "hydra-report.hs/v1 (nixpkgs;maintainers/scripts/haskell) pls fix https://github.com/NixOS/nixos-org-configurations/issues/270" <> option) +hydraQuery responseType option query = do + let customHeaderOpt = + header + "User-Agent" + "hydra-report.hs/v1 (nixpkgs;maintainers/scripts/haskell) pls fix https://github.com/NixOS/nixos-org-configurations/issues/270" + customTimeoutOpt = responseTimeout 900_000_000 -- 15 minutes + opts = customHeaderOpt <> customTimeoutOpt <> option + url = foldl' (/:) (https "hydra.nixos.org") query + responseBody <$> req GET url NoReqBody responseType opts hydraJSONQuery :: FromJSON a => Option 'Https -> [Text] -> Req a hydraJSONQuery = hydraQuery jsonResponse |