Lionel Mendonca
08/08/2022, 10:35 PMcan-i-deploy
is accurately telling me that both consumer and provider are in sync if I never ran the consumer test yet?
3. Continuation from point 2, Do I have to run both consumer and provider tests if consumer pact was developed after the provider test in order to release the consumer?(I think so but just wanted to confirm if there is a different approach or not)
I may have more questions, which I can bring up as they brew. Could you please let me know if this is the right forum to bring these questions up, or if I should bring them up elsewhere.Matt (pactflow.io / pact-js / pact-go)
Considering that I didn’t face any issues exercising the paid features mentioned here https://pactflow.io/pricing/ with an exception for SAMl integration, in the free versions above, why would I need the paid version?If you want to use the bi-directional feature, this is only available in Pactflow. Is this your intent? We have features other than SAML in Pactflow, which you can see here. You can also see our public roadmap to see if what we’re working on is going to be useful to you.
Matt (pactflow.io / pact-js / pact-go)
How can I ensure that none of our developers are able to game the system somehow as we see some room for it? My particular question is that if Provider decides to write the pacts when consumer is not ready, How do I ensure thatWhat do you mean by “provider writes the pacts”? Do you mean publishing their provider contract (an OAS) that is invalid?is accurately telling me that both consumer and provider are in sync if I never ran the consumer test yet?can-i-deploy
Matt (pactflow.io / pact-js / pact-go)
Continuation from point 2, Do I have to run both consumer and provider tests if consumer pact was developed after the provider test in order to release the consumer?(I think so but just wanted to confirm if there is a different approach or not)In the cases of BDCT no (because the OAS is not changing, getting the provider to re-publish the same OAS doesn’t give us any new information). With the Pact model, yes, because the provider must verify each contract individually
Matt (pactflow.io / pact-js / pact-go)
Could you please let me know if this is the right forum to bring these questions up, or if I should bring them up elsewhereYou’re in the right place 🙂
Lionel Mendonca
08/10/2022, 6:09 AMLionel Mendonca
08/10/2022, 6:11 AMLionel Mendonca
08/10/2022, 6:24 AMcan-i-deploy
fit into this? This page isnt very clear about that. I conceptually understand the diagram but practically, I am making assumptions that I am not 100 percent sure of.Lionel Mendonca
08/10/2022, 6:26 AMswagger-mock-validater
.
4. Provider runs provider tests and publishes passing results to broker. - At this point Provider doesnt care about an actual consumer because there is none.
5. Provider publishes the open api spec json to artifactory.
6. Provider runs can-i-deploy
pact CLI command to verify if provider is ready for release against the pact-broker.
7. Provider can release if step 1 to 6 are passing.
8. Consumer development begins and consumer writes a consumer contract.
9. Consumer retrieves the published provider open-api spec json from artifactory to validate pact against it using same tool as step 3.
10. Consumer publishes the contract to broker.
11. Consumer triggers the provider tests by cloning the provider repo with latest version specified in gitops-version
and actually runs the provider tests to publish the verification results to pact broker.(May not be needed since a comparison with OAS is sufficient - Confirming with Pact team)
12. Consumer runs can-i-deploy
to verify if consumer is ready for release. (May not be needed since a comparison with OAS is sufficient - Confirming with Pact team)
13. Consumer can release if steps 8-12 passed.
14. A month later, provider changes its code, breaking the contract but does not know it yet.
15. Provider repeats steps 3-6 to verify that its not breaking the contract with the consumer(This time it does care about consumer because a released or an active version of the consumer exists).
16. Provider fails on the repeated step 4 as the tests will fail because code was modified in step 14.
17. Teams coordinate the failure and decide if the fix needs to be on provider or consumer side.
18. If provider makes the fix, then contract is reverted to original content and steps 3-6 are repeated. If consumer has to fix, Then steps 1-12 are repeated and both provider and consumer are released together to ensure accurate interface in production.Matt (pactflow.io / pact-js / pact-go)
Consumer triggers the provider tests by cloning the provider repo with latest version specified inExactly. The OAS is the only information we need to ensure the consumer contract is compatible with the Provider contract - this is why you don’t need to trigger a provider build when a new consumer contract is published. Triggering a provider build is just going to result in the same OAS being published.and actually runs the provider tests to publish the verification results to pact broker.(May not be needed since a comparison with OAS is sufficient - Confirming with Pact team)gitops-version
Matt (pactflow.io / pact-js / pact-go)
1. Consumer runsboth provider and consumer should always run that command prior to deploymentto verify if consumer is ready for release. (May not be needed since a comparison with OAS is sufficient - Confirming with Pact team)can-i-deploy
Matt (pactflow.io / pact-js / pact-go)
Teams coordinate the failure and decide if the fix needs to be on provider or consumer side.Yes, that too. Ideally, the provider uses an expand and contract pattern, and never breaks a consumer. But of course we live in the real world, and sometimes that’s not possible
Lionel Mendonca
08/10/2022, 1:40 PMLionel Mendonca
08/10/2022, 3:43 PMLionel Mendonca
08/10/2022, 3:44 PMMatt (pactflow.io / pact-js / pact-go)
Lionel Mendonca
08/11/2022, 1:55 PMLionel Mendonca
08/11/2022, 1:57 PMLionel Mendonca
08/11/2022, 4:47 PMLionel Mendonca
08/11/2022, 4:48 PMMatt (pactflow.io / pact-js / pact-go)