Skip to content

Move JSON schema helpers to json ingestion gem#1201

Open
jwils wants to merge 1 commit into
joshuaw/schema-extension-plumbingfrom
joshuaw/json-ingestion-extension
Open

Move JSON schema helpers to json ingestion gem#1201
jwils wants to merge 1 commit into
joshuaw/schema-extension-plumbingfrom
joshuaw/json-ingestion-extension

Conversation

@jwils
Copy link
Copy Markdown
Collaborator

@jwils jwils commented May 20, 2026

Why

Keep the first extraction layer reviewable by moving the JSON Schema helper files without changing their contents, so GitHub can render them as renames instead of delete/add rewrites.

What

  • Move JSON Schema helper Ruby and RBS files into elasticgraph-json_ingestion
  • Update core requires/type references to load the helpers from the new gem
  • Add the Docker/Apollo build-context wiring needed for the new schema_definition dependency

Risk Assessment

Low to medium - mostly file moves plus require/dependency wiring.

References

  • Stacked on Add schema definition extension plumbing #1200.
  • git diff -M --summary reports the moved helper files as 100% renames, including json_schema_with_metadata.rb.
  • Local static checks passed for this layer before the Docker-only build-context amend; the full rewritten stack passes lint, type check, schema artifact check, dependency diagram verification, and spellcheck.

@jwils jwils force-pushed the joshuaw/schema-extension-plumbing branch from edb2d90 to ef7b7e5 Compare May 20, 2026 18:29
@jwils jwils force-pushed the joshuaw/json-ingestion-extension branch 3 times, most recently from 7eea290 to 461ba24 Compare May 20, 2026 19:56
@jwils jwils changed the title Extract JSON ingestion schema support Move JSON schema helpers to json ingestion gem May 20, 2026
@jwils jwils force-pushed the joshuaw/json-ingestion-extension branch 2 times, most recently from 64ff2af to 7d4becc Compare May 21, 2026 02:49
@jwils jwils marked this pull request as ready for review May 22, 2026 18:22
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/nit Looks like this is needed to type check due to elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion.rb in #1199 defining this module. If you decide to address https://github.com/block/elasticgraph/pull/1199/changes#r3278668713, can this also be dropped?


spec.add_dependency "elasticgraph-graphql", ElasticGraph::VERSION # needed since we validate that scalar `coerce_with` options are valid (which loads scalar coercion adapters)
spec.add_dependency "elasticgraph-indexer", ElasticGraph::VERSION # needed since we validate that scalar `prepare_for_indexing_with` options are valid (which loads indexing preparer adapters)
spec.add_dependency "elasticgraph-json_ingestion", ElasticGraph::VERSION
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like elasticgraph-json_ingestion to be an optional extension that is not even installed in EG projects that opt to use proto ingestion for all indexed types.

If the gem is needed in the test suite, can this be add_development_dependency?

@jwils jwils force-pushed the joshuaw/schema-extension-plumbing branch from ef7b7e5 to d841965 Compare May 22, 2026 22:41
@jwils jwils force-pushed the joshuaw/json-ingestion-extension branch from 7d4becc to e64b589 Compare May 22, 2026 22:41
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.

2 participants