Skip to content

Commit bbcb52f

Browse files
committed
Scaffold the elasticgraph-proto_ingestion gem
Creates the new `elasticgraph-proto_ingestion` extension gem and wires it into the repo (bundle, RBS collection, docker demo, doctest helper, docs diagrams), without any of the Protocol Buffers generation logic yet. The gem currently just defines its artifact file name constants and an `APIExtension` entry point that does not customize anything. Splitting the gem creation out this way keeps the follow-up PR that adds the actual generation logic contained to the gem's own directory.
1 parent c178c96 commit bbcb52f

20 files changed

Lines changed: 225 additions & 2 deletions

File tree

CODEBASE_OVERVIEW.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,14 @@ graph LR;
192192
click opensearch-ruby href "https://rubygems.org/gems/opensearch-ruby" "Open on RubyGems.org" _blank;
193193
```
194194

195-
### Extensions (6 gems)
195+
### Extensions (7 gems)
196196

197197
These libraries extend ElasticGraph to provide optional but commonly needed functionality.
198198

199199
* [elasticgraph-apollo](elasticgraph-apollo/README.md): Transforms an ElasticGraph project into an Apollo subgraph.
200200
* [elasticgraph-health_check](elasticgraph-health_check/README.md): Provides a health check for high availability ElasticGraph deployments.
201201
* [elasticgraph-json_ingestion](elasticgraph-json_ingestion/README.md): JSON Schema ingestion support for ElasticGraph.
202+
* [elasticgraph-proto_ingestion](elasticgraph-proto_ingestion/README.md): Generates Protocol Buffers schema artifacts from ElasticGraph schemas.
202203
* [elasticgraph-query_interceptor](elasticgraph-query_interceptor/README.md): Intercepts ElasticGraph datastore queries.
203204
* [elasticgraph-query_registry](elasticgraph-query_registry/README.md): Provides a source-controlled query registry for ElasticGraph applications.
204205
* [elasticgraph-warehouse](elasticgraph-warehouse/README.md): Extends ElasticGraph to support ingestion into a data warehouse.
@@ -218,6 +219,7 @@ graph LR;
218219
elasticgraph-health_check["eg-health_check"];
219220
elasticgraph-datastore_core["eg-datastore_core"];
220221
elasticgraph-json_ingestion["eg-json_ingestion"];
222+
elasticgraph-proto_ingestion["eg-proto_ingestion"];
221223
elasticgraph-query_interceptor["eg-query_interceptor"];
222224
elasticgraph-schema_artifacts["eg-schema_artifacts"];
223225
elasticgraph-query_registry["eg-query_registry"];
@@ -231,6 +233,7 @@ graph LR;
231233
elasticgraph-health_check --> elasticgraph-graphql;
232234
elasticgraph-health_check --> elasticgraph-support;
233235
elasticgraph-json_ingestion --> elasticgraph-support;
236+
elasticgraph-proto_ingestion --> elasticgraph-support;
234237
elasticgraph-query_interceptor --> elasticgraph-graphql;
235238
elasticgraph-query_interceptor --> elasticgraph-schema_artifacts;
236239
elasticgraph-query_registry --> elasticgraph-graphql;
@@ -246,6 +249,7 @@ graph LR;
246249
class elasticgraph-health_check targetGemStyle;
247250
class elasticgraph-datastore_core otherEgGemStyle;
248251
class elasticgraph-json_ingestion targetGemStyle;
252+
class elasticgraph-proto_ingestion targetGemStyle;
249253
class elasticgraph-query_interceptor targetGemStyle;
250254
class elasticgraph-schema_artifacts otherEgGemStyle;
251255
class elasticgraph-query_registry targetGemStyle;

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ PATH
140140
faraday-retry (~> 2.4)
141141
opensearch-ruby (~> 3.4)
142142

143+
PATH
144+
remote: elasticgraph-proto_ingestion
145+
specs:
146+
elasticgraph-proto_ingestion (1.2.1.pre)
147+
elasticgraph-support (= 1.2.1.pre)
148+
143149
PATH
144150
remote: elasticgraph-query_interceptor
145151
specs:
@@ -688,6 +694,7 @@ DEPENDENCIES
688694
elasticgraph-lambda_support (= 1.2.1.pre)!
689695
elasticgraph-local (= 1.2.1.pre)!
690696
elasticgraph-opensearch (= 1.2.1.pre)!
697+
elasticgraph-proto_ingestion (= 1.2.1.pre)!
691698
elasticgraph-query_interceptor (= 1.2.1.pre)!
692699
elasticgraph-query_registry (= 1.2.1.pre)!
693700
elasticgraph-rack (= 1.2.1.pre)!
@@ -779,6 +786,7 @@ CHECKSUMS
779786
elasticgraph-lambda_support (1.2.1.pre)
780787
elasticgraph-local (1.2.1.pre)
781788
elasticgraph-opensearch (1.2.1.pre)
789+
elasticgraph-proto_ingestion (1.2.1.pre)
782790
elasticgraph-query_interceptor (1.2.1.pre)
783791
elasticgraph-query_registry (1.2.1.pre)
784792
elasticgraph-rack (1.2.1.pre)

config/docker_demo/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ COPY elasticgraph-indexer elasticgraph-indexer/
1919
COPY elasticgraph-json_ingestion elasticgraph-json_ingestion/
2020
COPY elasticgraph-local elasticgraph-local/
2121
COPY elasticgraph-opensearch elasticgraph-opensearch/
22+
COPY elasticgraph-proto_ingestion elasticgraph-proto_ingestion/
2223
COPY elasticgraph-query_registry elasticgraph-query_registry/
2324
COPY elasticgraph-rack elasticgraph-rack/
2425
COPY elasticgraph-schema_artifacts elasticgraph-schema_artifacts/

config/site/support/doctest_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
require "elastic_graph/apollo/schema_definition/api_extension"
1010
require "elastic_graph/json_ingestion/schema_definition/api_extension"
11+
require "elastic_graph/proto_ingestion/schema_definition/api_extension"
1112
require "elastic_graph/schema_artifacts/runtime_metadata/schema_element_names"
1213
require "elastic_graph/schema_definition/api"
1314
require "elastic_graph/schema_definition/schema_artifact_manager"
@@ -53,6 +54,7 @@ module ElasticGraph
5354
"ElasticGraph.define_schema" => [],
5455
"ElasticGraph::Apollo::SchemaDefinition" => [Apollo::SchemaDefinition::APIExtension],
5556
"ElasticGraph::JSONIngestion::SchemaDefinition" => [JSONIngestion::SchemaDefinition::APIExtension],
57+
"ElasticGraph::ProtoIngestion::SchemaDefinition" => [ProtoIngestion::SchemaDefinition::APIExtension],
5658
"ElasticGraph::SchemaDefinition" => [],
5759
"ElasticGraph::Warehouse::SchemaDefinition" => [Warehouse::SchemaDefinition::APIExtension]
5860
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../spec_support/subdir_dot_rspec
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../config/site/yardopts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Gemfile
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 - 2026 Block, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ElasticGraph::ProtoIngestion
2+
3+
An ElasticGraph extension that generates Protocol Buffers schema artifacts from ElasticGraph schemas.
4+
5+
## Dependency Diagram
6+
7+
```mermaid
8+
graph LR;
9+
classDef targetGemStyle fill:#FADBD8,stroke:#EC7063,color:#000,stroke-width:2px;
10+
classDef otherEgGemStyle fill:#A9DFBF,stroke:#2ECC71,color:#000;
11+
classDef externalGemStyle fill:#E0EFFF,stroke:#70A1D7,color:#2980B9;
12+
elasticgraph-proto_ingestion["elasticgraph-proto_ingestion"];
13+
class elasticgraph-proto_ingestion targetGemStyle;
14+
elasticgraph-support["elasticgraph-support"];
15+
elasticgraph-proto_ingestion --> elasticgraph-support;
16+
class elasticgraph-support otherEgGemStyle;
17+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2024 - 2026 Block, Inc.
2+
#
3+
# Use of this source code is governed by an MIT-style
4+
# license that can be found in the LICENSE file or at
5+
# https://opensource.org/licenses/MIT.
6+
#
7+
# frozen_string_literal: true
8+
9+
require_relative "../elasticgraph-support/lib/elastic_graph/version"
10+
11+
Gem::Specification.new do |spec|
12+
spec.name = "elasticgraph-proto_ingestion"
13+
spec.version = ElasticGraph::VERSION
14+
spec.authors = ["Josh Wilson", "Myron Marston", "Block Engineering"]
15+
spec.email = ["joshuaw@squareup.com"]
16+
spec.homepage = "https://block.github.io/elasticgraph/"
17+
spec.license = "MIT"
18+
spec.summary = "Generates Protocol Buffers schema artifacts from ElasticGraph schemas."
19+
20+
spec.metadata = {
21+
"bug_tracker_uri" => "https://github.com/block/elasticgraph/issues",
22+
"changelog_uri" => "https://github.com/block/elasticgraph/releases/tag/v#{ElasticGraph::VERSION}",
23+
"documentation_uri" => "https://block.github.io/elasticgraph/api-docs/v#{ElasticGraph::VERSION}/",
24+
"homepage_uri" => "https://block.github.io/elasticgraph/",
25+
"source_code_uri" => "https://github.com/block/elasticgraph/tree/v#{ElasticGraph::VERSION}/#{spec.name}",
26+
"gem_category" => "extension"
27+
}
28+
29+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
30+
`git ls-files -z`.split("\x0").reject do |f|
31+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features|sig)/|\.(?:git|travis|circleci)|appveyor)})
32+
end - [".rspec", "Gemfile", ".yardopts"]
33+
end
34+
35+
spec.required_ruby_version = [">= 3.4", "< 4.1"]
36+
37+
spec.add_dependency "elasticgraph-support", ElasticGraph::VERSION
38+
39+
spec.add_development_dependency "elasticgraph-schema_definition", ElasticGraph::VERSION
40+
end

0 commit comments

Comments
 (0)