hail 0.1.0.3 → 0.2.0.0
raw patch · 3 files changed
+12/−4 lines, 3 files
Files
- ChangeLog.md +4/−0
- Hail/Hydra.hs +7/−3
- hail.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for hail +## 0.2.0.0 -- 2017-08-23++* Exit when hydra URI is invalid (Philipp Hausmann)+ ## 0.1.0.2 -- 2017-05-16 * Fix bug in --oneshot that made it actually --noshot
Hail/Hydra.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} module Hail.Hydra where -import Control.Exception (handle)+import Control.Exception (handleJust) import Network.Wreq-import Network.HTTP.Client (HttpException)+import Network.HTTP.Client (HttpException (InvalidUrlException)) import Data.Aeson.Lens import Control.Lens.Operators import Data.Text (unpack)@@ -15,7 +15,7 @@ -> Maybe Auth -- ^ The credentials to talk to hydra. -> IO (Either String FilePath) getLatest uri m_creds =- handle (return . Left . (show :: HttpException -> String)) $ do+ handleJust isTransientError (return . Left . (show :: HttpException -> String)) $ do r <- getWith opts latestUri let m_outPath = r ^? responseBody . key "buildoutputs" . key "out"@@ -30,3 +30,7 @@ "Latest build of job " ++ uri ++ " has no output named 'out'." latestUri = uri ++ "/latest"++ isTransientError e = case e of+ InvalidUrlException _ _ -> Nothing+ _ -> Just e
hail.cabal view
@@ -1,5 +1,5 @@ name: hail-version: 0.1.0.3+version: 0.2.0.0 synopsis: A service for pull-based continuous deployment based on hydra. description: