Context
#1273 added support for pure-source types: types that feed sourced_from fields on other types without calling t.index (see #1342, #1343, #1346, #1347, #1356). The JSON-schema event envelope was generalized to accept events for these types (#1346), but proto ingestion was not.
Problem
The generated schema.proto artifact only renders messages for indexed root types and the types transitively referenced by them — proto_types seeds its traversal from @state.indexed_types_by_index_name (elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/schema.rb:149).
A non-indexed sourced_from source type is never reachable from that seed set: proto message fields come from indexing_fields_by_name_in_index, relationship fields aren't indexing fields, and the foreign key lives on the source type — so nothing in an indexed type's proto representation references it. No proto message is generated for it.
Publishers using proto ingestion therefore can't publish events for pure-source types, even though the JSON-schema envelope accepts them.
What's needed
Seed the proto traversal from the same "ingestible types" set used for the event envelope enum: indexed root types plus sourced_from source types (Results#sourced_update_targets_by_source_type_name keys, added in #1342/#1346). The messages themselves should render fine as-is — proto_fields builds from indexing_fields_by_name_in_index, which doesn't depend on the type having an index.
Context
#1273 added support for pure-source types: types that feed
sourced_fromfields on other types without callingt.index(see #1342, #1343, #1346, #1347, #1356). The JSON-schema event envelope was generalized to accept events for these types (#1346), but proto ingestion was not.Problem
The generated
schema.protoartifact only renders messages for indexed root types and the types transitively referenced by them —proto_typesseeds its traversal from@state.indexed_types_by_index_name(elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/schema.rb:149).A non-indexed
sourced_fromsource type is never reachable from that seed set: proto message fields come fromindexing_fields_by_name_in_index, relationship fields aren't indexing fields, and the foreign key lives on the source type — so nothing in an indexed type's proto representation references it. No proto message is generated for it.Publishers using proto ingestion therefore can't publish events for pure-source types, even though the JSON-schema envelope accepts them.
What's needed
Seed the proto traversal from the same "ingestible types" set used for the event envelope enum: indexed root types plus
sourced_fromsource types (Results#sourced_update_targets_by_source_type_namekeys, added in #1342/#1346). The messages themselves should render fine as-is —proto_fieldsbuilds fromindexing_fields_by_name_in_index, which doesn't depend on the type having an index.