Skip to content

Move JSON ingestion into elasticgraph-json_ingestion via an indexer extension#1302

Open
jwils wants to merge 1 commit into
joshuaw/ingestion-adapter-seamfrom
joshuaw/json-ingestion-adapter
Open

Move JSON ingestion into elasticgraph-json_ingestion via an indexer extension#1302
jwils wants to merge 1 commit into
joshuaw/ingestion-adapter-seamfrom
joshuaw/json-ingestion-adapter

Conversation

@jwils

@jwils jwils commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Why

JSON parsing and validation has never conceptually belonged to elasticgraph-indexer--it should live in elasticgraph-json_ingestion alongside the JSON schema generation, with the indexer staying ingestion-format-neutral so elasticgraph-proto_ingestion (and others) can plug in the same way.

What

  • Move the JSON ingestion adapter and the JSON-schema-based record preparer factory into elasticgraph-json_ingestion (JSONIngestion::IngestionAdapter, JSONIngestion::RecordPreparerFactory)
  • JSONIngestion::SchemaDefinition::APIExtension registers a JSONIngestion::IndexerExtension via register_indexer_extension, which contributes the adapter to Indexer#ingestion_adapters. Zero configuration: any schema defined with JSON ingestion support automatically gets JSON event ingestion at indexing time, activated through the schema artifacts' runtime metadata
  • elasticgraph-indexer no longer contains or references any JSON-specific ingestion logic; Indexer#record_preparer_factory is removed, and operation_factory raises a clear ConfigError when a schema has no ingestion extensions
  • The be_a_valid_elastic_graph_event matcher moves to elastic_graph/json_ingestion/spec_support/event_matcher (breaking require-path change)
  • Suites that build indexers from the shared test artifacts gain development dependencies on elasticgraph-json_ingestion

Remaining follow-up

Indexer::TestSupport::Converters still builds JSON-envelope events (json_schema_version); moving it requires touching elasticgraph-local's runtime fake-data indexing, so it's deferred to a follow-up PR.

Verification

  • script/quick_build (5160 examples, 0 failures, plus site validation with doctests)
  • Every gem suite run individually in its isolated per-gem bundle (the run_each_gem_spec CI mode), all green with 100% coverage

Stack

Current PR is marked with ->.

…xtension

The JSON ingestion adapter and JSON-schema-based record preparer factory
move from elasticgraph-indexer to elasticgraph-json_ingestion, and the
JSON ingestion schema definition extension registers an indexer extension
in runtime metadata that makes the adapter available at indexing time.
Any schema defined with JSON ingestion support automatically gets JSON
event ingestion--no settings needed--and elasticgraph-indexer no longer
contains (or refers to) any JSON-specific ingestion logic.

The be_a_valid_elastic_graph_event matcher moves to
elastic_graph/json_ingestion/spec_support/event_matcher, and suites that
build indexers from the shared test schema artifacts gain a development
dependency on elasticgraph-json_ingestion (whose indexer extension those
artifacts now reference).
@jwils jwils force-pushed the joshuaw/json-ingestion-adapter branch from bcc1c1a to 4724804 Compare July 8, 2026 02:10
@jwils jwils force-pushed the joshuaw/ingestion-adapter-seam branch from 6e17704 to a9d37cc Compare July 8, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant