pact-foundation/pact_broker

Master issue for 'WIP pacts' feature

Closed this issue · 3 comments

Background:

Please read http://blog.pact.io/2020/02/24/introducing-wip-pacts/

Dependencies:

The client library must be using the new 'pacts for verification' API and must have implemented the pending pacts feature.

Changes required

Add an additional parameter to the verification configuration called includeWipPactsSince. It should accept a date/string (string is probably easier)! If we turned on all WIP pacts, we'd end up with 50 bajillion WIP pacts since the dawn of time, so the start date is to allow the users to pick a point in time from which to start including the WIP pacts. Ruby is pretty flexible with the date format it can parse. The full date format is 2013-02-13T20:04:45.000+11:00 but it will be perfectly happy with 2013-02-13, and that should be sufficient for the level of accuracy we're talking about.

For pact implementations that are calling the API directly, the includeWipPactsSince parameter should be added to the body of the 'pacts for verification' request. It won't change the format of the response, but there will be extra pacts included, and the notice text will explain why they have been included. All WIP pacts will be pending, which is why the pending feature must already be implemented.

For languages that wrap the ruby standalone, the only change that is needed is to pass the --include-wip-pacts-since parameter to the CLI.

Beth, I can't see the --include-wip-pacts-since option on the latest verifier (v1.30.0 is what's included in the latest standalone).

Do I need to do something for that to work? e.g. export a variable?

Until publicly released, you will need to consult the Pact team on Slack for instructions on how to turn on this feature.

Please consider this me consulting the Pact team :)

Nevermind, I can see this commit which explains it: pact-foundation/pact-provider-verifier@3109ce2

@mefellows - I can pick this up for pact-node, if you like?