pact-jvm
pact-jvm copied to clipboard
Incorrect error message for canIDeploy failed gradle task
Steps to reproduce:
- create interaction between serviceA and serviceB;
- create failed verification of contract between serviceA and serviceB;
- create interaction between serviceC and serviceD;
- create failed verification of contract between serviceC and serviceD;
- run canIDeploy for serviceA and serviceB
canIDeploy
-Ppacticipant=serviceA
-PpacticipantVersion=versionA
-Ppacticipant=serviceB
-PpacticipantVersion=versionB
Expected resut:
Computer says no ?\_(?)_/?
There is no verified pact between the latest version of serviceA (versionA)
and version versionB of serviceB
Actual result:
Computer says no ?\_(?)_/?
There is no verified pact between the latest version of serviceC (versionC)
and version versionD of serviceD
Issue
pacticipant
and pacticipantVersion
parameters are ignored in error message for failed canIDeploy
task
Note:
for verified interaction we still receive valid output, no issue here
Computer says yes \o/
I am unable to replicate this. Can you provide the versions of Pact-JVM, Gradle and the Pact broker you are using?
I have setup the broker as per your example:
And when I run canIDeploy:
$ ./gradlew canIDeploy -Ppacticipant=serviceA -PpacticipantVersion=versionA -Ppacticipant=serviceB -PpacticipantVersion=versionB
> Configure project :
The 'org.jetbrains.kotlin.platform.*' plugins are deprecated and will no longer be available in Kotlin 1.4.
Please migrate the project to the 'org.jetbrains.kotlin.multiplatform' plugin.
See: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html
> Task :canIDeploy FAILED
Computer says no ¯\_(ツ)_/¯
WARN: For production use of can-i-deploy, it is recommended to specify the environment into which you are deploying. Without the environment, this result will not be reliable.
The verification for the pact between the latest version of serviceA (versionA) and version versionB of serviceB failed
FAILURE: Build failed with an exception.
* What went wrong:
Can you deploy? Computer says no ¯\_(ツ)_/¯
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
BTW, the canIDeploy task does not take multiple values for pacticipant
and pacticipantVersion
, I assume they just overwrite each other, so it is effectively just running ./gradlew canIDeploy -Ppacticipant=serviceB -PpacticipantVersion=versionB