Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stan-is-hate opened this issue Jan 30, 2024 · 3 comments
Labels
bug Something isn't working smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog

Comments

@stan-is-hate
Copy link
Contributor

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:

  • download my fork at protobuf-state-with-param branch - https://github.com/stan-is-hate/pact-go/tree/protobuf-state-with-param
  • run make install which would install pact-go native lib
  • install protobuf plugin (or run make download_plugins which would pull all of them - required to run demo-plugin; though protobuf will be an older one)
  • make demo-error will run consumer grpc test, then provider grpc test.
  • make demo-no-error will do the same for http tests.

Notes:

  • it fails almost all the time, but occasionally passes
  • I think it failed for non-parametrized state too, but needs to be confirmed
  • doesn't happen if you don't use state at all
  • behavior is similar between 3.9, 3.10 and 3.11 versions of the plugin, so it's not related to the recent changes.
@rholshausen rholshausen added the bug Something isn't working label Jan 31, 2024
@rholshausen
Copy link
Contributor

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.

@rholshausen rholshausen added the smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog label Jan 31, 2024
Copy link

👋 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
Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working smartbear-supported Issues with this label have been added to the Pactflow team's Jira backlog
Projects
None yet
Development

No branches or pull requests

2 participants