ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.BootError

Description

The boot-error vocabulary of the composition root: every reason Écluse refuses to start, and its operator-facing rendering.

Each case is a fail-loud boot failure; the composition root aggregates them so a single run reports every problem an operator must fix (see docs/architecture/configuration.mdValidation). The sibling composition modules produce these -- credential resolution (Ecluse.Composition.Credential), queue-backend selection (Ecluse.Composition.MirrorQueue), and the mount/publish wiring (Ecluse.Composition) -- and this module is their shared spine, so it holds no policy of its own beyond the rendering.

Synopsis

Documentation

data BootError Source #

A reason the composition root refuses to start. Every case is a fail-loud boot failure; they are aggregated so a single run reports every problem an operator must fix.

Constructors

PolicyBootError PolicyError

A rule policy did not resolve (surfaced by loadConfig).

MissingAdapter Ecosystem

A configured mount's ecosystem has no adapter wired, so it cannot be served (a loud miss, never a silent drop). Carries the ecosystem.

UnresolvedCredential Ecosystem

A mount has no initialised mirror-write provider. The credential is derived from the mirror-target URL and realised for every active mount, so this is a total safety net rather than a reachable operator misconfiguration. Carries the ecosystem of the mount.

QueueProviderUnavailable Text

The queue URL names a backend (by its shape) that has no implementation compiled into this binary, so no queue can be built for it. Carries the provider's name. An honest refusal -- never a silent fall-through to a different backend.

QueueRegionMissing

An SQS endpoint override (AWS_ENDPOINT_URL_SQS) is set but no AWS_REGION was supplied: an emulator or VPC endpoint does not carry a region in its host, so the ambient region must scope it. A real SQS queue URL carries its own region and never raises this.

QueueUrlUnrecognised Text

ECLUSE_QUEUE__URL is set but its shape names no backend this binary knows, so refusing is the only honest move (guessing a backend would send mirror jobs somewhere the operator did not point at). Carries the value.

QueueEndpointMalformed Text

The configured SQS endpoint override (AWS_ENDPOINT_URL_SQS) is not a parseable endpoint URL. Carries the offending value.

CodeArtifactMintFailed Text

The eager boot-time CodeArtifact mint threw -- a transient AWS error (worth a retry) or a permanent one (a bad domain/region or missing permission, to be fixed). Carries the rendered exception so the cause is legible and aggregated.

PublishAllowMissing Ecosystem

A publication target was configured (ECLUSE_MOUNTS{ECOSYSTEM}PUBLICATION_TARGET) but no publish allow-list (ECLUSE_MOUNTS{ECOSYSTEM}PUBLISH_ALLOW) was supplied, so the anti-shadowing guard would have nothing to enforce. Refused at boot rather than defaulting to an empty allow-list (which would deny every publish) or an open one (which would let a client shadow any public name).

PublishStaticCredentialNeedsEdge Ecosystem

A static publish credential (ECLUSE_MOUNTS{ECOSYSTEM}PUBLICATION_TARGET_TOKEN) was configured without a verifiable inbound edge (ECLUSE_SERVER__AUTH_TOKEN). Écluse would otherwise substitute its own standing write credential for a publishing caller who forwards none, so an unauthenticated request could publish within the configured scopes under Écluse's own identity. Refused at boot so an internal publish credential paired with an open edge is unrepresentable -- the write-side counterpart of the fail-closed read identity.

MemoryPlanOverrideUnsafe [Text]

An explicit memory override breaks the combined memory-plan invariant even after every computed tenant shed to its minimum (Ecluse.Composition.MemoryPlan). Carries the solver's per-violation diagnostics. A computed plan never raises this: it degrades gracefully and boots; an override is an operator claim, and a false one is refused.

Instances

Instances details
Show BootError Source # 
Instance details

Defined in Ecluse.Composition.BootError

Eq BootError Source # 
Instance details

Defined in Ecluse.Composition.BootError

renderBootError :: BootError -> Text Source #

Render a BootError as a human-facing line for the aggregated failure block.

mountEnvKey :: Ecosystem -> Text -> Text Source #

The full environment key of a mount-scoped setting (ECLUSE_MOUNTS{ECOSYSTEM}{KEY}), as the operator must set it: the Ecosystem-typed wrapper over the shared mountEnvKey, used by the boot-error renderings above.