| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Pilot.Export
Description
The S3 publication of a compiled OSV artifact, guarded against older and sharply reduced data.
Each attempt reads the destination's metadata with HEAD, asks Ecluse.Core.Osv.Publication whether the candidate may replace what it found, and writes the artifact and its new metadata in one conditional PUT over that revision. A conflict rereads and decides again. The metadata carries the durable baseline, so the guard reads no object history and no stored database.
Synopsis
- data Published = Published {
- pubRevision :: Maybe ObjectRevision
- pubPlan :: PublicationPlan
- data PublicationStop
- = PublicationRefused PublicationRefusal
- | PublicationFaulted StoreFault
- data StoreFault
- = StoreTransport TransportFault
- | StoreReadDenied
- | StoreAbsenceUnknown
- | StoreListDenied
- | StoreResponseTooLarge Int
- | StoreNoRevision
- | StoreConditionalWriteUnsupported
- | StoreEnvelopeRefused EnvelopeFault
- | StoreConflictsExhausted Int
- | StoreWriteUncertain TransportFault RereadFinding
- data RereadFinding
- = RereadNoObject
- | RereadOtherRevision ObjectRevision
- | RereadFailed StoreFault
- renderPublicationStop :: PublicationStop -> Text
- maxPublicationAttempts :: Int
- publishCandidate :: (MonadUnliftIO m, KatipContext m) => Maybe TracerProvider -> Env -> ShrinkPolicy -> BaselineCapability -> Maybe Rebaseline -> Text -> Text -> OsvCandidate -> m (Either PublicationStop Published)
Documentation
A publication that landed: the revision the store reported, and the decision it carried out.
Constructors
| Published | |
Fields
| |
data PublicationStop Source #
Why a publication stopped without replacing the stored artifact.
Constructors
| PublicationRefused PublicationRefusal | The guard refused the candidate. |
| PublicationFaulted StoreFault | The store could not be read or written as the guard requires. |
Instances
| Exception PublicationStop Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods toException :: PublicationStop -> SomeException # fromException :: SomeException -> Maybe PublicationStop # displayException :: PublicationStop -> String # backtraceDesired :: PublicationStop -> Bool # | |
| Show PublicationStop Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods showsPrec :: Int -> PublicationStop -> ShowS # show :: PublicationStop -> String # showList :: [PublicationStop] -> ShowS # | |
| Eq PublicationStop Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods (==) :: PublicationStop -> PublicationStop -> Bool # (/=) :: PublicationStop -> PublicationStop -> Bool # | |
data StoreFault Source #
A store condition that leaves the publication's outcome unproven, so nothing is promoted.
Constructors
| StoreTransport TransportFault | A request failed outright. |
| StoreReadDenied | The object exists, and HEAD was refused, so its metadata cannot be read. |
| StoreAbsenceUnknown | HEAD was refused, and the listing could not prove the key absent. |
| StoreListDenied | Both HEAD and the one-key listing were refused. |
| StoreResponseTooLarge Int | A HEAD or listing response passed its byte bound, carried. |
| StoreNoRevision | HEAD answered without an ETag or a length. |
| StoreConditionalWriteUnsupported | The store refused a conditional write as unimplemented. |
| StoreEnvelopeRefused EnvelopeFault | The new metadata cannot be written. |
| StoreConflictsExhausted Int | Every attempt lost a race to another writer. |
| StoreWriteUncertain TransportFault RereadFinding | The write failed without proof either way, and the reread found no write of this publication. |
Instances
| Show StoreFault Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods showsPrec :: Int -> StoreFault -> ShowS # show :: StoreFault -> String # showList :: [StoreFault] -> ShowS # | |
| Eq StoreFault Source # | |
Defined in Ecluse.Runtime.Pilot.Export | |
data RereadFinding Source #
What the reread after an unproven write found.
Constructors
| RereadNoObject | |
| RereadOtherRevision ObjectRevision | |
| RereadFailed StoreFault |
Instances
| Show RereadFinding Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods showsPrec :: Int -> RereadFinding -> ShowS # show :: RereadFinding -> String # showList :: [RereadFinding] -> ShowS # | |
| Eq RereadFinding Source # | |
Defined in Ecluse.Runtime.Pilot.Export Methods (==) :: RereadFinding -> RereadFinding -> Bool # (/=) :: RereadFinding -> RereadFinding -> Bool # | |
renderPublicationStop :: PublicationStop -> Text Source #
The stop as an operator reads it.
maxPublicationAttempts :: Int Source #
How many conditional writes one publication attempts before it gives up a race.
publishCandidate :: (MonadUnliftIO m, KatipContext m) => Maybe TracerProvider -> Env -> ShrinkPolicy -> BaselineCapability -> Maybe Rebaseline -> Text -> Text -> OsvCandidate -> m (Either PublicationStop Published) Source #
Publish the candidate under bucket and key, deciding each attempt on a fresh HEAD. Each attempt's nonce identifies it if it lands unseen.