-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Strange hanging provider verification #17
Comments
So after rubber ducking, I noticed that the pact file curiously had the following:
Note the version of the plugin in the test itself was Interestingly, even though The other plugin tests were reliably working because this just so happened to be the only test that didn't write to a shared The fix For clarity, the fix was simply to remove the pact file prior to running the test, to avoid stale interactions/configurations being written to the file. What next Given the difficultly in tracking this down, is there a change we can make to either make the problem more visible to the user or perhaps preventing having multiple unused plugins written to the pact file? |
I've been running into a strange verification issue, where my build just hangs. Locally, it seems to reliably run just fine (M1 Mac and also via intel emulation in Docker).
The setup:
The test times out after 30s (default Golang test timeout). If you notice, the plugin is actually started 4 times (resulting in 4 separate processes on different ports). 3 of them received an
InitPlugin
request and the first also received theUpdateCatalogue
request.Running locally, I can see that 3/4 of the
matt
processes were started and continue to run after the tests complete:This doesn't seem to happen with the protobuf plugin, so I do have my suspicions of this being a matt plugin specific problem.
Update
So I increased the test timeout by another 100s to get past the Golang timeout (in case that was all it was. It wasn't). The build failed with a verification error code of
2
(https://github.com/pact-foundation/pact-go/actions/runs/3758088926/jobs/6386014379#step:5:2542) which indicates the verification process wasn't able to run.This leads me further down the "matt plugin" problem, but there are no obvious logs to indicate the process was killed/died or panic'd (I've also wrapped the plugin's main process in a panic
recover()
, so it would catch and log any of those). What's also confusing, is that this plugin works with the Pact JS builds on linux. But it does seem like the driver is trying to start the plugin and run the verification, but something goes wrong and it has to continually try and start a new plugin process.The logs from the plugin are interesting, with an extra plugin process starting this time:
What I found really interesting, is that the github agent detected the orphaned processes:
These were the first three plugins started by the framework, my assumption is that the last one the driver started (PID 6031) was shutdown by the framework (albeit I can't see any logs to validate this). This indicates the processes didn't die, but somehow the driver lost track of them or deliberately orphaned them?
The text was updated successfully, but these errors were encountered: