Hello, we're currently having with the OSS Pact B...
# pact-broker
t
Hello, we're currently having with the OSS Pact Broker. Several pipelines report, that there are no pacts to verify, even if there are. The UI of the broker gives conflicting information. When I configure the matrix to show all contract versions on the 'main' branch of the consumer, it shows a several entries. However, when I configure it to only show the latest contracts of the main branch there are no entries at all. Does anyone know how this can be? We do have a script running each night that removes branches from the broker that are no longer existent in the repository, but calling the branch deletion endpoint shouldn't delete any contracts that are still on other branches, right? (I already tried this out with a local broker instance and that doesn't seem to be the case).
blobwave 1
Oh yeah: the list of contracts on the main branch shows all of the branch tags greyed out, hovering on a tooltip says that this means that there is a more recent version of a contract, but that isn't listed.
The latest version of the participant endpoint is a version from a feature branch. (might be intended though?)
Oh man I think I got it. The last consumer contract test run on the default branch failed (due to an infrastructure failure), however the provider contract tests succeeded. This means that the broker knows of a newer pacticipant version, but has no contract belonging to it. Is it intended to run provider tests only when the consumer tests succeeded?
y
The last consumer contract test run on the default branch failed (due to an infrastructure failure),
did this publish a pact with new version? or did it fail before?
however the provider contract tests succeeded. This means that the broker knows of a newer pacticipant version
if you have enablePending set to true, the providers build won’t fail because of the failing pact on the consumers main branch https://docs.pact.io/pact_broker/advanced_topics/pending_pacts#with-the-pending-pacts-feature-enabled this stops the provider being blocked unnecessarily, if the consumer has never has a successful verification of the contract on their main branch (as the provider has never verified that they can honour it)
t
did this publish a pact with new version? or did it fail before?
It failed before.
> this stops the provider being blocked unnecessarily, if the consumer has never has a successful verification of the contract on their main branch (as the provider has never verified that they can honour it) I know, we have pending pacts enabled, but the contract has been verified before.
I just restarted the failed consumer job and after the contract was uploaded, the problem was gone.
y
ie the provider job picked up the new pact to verify (or it was self verified because the content didn’t change)? are we talking about a provider verification triggered by webhook, or by a provider change?
t
The problem was that Pacticipant A failed its consumer job before being able to upload any contract. However, Pacticipant A did upload its own verification results. Pacticipant B, which is a provider to Pacticipant A, tried to verify it's compliance with the lastest contract from Pacticipant B, but the latest version didn't include any contracts, because Pacticipant A's consumer contract job failed.
Have you got any recommendations on how to avoid such a situation?