pact-specification icon indicating copy to clipboard operation
pact-specification copied to clipboard

Pending pacts and can-i-deploy

Open holomekc opened this issue 10 months ago • 4 comments

Hi,

I was wondering. We have the situation that a consumer created a new pact with a new state, which results in a pending pact. This works fine in our pipeline during the junit tests. We can see in the logs that the broker provided the pact, but the junit test ignores it because it is pending. So far so good.

The issue we face now is that the consumer deployed this changes already. This is breaking our pipeline because the can-i-deploy feature then tells us that we are breaking this pact.

I mean ok the consumer should not deploy. I get that part, but it also is a bit strange that our tests are fine with the pending pact and ignores it, but the can-i-deploy feature then complains that we are violating the pact.

Should not the can-i-deploy feature ignore pending pacts as well? We checked if we could ignore pending pacts in our pipeline manually. We are using https://docs.pact.io/pact_broker/client_cli/readme#can-i-deploy. But the issue is the json response does not include the pending pact information.

Do I have the wrong expectations here? What is your opinion?

Br, Chris

holomekc avatar Aug 18 '23 05:08 holomekc