Closed s1apped closed 3 months ago
Pretty sure by filtering consumers, the verification results are invalid and are not sent. I can see why you may want the interim results up there (a work in progress verification for a given consumer) but IIRC the semantics are currently undefined so this is the safer course of action.
There should be a log of sorts if this is the case, sharing your test output and any additional DEBUG logs might help.
I was using WIP and Pending for verification but it was problematic because it executed tests for every provider consumer feature branch combination instead of only for main and deployed.
I used this property based on: https://github.com/pact-foundation/pact-jvm/tree/master/provider/junit#allowing-just-the-changed-pact-specified-in-a-webhook-to-be-verified-406
but maybe it's outdated?
Thanks, will need the maintainer to confirm this behaviour then.
wondering if it has something to do with default selectors?
2024-06-04 14:30:28.796468 I [7:puma srv tp 002] PactBroker::Api::Resources::ProviderPactsForVerification -- Fetching pacts for verification by pact-producer -- { :provider_name => "pact-producer", :params => { "consumerVersionSelectors" => [], "includePendingStatus" => false } }
2024-06-04 14:30:28.799830 D [7:puma srv tp 002] PactBroker::Pacts::PactsForVerificationRepository -- Default selectors -- [{:main_branch=>true, :consumer=>"pact-consumer"}, {:currently_deployed=>true}, {:currently_supported=>true}]
Just confirming you also have set @AllowOverridePactUrl
on your test class?
Yes. Tests are using Pact from url but results aren't published
Oh, did you get to the bottom of it?
hey. yep huge overlook on my end and obvious problem. I was missing override url annotation on class which I was sure was extending class with annotation. This was causing 1 test using different contract url which was causing pact to calculate different calculateInteractionHash so publish didn’t trigger because not all pacts were verified.. Sorry for the fuss and I really appreciate your help!
Ah! So you mean this annotation?
Good to know, and glad it's all sorted (also, phew!).
Unfortunately yes :(
No worries - we've all been there!
Hello,
Looks like there is an issue with publishing verifications results triggered by webhook to pact broker. @YOU54F was kind enough to take a look and was able to recreate it on pact flow. Here is the link to full thread https://pact-foundation.slack.com/archives/C9UN99H24/p1716450450193459.
I'm setting below properties
Verification jobs are triggered properly and contract passed by PACT_URL is being used but results are not published back