Hi, We are trying to integrate different workflows...
# pact-broker
p
Hi, We are trying to integrate different workflows into the OSS pact broker. One of these is to create a pipeline that has a can-i-deploy check for the provider. Now no consumers have used PACT before on any of its interfaces. Thus the provider isn't available as a pacticipant in the broker. We are looking at adding in the provider tests, doing a can-i-deploy and then deploy. At a later date the consumers will then generate their PACTs as they implement PACT - start publishing, and then checking that they can deploy, having provider verify etc. However the initial call to can-i-deploy fails as the pacticipant isn't known in the broker ""error": "No provider with name 'example-provider' found"". Is this an invalid workflow in PACT? Do we need to / can we, just create the pacticipant (even without integrations) if it doesn't exists? so other stages will work. I realise it is consumer driven - so is it actually valid to have a provider without consumer interactions? It would be nice to fully complete the provider's pipeline as their 'test' is quite generic, so it would just work until and when consumers start using it (or implementing their tests), without then returning to update the provider unless any initial state is required. Thanks
m
a dummy consumer contract might be the way to go, to get the systems up and going. When you get a “real” consumer, you can kill off the dummy app
If you are generally provider driven as a group, and use OAS as a specification, you may also like to look at Pactflow’s bi-directional contract testing feature.
p
Thanks @Matt (pactflow.io / pact-js / pact-go) we are certainly considering switching to PACTFlow, partly for the SaaS as we have found upgrading our hosted OSS time consuming, partly for user access, and also the option of bi-directional. I did see a table in your documentation that compared bi-directional against pure PACT, and you gain some things for ease of use, but lose some level of confidence if process isn't fully followed (like keeping OAS updated). We are re-platforming our solution soon - so need more information from our API team to decide on there working processes. Dummy example would be a potential solution (that we had tried - but can cause problems). Another we are considering is using a check if the pacticipant exists in broker before trying a verify or can-i-deploy (and not running these if it doesn't).
b
@Paul you can register an empty pacticipant version in the pact broker so that you can call can i deploy on it and it won't error
m
ah, even better.
b
See "Setting up a Pact in a "universal" CI/CD pipeline"
m
ah awesome, I remember that was updated but hadn’t seen that section yet