diff --git a/CODEBASE_OVERVIEW.md b/CODEBASE_OVERVIEW.md index a7f4b58ea..8cc77e3b8 100644 --- a/CODEBASE_OVERVIEW.md +++ b/CODEBASE_OVERVIEW.md @@ -111,6 +111,7 @@ graph LR; rackup["rackup"]; rake["rake"]; webrick["webrick"]; + elasticgraph-json_ingestion["eg-json_ingestion"]; elasticgraph-schema_artifacts["eg-schema_artifacts"]; graphql["graphql"]; elasticgraph --> elasticgraph-support; @@ -125,6 +126,7 @@ graph LR; elasticgraph-local --> webrick; elasticgraph-schema_definition --> elasticgraph-graphql; elasticgraph-schema_definition --> elasticgraph-indexer; + elasticgraph-schema_definition --> elasticgraph-json_ingestion; elasticgraph-schema_definition --> elasticgraph-schema_artifacts; elasticgraph-schema_definition --> elasticgraph-support; elasticgraph-schema_definition --> graphql; @@ -141,6 +143,7 @@ graph LR; class rackup externalGemCatStyle; class rake externalGemCatStyle; class webrick externalGemCatStyle; + class elasticgraph-json_ingestion otherEgGemStyle; class elasticgraph-schema_artifacts otherEgGemStyle; class graphql externalGemCatStyle; click thor href "https://rubygems.org/gems/thor" "Open on RubyGems.org" _blank; diff --git a/Gemfile.lock b/Gemfile.lock index 42a41bcc2..78d4e1f05 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -198,6 +198,7 @@ PATH elasticgraph-schema_definition (1.2.1.pre) elasticgraph-graphql (= 1.2.1.pre) elasticgraph-indexer (= 1.2.1.pre) + elasticgraph-json_ingestion (= 1.2.1.pre) elasticgraph-schema_artifacts (= 1.2.1.pre) elasticgraph-support (= 1.2.1.pre) graphql (~> 2.6.2) diff --git a/config/docker_demo/Dockerfile b/config/docker_demo/Dockerfile index c67a71782..2110740fd 100644 --- a/config/docker_demo/Dockerfile +++ b/config/docker_demo/Dockerfile @@ -16,6 +16,7 @@ COPY elasticgraph-datastore_core elasticgraph-datastore_core/ COPY elasticgraph-graphiql elasticgraph-graphiql/ COPY elasticgraph-graphql elasticgraph-graphql/ COPY elasticgraph-indexer elasticgraph-indexer/ +COPY elasticgraph-json_ingestion elasticgraph-json_ingestion/ COPY elasticgraph-local elasticgraph-local/ COPY elasticgraph-opensearch elasticgraph-opensearch/ COPY elasticgraph-query_registry elasticgraph-query_registry/ diff --git a/elasticgraph-apollo/apollo_tests_implementation/Dockerfile b/elasticgraph-apollo/apollo_tests_implementation/Dockerfile index 23442ab26..f2cd8c122 100644 --- a/elasticgraph-apollo/apollo_tests_implementation/Dockerfile +++ b/elasticgraph-apollo/apollo_tests_implementation/Dockerfile @@ -14,6 +14,7 @@ COPY elasticgraph-elasticsearch /web/elasticgraph-elasticsearch COPY elasticgraph-graphiql /web/elasticgraph-graphiql COPY elasticgraph-graphql /web/elasticgraph-graphql COPY elasticgraph-indexer /web/elasticgraph-indexer +COPY elasticgraph-json_ingestion /web/elasticgraph-json_ingestion COPY elasticgraph-rack /web/elasticgraph-rack COPY elasticgraph-schema_artifacts /web/elasticgraph-schema_artifacts COPY elasticgraph-schema_definition /web/elasticgraph-schema_definition diff --git a/elasticgraph-apollo/apollo_tests_implementation/Gemfile b/elasticgraph-apollo/apollo_tests_implementation/Gemfile index f082fa258..60b08ec0d 100644 --- a/elasticgraph-apollo/apollo_tests_implementation/Gemfile +++ b/elasticgraph-apollo/apollo_tests_implementation/Gemfile @@ -16,6 +16,7 @@ source "https://rubygems.org" graphiql graphql indexer + json_ingestion rack schema_artifacts schema_definition diff --git a/elasticgraph-json_ingestion/README.md b/elasticgraph-json_ingestion/README.md index db1eb3988..38d29c1d1 100644 --- a/elasticgraph-json_ingestion/README.md +++ b/elasticgraph-json_ingestion/README.md @@ -17,4 +17,7 @@ graph LR; elasticgraph-support["elasticgraph-support"]; elasticgraph-json_ingestion --> elasticgraph-support; class elasticgraph-support otherEgGemStyle; + elasticgraph-schema_definition["elasticgraph-schema_definition"]; + elasticgraph-schema_definition --> elasticgraph-json_ingestion; + class elasticgraph-schema_definition otherEgGemStyle; ``` diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/event_envelope.rb b/elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/event_envelope.rb similarity index 100% rename from elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/event_envelope.rb rename to elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/event_envelope.rb diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb b/elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rb similarity index 100% rename from elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rb rename to elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rb diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_with_metadata.rb b/elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata.rb similarity index 100% rename from elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/json_schema_with_metadata.rb rename to elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata.rb diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/json_schema_pruner.rb b/elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/json_schema_pruner.rb similarity index 100% rename from elasticgraph-schema_definition/lib/elastic_graph/schema_definition/json_schema_pruner.rb rename to elasticgraph-json_ingestion/lib/elastic_graph/json_ingestion/schema_definition/json_schema_pruner.rb diff --git a/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion.rbs b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion.rbs new file mode 100644 index 000000000..b7ecda553 --- /dev/null +++ b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion.rbs @@ -0,0 +1,4 @@ +module ElasticGraph + module JSONIngestion + end +end diff --git a/elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/event_envelope.rbs b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/event_envelope.rbs similarity index 100% rename from elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/event_envelope.rbs rename to elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/event_envelope.rbs diff --git a/elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rbs b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rbs similarity index 100% rename from elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/json_schema_field_metadata.rbs rename to elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata.rbs diff --git a/elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/json_schema_with_metadata.rbs b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata.rbs similarity index 100% rename from elasticgraph-schema_definition/sig/elastic_graph/schema_definition/indexing/json_schema_with_metadata.rbs rename to elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata.rbs diff --git a/elasticgraph-schema_definition/sig/elastic_graph/schema_definition/json_schema_pruner.rbs b/elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/json_schema_pruner.rbs similarity index 100% rename from elasticgraph-schema_definition/sig/elastic_graph/schema_definition/json_schema_pruner.rbs rename to elasticgraph-json_ingestion/sig/elastic_graph/json_ingestion/schema_definition/json_schema_pruner.rbs diff --git a/elasticgraph-schema_definition/README.md b/elasticgraph-schema_definition/README.md index b85f79b9e..5c06af483 100644 --- a/elasticgraph-schema_definition/README.md +++ b/elasticgraph-schema_definition/README.md @@ -21,6 +21,9 @@ graph LR; elasticgraph-indexer["elasticgraph-indexer"]; elasticgraph-schema_definition --> elasticgraph-indexer; class elasticgraph-indexer otherEgGemStyle; + elasticgraph-json_ingestion["elasticgraph-json_ingestion"]; + elasticgraph-schema_definition --> elasticgraph-json_ingestion; + class elasticgraph-json_ingestion otherEgGemStyle; elasticgraph-schema_artifacts["elasticgraph-schema_artifacts"]; elasticgraph-schema_definition --> elasticgraph-schema_artifacts; class elasticgraph-schema_artifacts otherEgGemStyle; diff --git a/elasticgraph-schema_definition/elasticgraph-schema_definition.gemspec b/elasticgraph-schema_definition/elasticgraph-schema_definition.gemspec index 5703f516d..da50e4335 100644 --- a/elasticgraph-schema_definition/elasticgraph-schema_definition.gemspec +++ b/elasticgraph-schema_definition/elasticgraph-schema_definition.gemspec @@ -43,6 +43,7 @@ Gem::Specification.new do |spec| 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 spec.add_dependency "elasticgraph-schema_artifacts", ElasticGraph::VERSION spec.add_dependency "elasticgraph-support", ElasticGraph::VERSION spec.add_dependency "graphql", "~> 2.6.2" diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field.rb index 5b0c0db1c..fa215a5f1 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/indexing/field.rb @@ -7,7 +7,7 @@ # frozen_string_literal: true require "elastic_graph/constants" -require "elastic_graph/schema_definition/indexing/json_schema_field_metadata" +require "elastic_graph/json_ingestion/schema_definition/indexing/json_schema_field_metadata" require "elastic_graph/schema_definition/indexing/list_counts_mapping" require "elastic_graph/support/hash_util" require "elastic_graph/support/memoizable_data" diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb index 59a8c3891..160e3c854 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/results.rb @@ -8,10 +8,10 @@ require "elastic_graph/constants" require "elastic_graph/errors" -require "elastic_graph/schema_artifacts/runtime_metadata/schema" +require "elastic_graph/json_ingestion/schema_definition/indexing/event_envelope" +require "elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata" require "elastic_graph/schema_artifacts/artifacts_helper_methods" -require "elastic_graph/schema_definition/indexing/event_envelope" -require "elastic_graph/schema_definition/indexing/json_schema_with_metadata" +require "elastic_graph/schema_artifacts/runtime_metadata/schema" require "elastic_graph/schema_definition/indexing/relationship_resolver" require "elastic_graph/schema_definition/indexing/update_target_resolver" require "elastic_graph/schema_definition/mixins/has_readable_to_s_and_inspect" diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/schema_artifact_manager.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/schema_artifact_manager.rb index d3e0a9a81..b1c3c3f1a 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/schema_artifact_manager.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/schema_artifact_manager.rb @@ -8,7 +8,7 @@ require "did_you_mean" require "elastic_graph/constants" -require "elastic_graph/schema_definition/json_schema_pruner" +require "elastic_graph/json_ingestion/schema_definition/json_schema_pruner" require "elastic_graph/support/graphql_gem_loader" require "elastic_graph/support/memoizable_data" require "fileutils" diff --git a/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/indexing/json_schema_with_metadata_spec.rb b/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/indexing/json_schema_with_metadata_spec.rb index bd24d3c13..22fc317ca 100644 --- a/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/indexing/json_schema_with_metadata_spec.rb +++ b/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/indexing/json_schema_with_metadata_spec.rb @@ -6,8 +6,8 @@ # # frozen_string_literal: true +require "elastic_graph/json_ingestion/schema_definition/indexing/json_schema_with_metadata" require "elastic_graph/spec_support/schema_definition_helpers" -require "elastic_graph/schema_definition/indexing/json_schema_with_metadata" module ElasticGraph module SchemaDefinition diff --git a/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/json_schema_pruner_spec.rb b/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/json_schema_pruner_spec.rb index af9298366..66c140101 100644 --- a/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/json_schema_pruner_spec.rb +++ b/elasticgraph-schema_definition/spec/unit/elastic_graph/schema_definition/json_schema_pruner_spec.rb @@ -7,8 +7,8 @@ # frozen_string_literal: true require "elastic_graph/constants" +require "elastic_graph/json_ingestion/schema_definition/json_schema_pruner" require "elastic_graph/spec_support/schema_definition_helpers" -require "elastic_graph/schema_definition/json_schema_pruner" module ElasticGraph module SchemaDefinition