ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Package.InvalidEntry

Description

The drop-tracking vocabulary a registry projection records a malformed entry in.

The record reaches an operator log line and an upstream-supplied value can carry a credential, so mkInvalidEntry is the only builder and the constructor stays hidden. The kinds span every ecosystem, and the neutral serve diagnostics bucket them through dropCountsByKind rather than branching on them.

Synopsis

A dropped entry

data InvalidEntry Source #

A single registry-document entry a projection dropped as malformed rather than failing the whole document, kept so an operator can see that an upstream served one, and which.

mkInvalidEntry :: InvalidEntryKind -> Text -> Value -> Text -> InvalidEntry Source #

Record a dropped entry, reducing every URL in the key and the value to its authority: an upstream-supplied artifact location can carry a credential, and this record reaches a log line.

Which kind of entry dropped

data InvalidEntryKind Source #

Which kind of registry-document entry a dropped InvalidEntry came from. A dropped manifest or index file loses a serve candidate, a dropped tag, time or listing only its own datum.

Constructors

InvalidVersionManifest

A versions entry whose manifest did not project (no dist/tarball, an unusable version).

InvalidDistTag

A dist-tags entry whose target was not a usable version string.

InvalidPublishTime

A time entry, keyed by a present version, that was not a decodable instant.

InvalidIndexFile

A Simple-index file entry that did not project (no name or location, an unusable digest).

InvalidVersionListing

A versions-listing entry that was not a usable version string.

renderInvalidEntryKind :: InvalidEntryKind -> Text Source #

The operator-facing label for a drop kind. It is the bucket key an operator filters on, so it is held stable as this text rather than the constructor name.

dropCountsByKind :: [InvalidEntry] -> Map Text Int Source #

How many entries dropped under each kind's label. Only the kinds actually seen appear, so a document's drop profile carries no bucket its ecosystem has no entries for.