Hi, I have a question regarding the Pact Workflow...
# pact-broker
w
Hi, I have a question regarding the Pact Workflow without Webhooks assuming we get a new pair consumer/provider. A consumer would implement the contract and publish it to PactFlow with a PR (branch name will not be main). Assuming Provider would not have it implemented yet on master a PR would be opened to implement the contract of the consumer. The PR validation pipeline on provider side however would run the verifications as documented in pact nirvana step 7 the following way: verify pacts with [mainBranch] and [deployedOrReleased] selectors This would fail, since there is no contract on mainBranch yet known to PactFlow and also there is no deployedOrReleased version. So assuming the PR build would need to succeed the provider would be blocked right here? Any heads up on how to avoid blocking each other in such a scenario? Greetings
👀 1
y
There are a couple of ways if you are synching feature development you could have a selector for
matchingBranch
which would use the branch of the feature request, so that would assume the consumer raises the feature req with the same branch as which they have published the contract you can also use work in progress pacts, which will allow pacts to be verified as part of the main branch verification https://docs.pact.io/pact_broker/advanced_topics/wip_pacts couple this with enablePendingPacts: true so that the failures don’t block the providers main build unneccessarily
w
Thanks Yousaf - will take a deeper look at work in progress pacts. Thank you.
no problem 1
m
We should add that to Nirvana Yousaf. I'll add today and compare to the ci/cd guide
👌 1
👌 1
y
Thanks Matt, it’s mostly summing up Beth’s awesome words/guides. it’s now in the reworked ci/cd guide over in PactFlow which is where i started to create a real world example to then circle back and complete the nirvana guide https://docs.pactflow.io/docs/workshops/ci-cd/workshop/protecting-the-provider https://docs.pactflow.io/docs/workshops/ci-cd/workshop/verifying-feature-pacts you might some of the text useful for adding into the guide.
👍 1
it’s touched on in the pact nirvana guide https://docs.pact.io/pact_nirvana/step_4#d-manually-verify-the-pact-by-consumer-version-selectors-using-the-pact-broker should ensure that we just tell the user to set enablePending and includeWipPactsSince in this step because it’s part of our recommend setup https://docs.pact.io/provider/recommended_configuration#pending-pacts we can suggest that they can see it in action in the ci/cd workshop, or read the pending pacts and wip pacts pact on docs.pact.io for a theoretical explanation
m
Yeah, I’m just looking now
I reckon we fold it into that step