packages feed

hercules-ci-api-agent 0.4.6.0 → 0.4.6.1

raw patch · 11 files changed

+96/−98 lines, 11 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -5,6 +5,10 @@  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.4.6.1 - 2022-12-29++Maintenance and tooling update.+ ## 0.4.6.0 - 2022-11-15  ### Added
hercules-ci-api-agent.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           hercules-ci-api-agent-version:        0.4.6.0+version:        0.4.6.1 synopsis:       API definition for Hercules CI Agent to talk to hercules-ci.com or Hercules CI Enterprise category:       API, CI, Testing, DevOps, Nix homepage:       https://github.com/hercules-ci/hercules-ci-agent#readme
src/Hercules/API/Agent.hs view
@@ -20,7 +20,6 @@   ) import Hercules.API.Prelude import Servant.API-import Servant.API.Generic import Servant.Auth  data AgentAPI auth f = AgentAPI
src/Hercules/API/Agent/Build.hs view
@@ -8,34 +8,33 @@ import Hercules.API.Prelude import qualified Hercules.API.Task as Task import Servant.API-import Servant.API.Generic  data BuildAPI auth f = BuildAPI   { getBuild ::       f         :- "tasks"-        :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))-        :> "build"-        :> auth-        :> Get '[JSON] BuildTask.BuildTask,+          :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))+          :> "build"+          :> auth+          :> Get '[JSON] BuildTask.BuildTask,     updateBuild ::       f         :- "tasks"-        :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))-        :> "build"-        :> ReqBody '[JSON] [BuildEvent.BuildEvent]-        :> auth-        :> Post '[JSON] NoContent,+          :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))+          :> "build"+          :> ReqBody '[JSON] [BuildEvent.BuildEvent]+          :> auth+          :> Post '[JSON] NoContent,     writeBuildLog ::       f         :- Summary "DEPRECATED"-        :> "tasks"-        :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))-        :> "build"-        :> "_log"-        :> ReqBody '[OctetStream] ByteString-        :> auth-        :> Post '[JSON] NoContent+          :> "tasks"+          :> Capture "taskId" (Id (Task.Task BuildTask.BuildTask))+          :> "build"+          :> "_log"+          :> ReqBody '[OctetStream] ByteString+          :> auth+          :> Post '[JSON] NoContent   }   deriving (Generic) 
src/Hercules/API/Agent/Evaluate.hs view
@@ -13,37 +13,36 @@ import Hercules.API.Prelude import Hercules.API.Task (Task) import Servant.API-import Servant.API.Generic  data EvalAPI auth f = EvalAPI   { tasksGetEvaluation ::       f         :- "tasks"-        :> Capture "taskId" (Id (Task EvaluateTask))-        :> "eval"-        :> auth-        :> Get '[JSON] EvaluateTask,+          :> Capture "taskId" (Id (Task EvaluateTask))+          :> "eval"+          :> auth+          :> Get '[JSON] EvaluateTask,     tasksUpdateEvaluation ::       f         :- "tasks"-        :> Capture "taskId" (Id (Task EvaluateTask))-        :> "eval"-        :> ReqBody '[JSON] [EvaluateEvent]-        :> auth-        :> Post '[JSON] NoContent,+          :> Capture "taskId" (Id (Task EvaluateTask))+          :> "eval"+          :> ReqBody '[JSON] [EvaluateEvent]+          :> auth+          :> Post '[JSON] NoContent,     getDerivationStatus ::       f         :- "agent"-        :> "build"-        :> Capture "derivationPath" Text-        :> auth-        :> Get '[JSON] (Maybe DerivationStatus),+          :> "build"+          :> Capture "derivationPath" Text+          :> auth+          :> Get '[JSON] (Maybe DerivationStatus),     getDerivationStatus2 ::       f         :- "agent"-        :> "eval-build"-        :> Capture "derivationPath" Text-        :> auth-        :> Get '[JSON] (Maybe (UUID, DerivationStatus))+          :> "eval-build"+          :> Capture "derivationPath" Text+          :> auth+          :> Get '[JSON] (Maybe (UUID, DerivationStatus))   }   deriving (Generic)
src/Hercules/API/Agent/LifeCycle.hs view
@@ -13,7 +13,6 @@   ) import Hercules.API.Prelude import Servant.API-import Servant.API.Generic  -- | Agent session and "connection" endpoints data LifeCycleAPI auth f = LifeCycleAPI@@ -21,44 +20,44 @@     agentSessionCreate ::       f         :- Summary "Create a new agent session."-        :> Description "Authenticated using the cluster join token acquired through POST /accounts/:accountId/clusterJoinTokens"-        :> "agent"-        :> "session"-        :> ReqBody '[JSON] CreateAgentSession_V2.CreateAgentSession-        :> auth-        :> Post '[JSON] Text,+          :> Description "Authenticated using the cluster join token acquired through POST /accounts/:accountId/clusterJoinTokens"+          :> "agent"+          :> "session"+          :> ReqBody '[JSON] CreateAgentSession_V2.CreateAgentSession+          :> auth+          :> Post '[JSON] Text,     hello ::       f         :- Summary "Update an agent session wrt features, versions, capabilities etc."-        :> Description "Authenticated using the agent session token acquired through agentSessionCreate."-        :> "agent"-        :> "hello"-        :> ReqBody '[JSON] Hello-        :> auth-        :> Post '[JSON] NoContent,+          :> Description "Authenticated using the agent session token acquired through agentSessionCreate."+          :> "agent"+          :> "hello"+          :> ReqBody '[JSON] Hello+          :> auth+          :> Post '[JSON] NoContent,     heartbeat ::       f         :- Summary "Update an agent session to indicate liveness."-        :> Description "Authenticated using the agent session token acquired through agentSessionCreate."-        :> "agent"-        :> "heartbeat"-        :> ReqBody '[JSON] StartInfo-        :> auth-        :> Post '[JSON] NoContent,+          :> Description "Authenticated using the agent session token acquired through agentSessionCreate."+          :> "agent"+          :> "heartbeat"+          :> ReqBody '[JSON] StartInfo+          :> auth+          :> Post '[JSON] NoContent,     goodbye ::       f         :- Summary "Report that an agent has stopped."-        :> Description "Authenticated using the agent session token acquired through agentSessionCreate."-        :> "agent"-        :> "goodbye"-        :> ReqBody '[JSON] StartInfo-        :> auth-        :> Post '[JSON] NoContent,+          :> Description "Authenticated using the agent session token acquired through agentSessionCreate."+          :> "agent"+          :> "goodbye"+          :> ReqBody '[JSON] StartInfo+          :> auth+          :> Post '[JSON] NoContent,     getServiceInfo ::       f         :- Summary "Service version and configuration."-        :> "agent"-        :> "service-info"-        :> Get '[JSON] ServiceInfo+          :> "agent"+          :> "service-info"+          :> Get '[JSON] ServiceInfo   }   deriving (Generic)
src/Hercules/API/Agent/State.hs view
@@ -5,7 +5,6 @@ import Data.ByteString (ByteString) import Hercules.API.Prelude import Servant.API-import Servant.API.Generic  type ContentLength = Header "Content-Length" Integer @@ -13,20 +12,20 @@   { getState ::       f         :- "current-task"-        :> "state"-        :> Capture' '[Required] "name" Text-        :> "data"-        :> auth-        :> StreamGet NoFraming OctetStream (Headers '[ContentLength] (SourceIO ByteString)),+          :> "state"+          :> Capture' '[Required] "name" Text+          :> "data"+          :> auth+          :> StreamGet NoFraming OctetStream (Headers '[ContentLength] (SourceIO ByteString)),     putState ::       f         :- "current-task"-        :> "state"-        :> Capture' '[Required] "name" Text-        :> "data"-        :> StreamBody NoFraming OctetStream (SourceIO ByteString)-        :> ContentLength-        :> auth-        :> Put '[JSON] NoContent+          :> "state"+          :> Capture' '[Required] "name" Text+          :> "data"+          :> StreamBody NoFraming OctetStream (SourceIO ByteString)+          :> ContentLength+          :> auth+          :> Put '[JSON] NoContent   }   deriving (Generic)
src/Hercules/API/Agent/Tasks.hs view
@@ -7,27 +7,26 @@ import qualified Hercules.API.Task as Task import Hercules.API.TaskStatus import Servant.API-import Servant.API.Generic  data TasksAPI auth f = TasksAPI   { tasksReady ::       f         :- "tasks"-        :> auth-        :> Post '[JSON] (Maybe (Task.Task Task.Any)),+          :> auth+          :> Post '[JSON] (Maybe (Task.Task Task.Any)),     tasksSetStatus ::       f         :- "tasks"-        :> Capture "taskId" (Id (Task.Task Task.Any))-        :> ReqBody '[JSON] TaskStatus-        :> auth-        :> Post '[JSON] NoContent,+          :> Capture "taskId" (Id (Task.Task Task.Any))+          :> ReqBody '[JSON] TaskStatus+          :> auth+          :> Post '[JSON] NoContent,     postLog ::       f         :- "tasks"-        :> "log"-        :> ReqBody '[JSON] [Object]-        :> auth-        :> Post '[JSON] NoContent+          :> "log"+          :> ReqBody '[JSON] [Object]+          :> auth+          :> Post '[JSON] NoContent   }   deriving (Generic)
src/Hercules/API/Logs.hs view
@@ -9,17 +9,16 @@ import Data.ByteString (ByteString) import Hercules.API.Prelude import Servant.API-import Servant.API.Generic import Servant.Auth  data LogsAPI logJWT f = LogsAPI   { writeLog ::       f         :- Summary "Write to a log"-        :> Description "Writes an entire log in a single request. Provide a log-specific token for authentication."-        :> "log"-        :> Auth '[JWT] logJWT-        :> ReqBody '[OctetStream] ByteString-        :> Post '[JSON] NoContent+          :> Description "Writes an entire log in a single request. Provide a log-specific token for authentication."+          :> "log"+          :> Auth '[JWT] logJWT+          :> ReqBody '[OctetStream] ByteString+          :> Post '[JSON] NoContent   }   deriving (Generic)
src/Hercules/Formats/CachixCache.hs view
@@ -43,7 +43,7 @@             CachixCache               <$> (fold <$> o .:? "signingKeys")               <*> o-              .:? "authToken"+                .:? "authToken"               <*> o-              .: "publicKeys"+                .: "publicKeys"         ]
test/Hercules/Formats/SecretSpec.hs view
@@ -62,7 +62,8 @@ genSecret =   resize     6-    ( Secret <$> liftArbitraryMap text (resize 100 genValue)+    ( Secret+        <$> liftArbitraryMap text (resize 100 genValue)         <*> frequency [(1, pure Nothing), (19, Just <$> genCondition)]     )