You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9d7aea7
Browse filesBrowse the repository at this point in the historyBrowse files
## Why
ElasticGraph generates domain protobuf messages, but they lack the event
fields an indexer needs: operation, type, ID, and version.
## What
Add an event envelope and batch message to `schema.proto`, alongside the
domain messages for ingestible types. Preserve field numbers as types
are removed or restored.
## How
The envelope refers to existing domain messages through a `record`
oneof, using names such as `product`. Latency metadata uses
`google.protobuf.Timestamp` values. Stable field numbers are stored in
`proto_field_numbers.yaml`. Envelope fields render in field-number
order, with a separate stanza for the record alternatives. Errors for
reserved or colliding envelope field names explain how to fix them.
Tests cover proto2 and proto3 generation, reserved transport type names,
field-name collisions, and field numbers for removed and restored types.
Integration tests cover timestamp round trips. The shared schema test
helper compiles every nonempty generated schema with `protoc`, including
fixtures with external imports.
## Risk
Low. This extends the generated protobuf schema without changing runtime
ingestion.
## Testing
No manual testing.
## Bigger picture
First of four PRs for protobuf ingestion. The next PR allows events
without a JSON schema version. The independent JRuby test-recorder fix
is in #1410.
Copy file name to clipboardExpand all lines: elasticgraph-proto_ingestion/spec/integration/elastic_graph/proto_ingestion/schema_definition/rake_tasks_spec.rb
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ module SchemaDefinition
34
34
start_with(
35
35
"// Generated by `bundle exec rake schema_artifacts:dump`.\n" \
36
36
"// DO NOT EDIT BY HAND. Any edits will be lost the next time the rake task is run.\n"
37
-
).and(a_string_including('syntax = "proto3";',"message Product","string name = 2;"))
37
+
).and(a_string_including('syntax = "proto3";',"message Product","string name = 2;","message ElasticGraphEventEnvelope","message ElasticGraphEventBatch"))
0 commit comments