Hello together, as we successfully made it to the...
# general
s
Hello together, as we successfully made it to the point to reach "Platinum Pact Nirvana" last week (we have a webhook now that triggers the providers' cicd when the consumer changes a PACT), I am starting to learn a bit more about the "Pending Pacts" feature. In the beginning of reading the docs and watching the AMA video I was a bit confused of the feature. Because the objectives of Platinum and Pending Pacts seem to be mutually contradictory to me then, as Platinum is about "Prevent a consumer to merge his PR if his changed PACT is incompatible with the provider". The purpose of Pending Pacts I understood now is in my words: "Do not break the CICD of the provider, if a consumer changed a PACT that the provider is not supporting (yet)". So I was asking myself, "The problem that Pending Pacts solves shouldn't exist with Platinum? At no point in time there could be a PACT on the main branch the provider does not support, because its the job of the consumer to only merge his potentially uncompatible PACT changes to main as soon as the provider supports it.. So what am I not getting right about this? I am confused." 🙂 The more I read about it the more clearer it gets. Also, because I was seeing this "hint" in the Pending Pacts article:
ideally, this should have been done in a feature branch, but for the sake of this example, we'll assume best practice advice was not followed.
https://docs.pact.io/pact_broker/advanced_topics/pending_pacts
So the way I understand it now must be this: Pending Pacts was made for the rare cases in which consumers accidentally or forcefully merge/push their changed PACT even though the PR pipeline wouldn't let them, isn't it? So either bei Administrator's force-merge of a PR even though the PR's quality gate failed, or by directly pushing to the main branch to hotfix something, etc. If in these cases they would at the same time change a PACT that the provider is not supporting, they would fail the providers cicd. Did I get this right?
m
Yes that's one scenario. It's also to support providers automatically verifying new consumer pacts (via WIP pacts) without breaking their build. Also, there are situations where the exact guidelines in nirvana aren't suitable, so having pending also simplifies those use cases
👍 1