Apply indexer extension modules when the Indexer boots#1300
Merged
Conversation
This was referenced Jul 7, 2026
c441084 to
2cd643a
Compare
7c0b7e3 to
8070692
Compare
This was referenced Jul 7, 2026
2cd643a to
9845487
Compare
8070692 to
97060ac
Compare
myronmarston
requested changes
Jul 8, 2026
jwils
added a commit
that referenced
this pull request
Jul 8, 2026
## Why To support ingestion in any data format while keeping format-specific logic in its own gem (`elasticgraph-json_ingestion`, the upcoming `elasticgraph-proto_ingestion`), the indexer needs an extension mechanism analogous to the GraphQL one: schema definition extensions register runtime extensions in the schema artifacts, and the runtime component applies them at boot. This PR adds the runtime metadata storage for that. ## What - Add `indexer_extension_modules` to `RuntimeMetadata::Schema`, mirroring `graphql_extension_modules` - Add a `RuntimeMetadata::IndexerExtension` wrapper (twin of `GraphQLExtension`) - Nothing registers or consumes these yet, and empty lists are pruned from dumped YAML, so no schema artifacts change ## Verification - `script/lint`, `script/type_check` - `script/run_gem_specs elasticgraph-schema_artifacts` (100% coverage) - `script/run_gem_specs elasticgraph-schema_definition` - `bundle exec rake schema_artifacts:check` (no artifact changes) ## Stack Current PR is marked with `->`. - -> [#1298 Add indexer_extension_modules to runtime metadata](#1298) - [#1299 Add register_indexer_extension schema definition API](#1299) - [#1300 Apply indexer extension modules when the Indexer boots](#1300) - [#1301 Extract an ingestion adapter seam inside elasticgraph-indexer](#1301) - [#1302 Move JSON ingestion into elasticgraph-json_ingestion via an indexer extension](#1302)
9845487 to
95c2292
Compare
jwils
added a commit
that referenced
this pull request
Jul 8, 2026
## Why Ingestion format gems need a way to ensure their indexer-side behavior is active whenever a schema is defined with their schema definition extension--the same guarantee `register_graphql_extension` provides for GraphQL extensions (e.g. how `elasticgraph-apollo` registers its engine extension). ## What - Add `register_indexer_extension` to the schema definition API, mirroring `register_graphql_extension` - Registered extensions are dumped into the `indexer_extension_modules` runtime metadata added in #1298 ## Verification - `script/lint`, `script/type_check` - `script/run_gem_specs elasticgraph-schema_definition` (100% coverage) ## Stack Current PR is marked with `->`. - [#1298 Add indexer_extension_modules to runtime metadata](#1298) - -> [#1299 Add register_indexer_extension schema definition API](#1299) - [#1300 Apply indexer extension modules when the Indexer boots](#1300) - [#1301 Extract an ingestion adapter seam inside elasticgraph-indexer](#1301) - [#1302 Move JSON ingestion into elasticgraph-json_ingestion via an indexer extension](#1302)
97060ac to
4ece4bc
Compare
myronmarston
approved these changes
Jul 8, 2026
myronmarston
left a comment
Collaborator
There was a problem hiding this comment.
One suggestion, LGTM otherwise.
Mirrors how elasticgraph-graphql applies GraphQL extension modules: modules from the new `indexer.extension_modules` setting and from the runtime metadata's `indexer_extension_modules` are extended onto the Indexer instance at boot. This introduces the indexer extension concept; nothing registers such an extension yet.
4ece4bc to
ae59e99
Compare
myronmarston
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
With runtime metadata storage (#1298) and the registration API (#1299) in place,
elasticgraph-indexerneeds to actually apply registered extensions--introducing the indexer extension concept, mirroring howelasticgraph-graphqlapplies GraphQL extension modules from both settings YAML and runtime metadata.What
Indexer#initializeextends configured extension modules onto the instance: first from the newindexer.extension_modulessetting (mirroringgraphql.extension_modules), then from the runtime metadata'sindexer_extension_modulesVerification
script/lint,script/type_checkscript/run_gem_specs elasticgraph-indexer(100% coverage)script/run_gem_specs elasticgraph-localStack
Current PR is marked with
->.