Hello, I ran into an issue yesterday where we upda...
# pactflow
j
Hello, I ran into an issue yesterday where we updated a contract with the same version as an existing contract. As a part of our CICD we are pushing contracts for each commit. We found that the broker would tell us that the contracts are now compatable but can-i-deploy would tell us that they were not. It looked like can-i-deploy was still using the older version of the contract instead of the one that had been updated. Condensed timeline 1. Consumer version 2.1.62 was pushed - incompatible with provider 2.0.0 2. Meeting to discuss bringing these into alignment 3. Provider version 2.0.1 was pushed 4. Provider version 2.0.1 deployed because it is compatible with consumer version 2.1.61 5. Consumer version 2.1.62 pushed again to bring it into alignment with 2.0.1 a. Broker says everything is good b. Can-i-deploy says it isn’t good, it looks like it is still using the contract from step 1
My question is, are we using versions incorrectly or is there some unwanted caching going on with can-i-deploy?
m
hmmm may have been a UI/refresh bug. I have checked your account, and that contract is definitely red (consumer version
2.1.61
and provider version
2.0.1
) The compatible consumer version is actually
2.1.62
.
j
100% agreed that those are the compatible versions. Yesterday I had to delete the
2.1.62
contract and reupload it because it couldn’t get past this issue
b
@Josh Steffensmeier I can see that you’re using semantic versions, and that your broker is an “old” one that allows consumer contracts to be modified after publication.
This could be causing race condition problems.
We recommend using the git sha to avoid this.
Newer tenants do not allow modification of the consumer contract after publication, for this reason.
I can disable contract modification, and it will then cause your build to error if it tries to modify, and this might highlight where your problem is.
Please raise a support ticket if you would like me to do this.
j
Ahh ok thanks for that link, that is what we were looking for. It should be an easy add for us to add the git sha to the version to fix this. Thank you!
🙌 1