Hello, we've been using Pact for a few months now ...
# pact-js
l
Hello, we've been using Pact for a few months now at our company. We recently introduced token-based authentication between our services and one of our provider's APIs now requires extracting claims from the token presented. The issue we are having is that previously verified pacts on the main branch are running against the auth changes in the provider, causing the tests to fail. Can we depreciate certain pacts in the pact broker ?
m
Yes, but it ultimately depends. If this is a breaking change you'll need to safely introduce it otherwise Pact is just the canary in the coal mine. What selectors are you using to discover and verify pacts?
l
i think we are using the branch name
👍 1
m
It sounds like it’s a breaking change though, so if you delete the pacts won’t that just hide the fact that the previous versions won’t be compatible?
l
we havent deployed any services though and we are pretty early in greenfield stage.
👍 1
m
right, the simplest option then is to just delete the old pacts
(or the integration itself and just let the new ones override it)