Kevin de Boer
03/13/2025, 12:25 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
1: Frontend creates a new feature, and add some point during development reaches the point where they require the new backend call to get some data.
2: Frontend creates a new consumer test, in which they stub the backend in a way that they would like to receive the data.
3: When the test passes, a new contract is created containing the new endpoint, and data they expect to receive (the interaction)
4: Frontend pushes the contract to the broker
5: Backend pulls the contract from the broker, provider test fails, and implements the endpoint according to the expected result.
6: Once the provider test passes, both consumer and provider proceed to merging and deploying their changes.
First of all, is my understanding so far correct?Yes that looks correct, although after step 4, if the contract has not been verified before (ie contents changed from last time it was verified), this will trigger a webhook to trigger providers ci build to verify a specific pact, against certain versions of the provider code (head of main branch, any deployed or released versions). for step6, provider would probably need to merge first depending on change (if they add something new). this may differ depending on scenario, and how you approach it, expand and contract to avoid a downtime scenario in case of a breaking change which you can do gracefully)
Yousaf Nabi (pactflow.io)
Kevin de Boer
03/13/2025, 3:17 PM