-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Description
I have proto files that are mix of Protobuf messages and gRPC service definitions. Unfortunately, parser doesn't allow for .service. string in package path. For example, this Proto:
service StreamService {
rpc Consume(
vendor.stream.v1.messages.StreamRequest // <-- line 9
) returns (
stream vendor.stream.v1.messages.StreamPayload
);
}causes a startup error of Redpanda Console:
2025-09-22 17:16:28 {"time":"2025-09-22T15:16:28.910647048Z","level":"WARN","msg":"failed to parse proto file to descriptor","logger":"proto_service","file":"vendor/stream_service.proto","line":9,"error":"vendor/stream_service.proto:9:12: syntax error: unexpected \"stream\""}
2025-09-22 17:16:28 {"time":"2025-09-22T15:16:28Z","level":"ERROR","msg":"failed to start API","!BADKEY":"start console service: failed to start proto service: failed to create proto registry: failed to compile proto files to descriptors: failed to parse proto files to descriptors: parse failed: invalid proto source"}
If you change the package name to something else, like streamz - it will work.
protoc builds descriptors for the original variant without issues, command for the repo below:
protoc \
--proto_path=proto \
--include_imports \
--descriptor_set_out=schema.desc \
proto/**/*.protoReproduction
Reproduction repository: https://github.com/sienkiewiczkm/reproduction-redpanda-parsing
For a "fix" highlighting a problem see branch fix/demo: sienkiewiczkm/reproduction-redpanda-parsing@75fa0de
After applying a "fix" you'll see in logs:
2025-09-22 17:23:18 {"time":"2025-09-22T15:23:18.705975585Z","level":"INFO","msg":"successfully loaded all files from filesystem into cache","logger":"proto_service","provider":"file_provider","loaded_files":3}
2025-09-22 17:23:18 {"time":"2025-09-22T15:23:18.710163502Z","level":"INFO","msg":"registered proto types in Console's local proto registry","logger":"proto_service","registered_types":3}
2025-09-22 17:23:18 {"time":"2025-09-22T15:23:18.710179669Z","level":"INFO","msg":"checked whether all mapped proto types also exist in the local registry","logger":"proto_service","types_found":1,"types_missing":0,"registered_types":3,"operation_duration":4162959}
Metadata
Metadata
Assignees
Labels
No labels