Hello all, My company is in the process of writin...
# general
e
Hello all, My company is in the process of writing contracts and utilizing Pact Broker. Recently we started discussing an interesting scenario: breaking changes. Say that a consumer and a provider have an existing contract, but both the consumer and provider agree that the provider service needs to change in such a way that will violate the contract. If the CI for consumer and provider implements can-i-deploy checks, how would you introduce this change? It seems to me that if the provider changes their code first, the can-i-deploy for the provider would break, because the consumer is still expecting the old version of the service. If the consumer goes first, the can-i-deploy for the consumer would break, because the old provider code no longer meets the expectations of the new contract. How do you rollout this change?
y
its a common question and is really context dependant. faq answer https://docs.pact.io/faq#how-can-i-make-a-breaking-change-to-a-provider
if you are making a breaking change, and don’t want to expand an extract, you can then plan accordingly, maybe a change window with expected downtime to coordinate a roll out. can i deploy supports running a check but suppressing the error code for scenarios like this
e
Thanks @Yousaf Nabi (pactflow.io)! I think that the expand and contract pattern will suit us well.
y
No worries, be sure to let us know how you get on :)
👍 1