You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cacc0b4
Browse filesBrowse the repository at this point in the historyBrowse files
## Why
Every consumer of an indexing event reached into a `Hash` with string
keys. The shape of the envelope lived only in scattered `fetch` calls,
Steep could not check it, and each consumer had to repeat the defaults
for optional fields. A `Data` value with typed members states the
envelope once.
An `Event` exists only after an ingestion adapter validates its
envelope, so every instance has the typed fields the envelope declares.
## What
- `Indexer::Event`, with members `op`, `type`, `id`, `version`,
`record`, `schema_version`, `ingestion_format`, `message_id`, and
`latency_timestamps`.
- Typed accessors in place of `event["x"]` and `event.fetch("x")` across
`EventID`, `FailedEventError`, `IndexingFailuresError`,
`Operation::Factory`, `Operation::Update`, `DatastoreIndexingRouter`,
`Processor`, `IngestionAdapter`, the JSON ingestion adapter,
`WarehouseDumper`, and `TestSupport::Converters`.
- `FailedEventError` delegates `id`, `op`, `type`, `version`, `record`,
and `message_id` to its event through `Forwardable`, and includes
`IndexingFailuresError::_IndexingFailure` so that Steep enforces the
interface it satisfies.
- The JSON adapter's `events_from` returns `Event`s through
`Event.from_validated_hash`.
`Event#record` keeps the native record type of the adapter, which is a
`Hash` for JSON. An ingestion format with a different record type can
therefore carry its own.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
0 commit comments