Dear
I'm new with PACT and eager to setup a demo following the Pack-JVM-Example. Everything worked well following the instructions, but...the .gradlew :example-provider:pactVerify never updated the "Last Verified" field of the public shared pack broker.
May I know if I missed anything here?
Thanks
more updates.
I've upgrade the plugin to 3.5.19 and add the property pact.verifier.publishResults to the grade.properties and set it as true...but still does not work...
I am facing the same issue. i am using the gradle plugin id "au.com.dius.pact" version "3.5.19"
So when I run gradle clean pactVerify -Dpact.verifier.publishResults=true - pactVerify runs fine but I don't see the last verified column in the pact broker being updated.
@rholshausen - was wondering if this is a regression caused after the changes in https://github.com/DiUS/pact-jvm/issues/694 ?
@shashidesai I tried 3.5.19, 3.5.18, 3.5.17 and 3.5.12...but neither of them can publish the result to pact broker...now I can only call the restful API to "manually" update the verification status on pact broker.
@shashidesai That issue only effected the JUnit5 module.
@aricalee can you run the gradle command with debug logging (-d) enabled?
output.zip
@uglyog Thanks for your response so much. I've uploaded logs of last week with the -debug specified. I can redo the test and pass you the log if it's necessary.
Thanks
@uglyog I configured a local pact-broker with docker and retest the pactVerify function of the gradle 3.5.19(pact broker version is 2.24.0). From the debug logs...I can see that the verification result "OK" has been published to broker...but I cannot see the "Last Verified" field from my pact broker. Here is the log
pactVerify.zip
Thanks
@bethesque I'm going to need some help with this one. The Pact-JVM Gradle plugin is publishing the verification results (I can see the entries in the logs), but the last verified column is not being updated in the broker UI.
It looks like @uglyog has just added the request and response body logging. Has that been released Ron? I can't tell anything more than you until we see those logs.
I've just added it
@aricalee please try again with the updated logging.
Version 3.5.21 has been released with the additional logging
Hello, I ended up running with the plugin in version 3.5.21 and still the problem persists. Here are some logs:
pactVerify_01.log - I just run with the command: ./gradlew: example-provider: pactVerify -d
pactVerify_02.log: run with the command ./gradlew :example-provider:pactVerify
pactVerify_03.log: run this with the command ./gradlew :example-provider:pactVerify -Dpact.verifier.publishResults=true -d
pactVerify_01.log
pactVerify_02.log
pactVerify_03.log
I found it interesting that, regardless of the commands given above, this warning always appears:
[WARN] [au.com.dius.pact.provider.ProviderVerifier] Skipping publishing of verification results as it has been disabled (pact.verifier.publishResults is not 'true')
I used gradle -Ppact.verifier.publishResults=true pactVerify to do verification and want to see verified status in broker UI, but it can not. Used gradle plugin is 3.5.21.
Please help on this.
Using the new version (3.5.22) the debug is presenting this:
[org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connection established "my_machine":56778<->"url_from_broker":82
17:31:59.295 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Executing request POST /pacts/provider/ExampleProvider/consumer/JunitRuleMultipleInteractionsConsumer/pact-version/29795cd891e6587f92969787f01a1d38836bae36/verification-results HTTP/1.1
17:31:59.295 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Target auth state: UNCHALLENGED
17:31:59.295 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Proxy auth state: UNCHALLENGED
17:31:59.306 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection can be kept alive indefinitely
17:31:59.307 [DEBUG] [au.com.dius.pact.pactbroker.HalClientBase] Got response HTTP/1.1 400 Bad Request
17:31:59.307 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection [id: 488][route: {}->http://"url_from_broker":82] can be kept alive indefinitely
17:31:59.307 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-488: set socket timeout to 0
17:31:59.307 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 488][route: {}->http://"url_from_broker":82][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 10]
17:31:59.307 [DEBUG] [au.com.dius.pact.pactbroker.HalClientBase] Response body: {"errors":{"provider_version":["Version number 'unspecified' cannot be parsed to a version number. The expected format (unless this configuration has been overridden) is a semantic version. eg. 1.3.0 or 2.0.4.rc1"]}}
You need to set the provider version number in the configuration.
@rsaccoll Did you not get a failure with the 400 response?
Yes @uglyog, and when searching I noticed that the "providerApplicationVersion" was missing in the post.
Just to register:
in gradle, just for testing, I left it like this:
聽聽聽聽聽聽聽聽聽聽聽聽 ExampleProvider {
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 protocol = 'http'
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 host = 'localhost'
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 port = 8080
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 path = '/'
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 project.version = "2.0.1"
And I performed like this:
./gradlew: example-provider: pactVerify -Ppact.verifier.publishResults = true
And solved. Thank you all for the support.
Thanks also @bethesque . Only after much debug I noticed this .. hehehee
Re-opening as we have not had any feedback from @aricalee if this is the same issue
Specify project version in build.gradle will solve this issue. Thanks @rsaccoll
Most helpful comment
You need to set the provider version number in the configuration.