JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
As this part is only executed to deliver the successful verification results, it should be no problem to skip that part entirely, if we don't have a result at all.
Sorry that i don't come up with a PR, but i'm not used to Kotlin at all, and the fix should be fairly easy to implement.
Interesting observation as a side note: when using the CLI (pact-broker), no error occurs.
🤖 Great news! We've labeled this issue as smartbear-supported and created a tracking ticket in PactFlow's Jira (PACT-2181). We'll keep work public and post updates here. Meanwhile, feel free to check out our docs. Thanks for your patience!
We are using the maven-plugin (au.com.dius.pact.provider:maven:4.5.10` for most of our PACT Steps during CI & Deployment.
Whenever we try to call
can-i-deploy
for a provider on a new tag (no consumers yet!), it fails withThe cause is obvious. When we ask with a (not yet) known tag, the server (PactFlow) sends this JSON response:
=> "matrix" is an empty array
The code indeed checks if the array is null (
?.
), but after that it callsget(0)
on the empty array.https://github.com/pact-foundation/pact-jvm/blob/521e26513dbed7375f24d138615005eec5f27080/core/pactbroker/src/main/kotlin/au/com/dius/pact/core/pactbroker/PactBrokerClient.kt#L1040-L1041
As this part is only executed to deliver the successful verification results, it should be no problem to skip that part entirely, if we don't have a result at all. Sorry that i don't come up with a PR, but i'm not used to Kotlin at all, and the fix should be fairly easy to implement.
Interesting observation as a side note: when using the CLI (
pact-broker
), no error occurs.