Making it easier to get verification results from test/prod provider versions when contracts change #434
bethesque
started this conversation in
New Features
Replies: 1 comment
-
@pendsley would love your thoughts on this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
To understand whether or not we can deploy a consumer when its contract has changed, we need to get verification results from:
If the main branch verification passes and the test/prod verifications pass, we know we can deploy straight to production (can-i-deploy will be successful for each environment).
If the main branch verification passes, but the test and/or production versions fail, we know we need to wait for the latest version of the provider to be deployed into test/prod (can-i-deploy will block us from deploying to any failed environments).
If main/test/prod all fail, then we know that the provider still needs to implement the required changes (can-i-deploy will block us from deploying to any environment).
If the main branch passes, but we don't have any test/prod verification results, then we might actually have a compatible consumer, but can-i-deploy will stop us from deploying, because we don't have a successful verification result from any of the deployed versions.
The problem
Getting all the required verification results (main/test/prod) required to deploy is currently difficult to do efficiently (ie. without excess unnecessary builds) and requires a high level of expertise in the Pact Broker usage. Currently, only the main branch verification result is well documented and easy to implement, meaning that many can-i-deploy queries will be coming back false (saying "no verification found") even if the currently deployed provider does actually implement the contract. When this happens, the consumer needs to wait unnecessarily for the latest version of the provider to be deployed, slowing the releases down.
Proposed solution
Soon, the Pact Broker will have:
This means that when a contract is published, the Pact Broker will be able to determine whether there is a verification result missing from any of the critical provider versions (latest main/current test/current prod).
A new event would be added called something like
contract_content_requiring_verification_published
. The user would need to create a webhook for this event that triggered a build that took the version number as a parameter (eg.${pactbroker.targetProviderVersion}
). When the broker detected that content had been published that did not have a verification result from any of the critical provider versions, it would trigger the webhook with the following combination of parameters.${pactbroker.targetProviderVersion}
set to the latest version from the main branch.Prerequisites:
record-deployment
/record-release
APIs.Scenarios
Brand new feature, provider implements change on feature branch (WIP enabled)
Beta Was this translation helpful? Give feedback.
All reactions