Hi friends! Usual caveat about not being sure whet...
# pact-plugins
b
Hi friends! Usual caveat about not being sure whether this is the right place to post, so please redirect me if so! I have a proto file with several imports
Copy code
syntax = "proto3";

package vts.central_entities.v1.service;

import "buf/validate/validate.proto"; // global package (from <https://github.com/bufbuild/protoc-gen-validate> I believe)
import "vts/central_entities/v1/service/entity.proto"; // local proto file
when I run the pact test, I get this error
Copy code
2024-07-09T15:33:55.572407Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.572237Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_write: send frame=Settings { flags: (0x1: ACK) }
2024-07-09T15:33:55.572411Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.572258Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
2024-07-09T15:33:55.572488Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_read: received frame=Settings { flags: (0x0), initial_window_size: 1048576, max_frame_size: 16384, max_header_list_size: 16777216 }
2024-07-09T15:33:55.572511Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Settings { flags: (0x1: ACK) }
2024-07-09T15:33:55.572519Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_read: received frame=Settings { flags: (0x1: ACK) }
2024-07-09T15:33:55.572523Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::proto::settings: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
2024-07-09T15:33:55.572532Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_read: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 }
2024-07-09T15:33:55.572558Z DEBUG   ffi-setup_contents tower::buffer::worker: service.ready=true processing request
2024-07-09T15:33:55.572500Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.572292Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_write: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 }
2024-07-09T15:33:55.572670Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.572610Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Settings { flags: (0x1: ACK) }
2024-07-09T15:33:55.572680Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.572630Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::proto::settings: received settings ACK; applying Settings { flags: (0x0), initial_window_size: 1048576, max_frame_size: 16384, max_header_list_size: 16777216 }
2024-07-09T15:33:55.572879Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2024-07-09T15:33:55.572911Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Data { stream_id: StreamId(1) }
2024-07-09T15:33:55.572941Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2024-07-09T15:33:55.573393Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.573033Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2024-07-09T15:33:55.573405Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.573073Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1) }
2024-07-09T15:33:55.573410Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.573092Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2024-07-09T15:33:55.573415Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.573150Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: tower_http::trace::on_request: started processing request
2024-07-09T15:33:55.573421Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.573250Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::server: Configure interaction request for content type 'application/grpc': ConfigureInteractionRequest { content_type: "application/grpc", contents_config: Some(Struct { fields: {"additionalIncludes": Value { kind: Some(ListValue(ListValue { values: [Value { kind: Some(StringValue("/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service")) }] })) }, "pact:content-type": Value { kind: Some(StringValue("application/protobuf")) }, "pact:proto": Value { kind: Some(StringValue("/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service/service_commands.proto")) }, "pact:proto-service": Value { kind: Some(StringValue("CommandService/UpsertEntity")) } ...STUFF }
2024-07-09T15:33:55.669983Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.669623Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Detected OS: Mac OS 14.5.0 [64-bit]
2024-07-09T15:33:55.670174Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.670124Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Found unpacked protoc binary
2024-07-09T15:33:55.670190Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.670153Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Invoking protoc: './protoc/bin/protoc --version'
2024-07-09T15:33:55.727713Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.727643Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc binary invoked OK: libprotoc 3.21.12
2024-07-09T15:33:55.727762Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) ||
2024-07-09T15:33:55.727776Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.727715Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protobuf: Parsing proto file '/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service/service_commands.proto'
2024-07-09T15:33:55.728166Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.728111Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Invoking protoc: Command { std: "./protoc/bin/protoc" "-o/Users/becca.liss/.pact/plugins/protobuf-0.4.0/tmp/.tmp1ER5tw" "-I/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service" "--include_imports" "/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service/service_commands.proto" "-Iprotoc/include", kill_on_drop: false }
2024-07-09T15:33:55.739710Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.739648Z ERROR tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc output:
2024-07-09T15:33:55.739739Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || 2024-07-09T15:33:55.739688Z ERROR tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:63892/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc stderr: buf/validate/validate.proto: File not found.
2024-07-09T15:33:55.739772Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 64004, STDOUT) || vts/central_entities/v1/service/entity.proto: File not found.
I verified that the
additionalIncludes
paths seem correct (added in the Pact struct as suggested here). tldr: it seems like
protoc
/
pact_protobuf_plugin
is not able to handle protobuf imports. Any help would be hugely appreciated, thank you!
r
What version of the protobuf plugin are you using?
b
0.4.0
Copy code
➜ ✗ pact-plugin-cli list installed
┌──────────┬─────────┬───────────────────┬───────────┐
│ Name     ┆ Version ┆ Interface Version┆ Status 
╞══════════╪═════════╪═══════════════════╪═══════════╡
│ protobuf ┆ 0.4.0   ┆ 1                ┆ enabled 
└──────────┴─────────┴───────────────────┴───────────┘
r
Where does the file
buf/validate/validate.proto
live?
b
I believe it's from here
i think buf does something fancy with it, but i'm not totally sure
r
That will need to be installed locally somewhere
Also, from the logs I can see the import path passed to protoc
-I/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service
entity.proto
is in the same directory, so either change the import directory to
/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf
or change the import line in the proto file to
import "entity.proto";
b
hmm lemme try that
same error
Copy code
2024-07-10T13:37:53.000919Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.000851Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::proto::settings: received settings ACK; applying Settings { flags: (0x0), initial_window_size: 1048576, max_frame_size: 16384, max_header_list_size: 16777216 }
2024-07-10T13:37:53.000921Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.000875Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
2024-07-10T13:37:53.001459Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_read: received frame=Settings { flags: (0x1: ACK) }
2024-07-10T13:37:53.001472Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::proto::settings: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
2024-07-10T13:37:53.001481Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2024-07-10T13:37:53.001505Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Data { stream_id: StreamId(1) }
2024-07-10T13:37:53.001549Z DEBUG   ffi-setup_contents Connection{peer=Client}: h2::codec::framed_write: send frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2024-07-10T13:37:53.003313Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.003261Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2024-07-10T13:37:53.003456Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.003347Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1) }
2024-07-10T13:37:53.003462Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.003370Z DEBUG tokio-runtime-worker Connection{peer=Server}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2024-07-10T13:37:53.003466Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.003430Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: tower_http::trace::on_request: started processing request
2024-07-10T13:37:53.004180Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.003594Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::server: Configure interaction request for content type 'application/grpc': ConfigureInteractionRequest { content_type: "application/grpc", contents_config: Some(Struct { fields: {"additionalIncludes": Value { kind: Some(ListValue(ListValue { values: [Value { kind: Some(StringValue("/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf")) }] })) }, "pact:content-type": Value { kind: Some(StringValue("application/protobuf")) }, "pact:proto": {} }
2024-07-10T13:37:53.060055Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.059890Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Detected OS: Mac OS 14.5.0 [64-bit]
2024-07-10T13:37:53.060075Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.060016Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Found unpacked protoc binary
2024-07-10T13:37:53.060086Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.060031Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Invoking protoc: './protoc/bin/protoc --version'
2024-07-10T13:37:53.105747Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.105469Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc binary invoked OK: libprotoc 3.21.12
2024-07-10T13:37:53.105793Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) ||
2024-07-10T13:37:53.105797Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.105558Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protobuf: Parsing proto file '/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service/service_commands.proto'
2024-07-10T13:37:53.106441Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.106389Z DEBUG tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Invoking protoc: Command { std: "./protoc/bin/protoc" "-o/Users/becca.liss/.pact/plugins/protobuf-0.4.0/tmp/.tmp5HV2uq" "-I/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service" "--include_imports" "/Users/becca.liss/Code/monorepo/apps/central-entities/service/idl/protobuf/vts/central_entities/v1/service/service_commands.proto" "-Iprotoc/include", kill_on_drop: false }
2024-07-10T13:37:53.126619Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.126536Z ERROR tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc output:
2024-07-10T13:37:53.126632Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || 2024-07-10T13:37:53.126576Z ERROR tokio-runtime-worker request{method=POST uri=<http://127.0.0.1:56223/io.pact.plugin.PactPlugin/ConfigureInteraction> version=HTTP/2.0 headers={"te": "trailers", "content-type": "application/grpc", "authorization": Sensitive, "user-agent": "tonic/0.9.2"}}: pact_protobuf_plugin::protoc: Protoc stderr: buf/validate/validate.proto: File not found.
2024-07-10T13:37:53.126633Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || vts/central_entities/v1/service/entity.proto: File not found.
2024-07-10T13:37:53.126635Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || vts/central_entities/v1/service/relationship.proto: File not found.
2024-07-10T13:37:53.126637Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || service_commands.proto:5:1: Import "buf/validate/validate.proto" was not found or had errors.
2024-07-10T13:37:53.126638Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || service_commands.proto:6:1: Import "vts/central_entities/v1/service/entity.proto" was not found or had errors.
2024-07-10T13:37:53.126639Z DEBUG tokio-runtime-worker pact_plugin_driver::child_process: Plugin(protobuf, 10368, STDOUT) || service_commands.proto:7:1: Import "vts/central_entities/v1/service/relationship.proto" was not found or had errors.
for anyone else who comes across this error - i was able to get it working by using
buf export
, putting those files in the same location as the other top-level proto files so that the import paths didn't need to change, and then providing those paths as
ProtobufConfig.AdditionalIncludes = append(pactConfig.ProtobufConfig.AdditionalIncludes, path)
. I'd also recommend running a cleanup task after to delete those files after generating the pacts, since normal buf builds will complain about the duplicate definitions