```Hi, I have a question about BiDirection Contrac...
# pact-jvm
a
Copy code
Hi, I have a question about BiDirection Contract Testing. Steps I followed
1. I created OAS swagger.json file and published as provider contract with version 1.0.0
2. Ran can-i-deploy tool and recorded the deployment for the version 1.0.0
3. Generated the consumer contract which is compatible with provider contract
4.Published this consumer contract with version 2.0.0
5. Ran can-deploy-tool and it says consumer version 2.0.0 is compatible with provider version 1.0.0
6.Hence proceeded with deployment and recorded the deployment with consumer version 2.0.0
7.Now, I made a breaking change in provider contract (in OAS) and published to pact as version 1.0.1
8.Ran can-i-deploy and it says NO as provider contract 1.0.1 is not compatible with consumer version 2.0.0
9.I updated consumer executions to be inline with new provider change and published the consumer contract with version 2.0.1
<http://10.In|10.In> pact flow UI, I see that consumer version 2.0.1 is compatible with producer version 1.0.1 which is good
11.But when I run "can-i-deploy" it says NO as consumer version 2.0.1 is compared with producer version 1.0.0 instead 1.0.1
How can I proceed with deployment??
m
So the critical mistake you are making, is that you’re making a breaking change and now have to coordinate that by synchronising deployments. We want to avoid this at all costs. At step 9, the consumer is not in prod yet. So if the provider is to deploy (step 11) it would temporarily break the consumer, until it releases. Whether you are doing BDCT (PactFlow only) or CDC (Pact), PactFlow won’t allow a situation like this to happen
You should follow an expand and contract approach, where you make a change that allows the consumer to move to that, before removing the behaviour the consumer(s) previously relied on