pactflow / pact-protobuf-plugin

Pact plugin for Protobufs and gRPC
MIT License
16 stars 8 forks source link

"Did not find an interaction that matches the given key" when using provider state #44

Closed stan-is-hate closed 3 months ago

stan-is-hate commented 9 months ago

If consumer test has created a pact file which includes parametrized state, provider fails with

1) Verifying a pact between grpcconsumer and grpcprovider Given feature 'Big Tree' exists - Route guide - GetFeature - Verification failed with an error - Failed to verify the request: Did not find an interaction that matches the given key '62f3368bdaff21'

I'm using pact-go, so it could be related to go, but it works ok with HTTP pacts, that's why I suspected the plugin. I've also tried with Matt's demo plugin and that one works correctly, but I could've missed something and it's some specific interaction type that's at fault. Seems like the key is computed based on state, but something is different between provider and consumer?

I've used pact-go official examples to reproduce:

Notes:

rholshausen commented 9 months ago

Ok, the issue is in the pact_plugin_driver, not the Protobuf plugin. I'll release a new version of the pact_plugin_driver, but then that will require a new release of the pact_ffi libs, and then a new release of Pact-go.

github-actions[bot] commented 9 months ago

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1753). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

stan-is-hate commented 8 months ago

I've ran a simple test inside pact-go project with 0.3.13 protobuf, latest pact-go and latest ffi, and it seems to be working ok. Thanks for fixing this!