David Hvilava
05/25/2022, 9:05 AMIPactUriOptions
provide an ability to publish verification results similar to IPactBrokerOptions
?
Example: a contract is changed and published to PactFlow, then a webhook triggers a provider CI to check the contract, then we need to publish verification results back to PactFlowAkke Luukkonen
05/25/2022, 10:42 AMDavid Hvilava
05/25/2022, 10:46 AMAkke Luukkonen
05/25/2022, 10:49 AMpact_verifier_cli
tool in my pipelines to verify the contracts for a provider. But that's a bit different case.
But indeed I'm not aware if you could just publish some verification results from a verification run made with the libraries. I doubt that since it probably doesn't produce any files?David Hvilava
05/25/2022, 10:57 AMDavid Hvilava
05/25/2022, 10:59 AMMatt (pactflow.io / pact-js / pact-go)
Adam Rodger (pact-net)
05/25/2022, 5:40 PMAdam Rodger (pact-net)
05/25/2022, 5:42 PMDavid Hvilava
05/25/2022, 6:58 PMConsumerVersionSelector
as for regular pact verificationAdam Rodger (pact-net)
05/25/2022, 7:01 PMAdam Rodger (pact-net)
05/25/2022, 7:06 PMAdam Rodger (pact-net)
05/25/2022, 7:07 PMDavid Hvilava
05/25/2022, 7:19 PMMatt (pactflow.io / pact-js / pact-go)
So yeah, I’d recommend just redoing the entire provider run. Publishing duplicate verification options isn’t a problem.No, that’s not the recommended flow. In step 6 of the CI/CD setup guide, you can verify a specific pact version with the webhook: https://docs.pact.io/pact_nirvana/step_6#add-can-i-deploy-to-consumer-pr-pipeline. This is how you ensure there are no “gaps” in coverage, meaning no surprises for use of
can-i-deploy
I believe this is what David is talking about.
You can re-run the verification, but it does mean that the verification options are broad enough to verify the specific pact that was changed which is not always the case.
It’s also weird to grab pacts from somewhere other than the broker but then publish the results of that to a broker.In this case, the URI is a broker URL. It’s just a path to the contract, not a hypermedia relation to discover the pacts to verify.
I can’t even tell from the FFI code if it’s supported or not. You set the publish options but you never pass a broker URL, so how would it know where to publish the results to?It should be possible, but I can see why you can’t infer that from the APIs. If the URI is a pact broker URL, it should have the correct relations in it to publish a result In this case, I believe you can set the values of
pactffi_verifier_set_publish_options
.
@uglyog is my understanding correct?David Hvilava
05/26/2022, 8:46 AMMatt (pactflow.io / pact-js / pact-go)
Adam Rodger (pact-net)
05/26/2022, 3:54 PMAdam Rodger (pact-net)
05/26/2022, 8:03 PMDavid Hvilava
05/27/2022, 8:22 AMEugene Baranovsky
07/13/2022, 9:50 AMDavid Hvilava
07/13/2022, 12:15 PM