spring-cloud-contract icon indicating copy to clipboard operation
spring-cloud-contract copied to clipboard

Server should be aware of contract versions used by the collaborators

Open jkubrynski opened this issue 7 years ago • 0 comments

Currently, we're verifying contracts based only on producer versions - usually current contract version + version deployed on production. It will be great to be able to determine "active" contracts by gathering information about versions downloaded by the consumers during their deployment pipelines. Example:

  • consumer A has been deployed to production on 2017-03-12 -> during the pipeline it verified the contract by downloading stubs version 20170310
  • consumer B has been deployed to production on 2017-03-22 -> during the pipeline it verified the contract by downloading stubs version 20170318
  • consumer C has been deployed to production on 2017-04-25 -> during the pipeline it verified the contract by downloading stubs version 20170425 and now I know that if I want to deploy new server version I should verify the contract against 20170310, 20170318 and 20170425

We should do everything to do it without any external application, so the solution will work out-of-the-box.

The easiest way is when Ci has permission to create tags in the repository of the server. Then during compilation of the Consumer A we can find the prodstubs tag in the server repository and tag it with stubsConsumerA. Now, during server compilation we just need to download stubs for all stubs* tags to verify if we're not breaking the production.

jkubrynski avatar Apr 26 '17 20:04 jkubrynski