pact-foundation / pact_broker

Enables your consumer driven contracts workflow
http://pactflow.io
MIT License
708 stars 177 forks source link

which version of the pact specification does pact broker 2.73.0 supports #364

Closed arshadalis closed 3 years ago

arshadalis commented 3 years ago

I have already

Software versions

We are using scala-pact

Behaviour

When publishing the pact verification results, it returns 400 bad request error. The sbt-scalapact client currently supports v2 of the pact specification. I suspect that the 400 error is returned because pact-broker 2.73.0 supports later version of the pact specification. I tried searching the docs for the pact specification version supported by the above mentioned pact broker, but couldn't find anything.

The question

Which version of the pact specification is supported by pact-broker 2.73.0 ?

Relevant logs

........ [scala-pact] All Pact verify tests passed. Publish verification results failed with 400 ..........

mefellows commented 3 years ago

It's a fair question to ask, but the broker doesn't really know/care about specification versions, at least not enough to reject a pact publish (you literally can publish any JSON document).

The 400 is almost certainly another problem, either with scala pact or whatever command you're using to publish.

Could you please use one of the methods described here (https://docs.pact.io/pact_broker/publishing_and_retrieving_pacts/) and compare to your current approach? You may want to enable debug logging to see what the actual failure is.

bethesque commented 3 years ago

A 400 when publishing verification results is usually because the provider version number has not been supplied. Have a look at the response body if you can, and it will tell you the error. If you can't see the response body in any logs, raise an issue with pact scala asking for the response body to be printed out when there is an error.