pact-foundation / docs.pact.io

Pact documentation website
17 stars 98 forks source link

Improve documentation for Pending and Work In Progress Pacts #26

Open pendsley opened 4 years ago

pendsley commented 4 years ago

After integrating pending/wip pact support into our workflow, and answering various questions in Slack, I have compiled a list of suggestions that may (hopefully) help prevent questions in the future

Pending pacts

Work In Progress pacts

Other

bethesque commented 4 years ago

Awesome stuff. I'll make sure I tick all these off.

danilchican commented 3 years ago

When it will be done?:)

bethesque commented 3 years ago

The links to the docs are below, but I need to go back and make sure I've covered everything Phil raised here. Thanks for the reminder.

https://docs.pact.io/pact_broker/advanced_topics/pending_pacts/ https://docs.pact.io/pact_broker/advanced_topics/wip_pacts/

bethesque commented 3 years ago

Copying @pendsley's excellent description here for later use.

If the pacts are still recorded as not verified in the broker, then neither the provider nor consumer can deploy if they check the broker.

Kind of, but it's a little more nuanced. The consumer cannot deploy the version that has not been verified. The provider can still deploy non-breaking changes with the existing consumers. It cannot deploy any version that breaks a contract with the currently deployed consumers

All this does is allow the provider to get through the verification step without a failure.

Correct. Without pending pacts, a consumer could effectively block a provider's workflow by publishing a contract that is not supported by the provider. If this contract is merged into the main development branch, and providers verify against that tag, the provider's build will be broken until the issue is resolved. By using pending pacts, the provider team can continue to work on non-breaking changes with contracts it has already verified. Using pending pacts will let the provider team shift priorities to a hotfix that needs to go out now. Otherwise, they would have to resolve the contract compatibility issue first.