Open jojoxhsieh opened 1 year ago
I can't replicate this, in my test the find_message_type_by_name
function does look in all descriptors.
The problem must be somewhere else. Can you provide debug logs? Also, maybe try the latest version of the plugin. It may have been fixed with the changes from one of the other fixes.
I think this is the issue that was fixed in https://github.com/pactflow/pact-protobuf-plugin/issues/36 and https://github.com/pactflow/pact-protobuf-plugin/issues/30. I would suggest you try in the latest version.
In method
find_message_type_by_name
, it try to search message by name in all descriptors, but it looks like just return error if it can't find message in the first descriptor, and won't continue.For example, I have
descriptors = [Some("google/protobuf/timestamp.proto"), Some("google/protobuf/duration.proto"), Some("feast/types/Value.proto"), Some("feast/types/Field.proto"), Some("feast/types/FeatureRow.proto"), Some("ServingService.proto")]
. And setpact:proto
toServingService.proto
. When running consumer testing, I got error:Failed to set the interaction: Failed to process protobuf: Did not find a message type 'Value' in the file descriptor 'Some("ServingService.proto")'
But actuallyValue
is defined inValue.proto