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
Webhook triggered without contract change #270
Comments
Are you tagging the version with the commit sha as well? That's the reason the webhook is firing. The logic for determining whether or not to trigger the webhook is: if the pact's consumer version is untagged, check the previous untagged pact, and fire if the content is different, or there was no previous version. If the pact's consumer version is tagged, then it looks for the latest version with each of the tags, and fires if the content has changed or if there was no previous version with that tag. |
No. Consumer is tagged with branch name. SHA is a version of both consumer and provider.
Based on above if I understand correctly webhook shouldn't be triggered? |
Hm. This is confusing then. The other day I did a massive refactor of all the logic and added in some detailed logging for showing why the webhook gets triggered. Let me do a release do you can use that. Are you using the docker image? |
Yes I'm using docker image. |
Grab |
@bethesque I setup everything again and did some more digging
The only differences between pact versions are "createdAt": or "_links": |
@bethesque did you have a chance to look into? Any information would be greatly appreciated. |
I'm so sorry, I've been crazy busy. I'll try and get on to this. |
Which lib are you using to publish the pacts @s1apped? I'm wondering if perhaps the tagging is happening after the pact publication. It should come first. |
Hi @bethesque I'm using junit. |
Fix has been released to pact-jvm. Please try again with the latest version. pact-foundation/pact-jvm#892 (comment) |
@bethesque it looks good now! Thank you |
Hi,
I have issue with Pact Broker Webhook. It should trigger only when Pact change but it triggers for any change in consumer (new commit which is also the Tag)
{
"consumer": {
"name": "a.service"
},
"provider": {
"name": "b.service"
},
"request": {
"method": "POST",
"url": "https://jenkins.test.eu/job/b_build/build",
"headers": {
"Accept": "application/json"
},
"username": "test",
"password": "test"
},
"events": [
{
"name": "contract_content_changed"
}
]
}
I also have can-i-deploy in pipeline:
"/pact-broker can-i-deploy --retry-while-unknown=12 --retry-interval=10 --pacticipant a.service --version ${GIT_COMMIT} --broker-base-url http://10.10.10.10"
I checked differences but nothing:
No previous distinct version was found for Pact between
Thank you.
The text was updated successfully, but these errors were encountered: