Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Following Pack-JVM-Example, the packVerify called from gradlew never updated the "Last Verified" field on ariman.pact.dius.com.au #738

Closed
aricalee opened this issue Jul 22, 2018 · 21 comments

Comments

@aricalee
Copy link

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

@aricalee
Copy link
Author

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...

@gammabowl
Copy link
Contributor

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.

@gammabowl
Copy link
Contributor

@rholshausen - was wondering if this is a regression caused after the changes in #694 ?

@aricalee
Copy link
Author

@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.

@uglyog
Copy link
Member

uglyog commented Jul 28, 2018

@Shashidesai That issue only effected the JUnit5 module.

@uglyog
Copy link
Member

uglyog commented Jul 28, 2018

@aricalee can you run the gradle command with debug logging (-d) enabled?

@aricalee
Copy link
Author

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

@aricalee
Copy link
Author

@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

@uglyog
Copy link
Member

uglyog commented Aug 11, 2018

@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.

@bethesque
Copy link
Member

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.

@uglyog
Copy link
Member

uglyog commented Aug 11, 2018

I've just added it

@bethesque
Copy link
Member

@aricalee please try again with the updated logging.

@uglyog
Copy link
Member

uglyog commented Aug 12, 2018

Version 3.5.21 has been released with the additional logging

@rsaccoll
Copy link

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')

@luisxiaomai
Copy link

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.

@rsaccoll
Copy link

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"]}}

@bethesque
Copy link
Member

You need to set the provider version number in the configuration.

@uglyog
Copy link
Member

uglyog commented Sep 17, 2018

@rsaccoll Did you not get a failure with the 400 response?

@rsaccoll
Copy link

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

@uglyog uglyog reopened this Sep 17, 2018
@uglyog
Copy link
Member

uglyog commented Sep 17, 2018

Re-opening as we have not had any feedback from @aricalee if this is the same issue

@luisxiaomai
Copy link

luisxiaomai commented Sep 18, 2018

Specify project version in build.gradle will solve this issue. Thanks @rsaccoll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants